edu.cuny.cat.market.charging
Class BestResponseChargingPolicy

java.lang.Object
  extended by edu.cuny.cat.market.AuctioneerPolicy
      extended by edu.cuny.cat.market.charging.ChargingPolicy
          extended by edu.cuny.cat.market.charging.AdaptiveChargingPolicy
              extended by edu.cuny.cat.market.charging.BestResponseChargingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable

public class BestResponseChargingPolicy
extends AdaptiveChargingPolicy

TODO: does NOT work well for the moment. 1. need learn from other specialists as well 2. need more reasonable esitmated utility of a fee in terms of trader popularity 3. IndivProfit list never gets full as with TraderNum list - check it out !

An adaptive charging policy that estimates the utilities of charges once imposed and then calculate a charge that maximizes the expected utility. ReverseDiscountSlidingLearner is currently supposed to be used to estimate the trader popularity with a certain fee.

Parameters

base.memorysize
int >= 1 (8 by default)
(the number of days to observe)

Default Base

best_response_charging

Version:
$Revision: 1.12 $
Author:
Jinzhong Niu

Field Summary
protected  java.util.Map<java.lang.String,java.lang.Double> cumulativeProfits
           
protected  double dailyProfit
           
protected  edu.cuny.cat.market.charging.BestResponseChargingPolicy.DataStorage[] dataStorages
           
static int DEFAULT_MEMORY_SIZE
           
protected static double[] FEE_STEPS
           
protected static double[] MAX_FEES
          the highest fees to be considered
protected  int memorySize
           
protected static double[] MIN_FEES
          the lowest fees to be considered
static java.lang.String P_DEF_BASE
           
static java.lang.String P_MEMORYSIZE
           
protected  edu.cuny.ai.learning.ReverseDiscountSlidingLearner[] rdslearners
          actually the learners defined in the parent class and known as ReverseDiscountSlidingLearner here for convenience.
 
Fields inherited from class edu.cuny.cat.market.charging.AdaptiveChargingPolicy
initialFees, learners, P_LEARNER, P_SCALE, perturbations, scales
 
Fields inherited from class edu.cuny.cat.market.charging.ChargingPolicy
FEE_TYPES, fees, FLAT, FRACTIONAL, INFORMATION_INDEX, MAXES, MINES, P_FEES, PROFIT_INDEX, REGISTRATION_INDEX, SHOUT_INDEX, TRANSACTION_INDEX
 
Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy
auctioneer
 
Constructor Summary
BestResponseChargingPolicy()
           
 
Method Summary
 void eventOccurred(AuctionEvent event)
           
 void initialize()
          initializes after parameters are set via either setters, constructors, or parameter files.
 void reset()
          resets the state to be the same as the policy is created and initialized.
 void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
           
 java.lang.String toString()
           
protected  void updateFees()
           
protected  void updateRegisteredTraders(RegisteredTradersAnnouncedEvent event)
           
protected  void updateSpecialistProfit(Specialist specialist)
           
 
Methods inherited from class edu.cuny.cat.market.charging.ChargingPolicy
adjustFees, getFees, getInformationFee, getProfitFee, getRegistrationFee, getShoutFee, getTransactionFee
 
Methods inherited from class edu.cuny.cat.market.AuctioneerPolicy
getAuctioneer, setAuctioneer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_DEF_BASE

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

P_MEMORYSIZE

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

DEFAULT_MEMORY_SIZE

public static final int DEFAULT_MEMORY_SIZE
See Also:
Constant Field Values

MAX_FEES

protected static final double[] MAX_FEES
the highest fees to be considered


MIN_FEES

protected static final double[] MIN_FEES
the lowest fees to be considered


FEE_STEPS

protected static final double[] FEE_STEPS

rdslearners

protected edu.cuny.ai.learning.ReverseDiscountSlidingLearner[] rdslearners
actually the learners defined in the parent class and known as ReverseDiscountSlidingLearner here for convenience.


cumulativeProfits

protected java.util.Map<java.lang.String,java.lang.Double> cumulativeProfits

memorySize

protected int memorySize

dataStorages

protected edu.cuny.cat.market.charging.BestResponseChargingPolicy.DataStorage[] dataStorages

dailyProfit

protected double dailyProfit
Constructor Detail

BestResponseChargingPolicy

public BestResponseChargingPolicy()
Method Detail

setup

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

initialize

public void initialize()
Description copied from class: AuctioneerPolicy
initializes after parameters are set via either setters, constructors, or parameter files.

Overrides:
initialize in class AdaptiveChargingPolicy

reset

public void reset()
Description copied from class: AuctioneerPolicy
resets the state to be the same as the policy is created and initialized.

Specified by:
reset in interface edu.cuny.obj.Resetable
Overrides:
reset in class AdaptiveChargingPolicy

updateFees

protected void updateFees()

updateSpecialistProfit

protected void updateSpecialistProfit(Specialist specialist)

updateRegisteredTraders

protected void updateRegisteredTraders(RegisteredTradersAnnouncedEvent event)

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener
Overrides:
eventOccurred in class AuctioneerPolicy

toString

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