edu.cuny.cat.market.charging
Class ChargeCuttingChargingPolicy
java.lang.Object
edu.cuny.cat.market.AuctioneerPolicy
edu.cuny.cat.market.charging.ChargingPolicy
edu.cuny.cat.market.charging.ChargeCuttingChargingPolicy
- All Implemented Interfaces:
- AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
public class ChargeCuttingChargingPolicy
- extends ChargingPolicy
This charge-cutting charging policy set the charges by scaling down the
lowest charges of markets imposed on the previous day. This is based on the
observation that traders all prefer markets with lower charges.
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.scale
double [0, 1] (0.8 by default) |
(the scale of the lowest charges) |
Default Base
- Version:
- $Revision: 1.9 $
- Author:
- Kai Cai
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
P_SCALE
public static final java.lang.String P_SCALE
- See Also:
- Constant Field Values
P_DEF_BASE
public static final java.lang.String P_DEF_BASE
- See Also:
- Constant Field Values
scale
protected double scale
currentMinFees
protected double[] currentMinFees
ChargeCuttingChargingPolicy
public ChargeCuttingChargingPolicy()
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
updateCurrentMinFees
protected void updateCurrentMinFees(FeesAnnouncedEvent event)
updateFees
protected void updateFees()