edu.cuny.tac.aa.policy
Class SummitBasedSpendingPolicy

java.lang.Object
  extended by edu.cuny.tac.aa.GameInfo
      extended by edu.cuny.tac.aa.strategy.StrategyModule
          extended by edu.cuny.tac.aa.policy.BiddingPolicy
              extended by edu.cuny.tac.aa.policy.SpendingPolicy
                  extended by edu.cuny.tac.aa.policy.FixedSpendingPolicy
                      extended by edu.cuny.tac.aa.policy.ValuationBasedSpendingPolicy
                          extended by edu.cuny.tac.aa.policy.SummitBasedSpendingPolicy
All Implemented Interfaces:
edu.cuny.util.Parameterizable

public class SummitBasedSpendingPolicy
extends ValuationBasedSpendingPolicy

A spending policy that considers the distribution of costs and profits.

Version:
$Revision: 1.14 $
Author:
Jinzhong Niu

Field Summary
protected  double absolute
           
protected  double discount
           
static java.lang.String P_ABSOLUTE
           
static java.lang.String P_DISCOUNT
           
static java.lang.String P_RELATIVE
           
protected  double relative
           
protected  double temporaryLimit
           
 
Fields inherited from class edu.cuny.tac.aa.policy.ValuationBasedSpendingPolicy
boostRate, high, low, P_BOOSTRATE, P_HIGH, P_LOW
 
Fields inherited from class edu.cuny.tac.aa.policy.FixedSpendingPolicy
limit, P_LIMIT
 
Fields inherited from class edu.cuny.tac.aa.policy.BiddingPolicy
Formatter, strategy
 
Fields inherited from class edu.cuny.tac.aa.GameInfo
BL, CAPACITY, CLICKS, COMPONENT, COMPONENT_NAMES, CONVERSIONS, COST, CPC, CTR, CVR, DAY_DIFF, DV, ERROR, GAME_LENGTH, HIGH_CAPACITY, IMPRESSIONS, INCOME, INDIV_POPULATION_SIZE, LIMIT, LOW_CAPACITY, MANUFACTURER, MANUFACTURER_NAMES, MED_CAPACITY, NUM_OF_COMPONENTS, NUM_OF_MANUFACTURERS, NUM_OF_PRODUCTS, NUM_OF_USER_STAETS, P_AA, POSITION, PR_BST_NStoIS, PR_BST_NStoNS, PR_BURST, PR_F0toF0, PR_F0toF1, PR_F0toNS, PR_F1toF1, PR_F1toF2, PR_F1toNS, PR_F2toF2, PR_F2toNS, PR_IStoF0, PR_IStoF1, PR_IStoF2, PR_IStoIS, PR_IStoNS, PR_STD_NStoIS, PR_STD_NStoNS, PR_TtoNS, PR_TtoT, PROFIT_RATE, PROFIT_UNIT_RATE, PROMOTED, PROMOTED_IMPRESSIONS, REGULAR, REGULAR_IMPRESSIONS, REVENUE, USER_STATE_NAMES, USP
 
Constructor Summary
SummitBasedSpendingPolicy()
           
 
Method Summary
protected  double calculateLimit()
           
protected  boolean isAbsoluteSummit(DailyRecord record)
           
protected  boolean isRelativeSummit(DailyRecord prevRecord, DailyRecord curRecord, DailyRecord nextRecord)
           
 void setup(edu.cuny.util.ParameterDatabase parameters, edu.cuny.util.Parameter base)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.cuny.tac.aa.policy.ValuationBasedSpendingPolicy
prepareSpendingLimits
 
Methods inherited from class edu.cuny.tac.aa.policy.FixedSpendingPolicy
getLimit, setLimit
 
Methods inherited from class edu.cuny.tac.aa.policy.BiddingPolicy
getStrategy, handleAdvertiserInfo, handleBankStatus, handleQueryReport, handleSalesReport, handleSimulationStatus, handleStartInfo, processDailyRecord, setStrategy
 
Methods inherited from class edu.cuny.tac.aa.GameInfo
isHighCapacity, isLowCapacity, isMedCapacity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_ABSOLUTE

public static final java.lang.String P_ABSOLUTE
See Also:
Constant Field Values

P_RELATIVE

public static final java.lang.String P_RELATIVE
See Also:
Constant Field Values

P_DISCOUNT

public static final java.lang.String P_DISCOUNT
See Also:
Constant Field Values

absolute

protected double absolute

relative

protected double relative

discount

protected double discount

temporaryLimit

protected double temporaryLimit
Constructor Detail

SummitBasedSpendingPolicy

public SummitBasedSpendingPolicy()
Method Detail

setup

public void setup(edu.cuny.util.ParameterDatabase parameters,
                  edu.cuny.util.Parameter base)
Specified by:
setup in interface edu.cuny.util.Parameterizable
Overrides:
setup in class ValuationBasedSpendingPolicy

isRelativeSummit

protected boolean isRelativeSummit(DailyRecord prevRecord,
                                   DailyRecord curRecord,
                                   DailyRecord nextRecord)

isAbsoluteSummit

protected boolean isAbsoluteSummit(DailyRecord record)

calculateLimit

protected double calculateLimit()
Overrides:
calculateLimit in class ValuationBasedSpendingPolicy

toString

public java.lang.String toString()
Overrides:
toString in class ValuationBasedSpendingPolicy