edu.cuny.cat.market.charging
Class ChargeCuttingChargingPolicy

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.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

charge_cutting_charging

Version:
$Revision: 1.9 $
Author:
Kai Cai

Field Summary
protected  double[] currentMinFees
           
static java.lang.String P_DEF_BASE
           
static java.lang.String P_SCALE
           
protected  double scale
           
 
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
ChargeCuttingChargingPolicy()
           
 
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)
           
protected  void updateCurrentMinFees(FeesAnnouncedEvent event)
           
protected  void updateFees()
           
 
Methods inherited from class edu.cuny.cat.market.charging.ChargingPolicy
adjustFees, getFees, getInformationFee, getProfitFee, getRegistrationFee, getShoutFee, getTransactionFee, toString
 
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_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
Constructor Detail

ChargeCuttingChargingPolicy

public ChargeCuttingChargingPolicy()
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

updateCurrentMinFees

protected void updateCurrentMinFees(FeesAnnouncedEvent event)

updateFees

protected void updateFees()