edu.cuny.cat.market.charging
Class ShareBalancingChargingPolicy
java.lang.Object
edu.cuny.cat.market.AuctioneerPolicy
edu.cuny.cat.market.charging.ChargingPolicy
edu.cuny.cat.market.charging.AdaptiveChargingPolicy
edu.cuny.cat.market.charging.ShareBalancingChargingPolicy
- All Implemented Interfaces:
- AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable
public class ShareBalancingChargingPolicy
- extends AdaptiveChargingPolicy
This charging policy aims to maintain a balance between its profit share and
market share by adjusting its charges, since generally higher charges tend to
bring more profit but lower market share, and lower charges do the opposite.
When the profit share score is higher than market share score, it learns from
the daily winner on market share; while when the market share score is
higher, it learns from the daily winner on profit share. To allow it to learn
from itself, a perturbation is introduced. When the goal is to increase
market share, the perturbation is negative, and when the goal is to increase
profit share, the perturbation is positive.
- Version:
- $Revision: 1.8 $
- Author:
- Jinzhong Niu
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 |
cumulativeProfits
protected final java.util.Map<java.lang.String,java.lang.Double> cumulativeProfits
dailyProfits
protected java.util.Map<java.lang.String,java.lang.Double> dailyProfits
dailyProfitLeader
protected Specialist dailyProfitLeader
maxDailyProfit
protected double maxDailyProfit
dailyTraderDistributions
protected java.util.Map<java.lang.String,java.lang.Integer> dailyTraderDistributions
dailyPopularityLeader
protected Specialist dailyPopularityLeader
event
protected final edu.cuny.event.RichEvent event
ShareBalancingChargingPolicy
public ShareBalancingChargingPolicy()
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
dayInitialize
protected void dayInitialize()
updateSpecialistProfit
protected void updateSpecialistProfit(Specialist specialist)
updateSpecialistPopularity
protected void updateSpecialistPopularity(Specialist specialist,
int numOfTraders)
calculateProfitShare
protected double calculateProfitShare()
calculateMarketShare
protected double calculateMarketShare()
learnCharges
protected void learnCharges(Specialist leader,
boolean lower)
- Parameters:
leader
- lower
- whether to learn to lower charges or not
updateFees
protected void updateFees()
eventOccurred
public void eventOccurred(AuctionEvent event)
- Specified by:
eventOccurred
in interface AuctionEventListener
- Overrides:
eventOccurred
in class AuctioneerPolicy