edu.cuny.cat.market.charging
Class BaitAndSwitchChargingPolicy

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.BaitAndSwitchChargingPolicy
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable

public class BaitAndSwitchChargingPolicy
extends ChargingPolicy

This charge-cutting policy makes a specialist to cut its charge until it captures a certain chunk of market share, then slowly increases its charge, and then adjusts its charge downward again if its market share drops below a certain level.

Parameters

base.registration
double
(charge on registration)
base.information
double
(charge on information)
base.shout
double
(charge on shout)
base.transaction
double
(charge on transaction)
base.profit
double [0,1]
(charge on profit)
base.cutratio
double [0,1] (0.5 by default)
(the speed a specialist cuts its charges down from the lowest charges of markets when it needs luring more traders to register)
base.exploitratio
double [0,1] (0.6 by default)
(the market share beyond which the specialist will try to exploit traders)

Default Base

bait_and_switch_charging

Version:
$Revision: 1.8 $
Author:
Kai Cai

Field Summary
protected  double cutRatio
           
static double DEFAULT_CUT_RATIO
           
static double DEFAULT_EXPLOIT_RATIO
           
protected  double exploitRatio
           
protected  double[] maxFees
           
protected  double[] minFees
           
protected  int numberOfTradersRegisteredToday
           
static java.lang.String P_CUT_RATIO
           
static java.lang.String P_DEF_BASE
           
static java.lang.String P_EXPLOIT_RATIO
           
protected  boolean toLureTrader
           
protected  int totalNumberOfTraders
           
 
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
BaitAndSwitchChargingPolicy()
           
 
Method Summary
 void eventOccurred(AuctionEvent event)
           
 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 updateExploitStatus()
           
protected  void updateFees()
           
protected  void updateMinAndMaxFees(FeesAnnouncedEvent event)
           
protected  void updateTraderRegistration(RegisteredTradersAnnouncedEvent event)
           
 
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, initialize, setAuctioneer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_EXPLOIT_RATIO

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

P_CUT_RATIO

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

P_DEF_BASE

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

DEFAULT_EXPLOIT_RATIO

public static final double DEFAULT_EXPLOIT_RATIO
See Also:
Constant Field Values

DEFAULT_CUT_RATIO

public static final double DEFAULT_CUT_RATIO
See Also:
Constant Field Values

exploitRatio

protected double exploitRatio

cutRatio

protected double cutRatio

minFees

protected double[] minFees

maxFees

protected double[] maxFees

numberOfTradersRegisteredToday

protected int numberOfTradersRegisteredToday

totalNumberOfTraders

protected int totalNumberOfTraders

toLureTrader

protected boolean toLureTrader
Constructor Detail

BaitAndSwitchChargingPolicy

public BaitAndSwitchChargingPolicy()
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 AuctioneerPolicy

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 AuctioneerPolicy

eventOccurred

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

updateTraderRegistration

protected void updateTraderRegistration(RegisteredTradersAnnouncedEvent event)

updateExploitStatus

protected void updateExploitStatus()

updateMinAndMaxFees

protected void updateMinAndMaxFees(FeesAnnouncedEvent event)

updateFees

protected void updateFees()

toString

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