edu.cuny.cat.market.charging
Class SingleDayExploringMonitor
java.lang.Object
edu.cuny.cat.market.charging.TraderExploringMonitor
edu.cuny.cat.market.charging.SingleDayExploringMonitor
- All Implemented Interfaces:
- AuctionEventListener, edu.cuny.config.param.Parameterizable
- Direct Known Subclasses:
- SlidingTraderExploringMonitor
public class SingleDayExploringMonitor
- extends TraderExploringMonitor
A simple trader exploration monitor that decides based solely on the trader
distribution among markets on the latest day. Here it is assumed that the
flatter the curve of the distribution is, the more likely traders are
exploring. The degree of exploration, or the exploring factor, is
calculated as follows and normalized into the range of [0,1]:
Variance(X)
1 - -------------------------------
Mean(X) * Mean(X) * (|X| - 1)
Parameters
base.threshold
double [0, 1] (0.6 by default) |
(a threshold value to be used in deciding whether traders are
exploring or not)
Traders are considered exploring if and only if the exploring factor is equal
to or larger than the threshold. |
Default Base
single_day_exploring_monitor |
- Version:
- $Revision: 1.6 $
- Author:
- Jinzhong Niu
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
P_DEF_BASE
public static final java.lang.String P_DEF_BASE
- See Also:
- Constant Field Values
P_THRESHOLD
public static final java.lang.String P_THRESHOLD
- See Also:
- Constant Field Values
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLD
- See Also:
- Constant Field Values
threshold
protected double threshold
- a threshold value to determine whether traders are exploring in general or
not.
SingleDayExploringMonitor
public SingleDayExploringMonitor()
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
- Specified by:
setup
in class TraderExploringMonitor
dayInitialize
protected void dayInitialize()
isExploring
public boolean isExploring()
- Description copied from class:
TraderExploringMonitor
- tells whether traders are estimated to be exploring or not.
- Specified by:
isExploring
in class TraderExploringMonitor
- Returns:
- true if traders are exploring; false otherwise
getExploringFactor
public double getExploringFactor()
- Specified by:
getExploringFactor
in class TraderExploringMonitor
- Returns:
- a numeric value telling the level of traders' exploration.
getExploringThreshold
public double getExploringThreshold()
setExploringThreshold
public void setExploringThreshold(double threshold)
updateTraderRegistration
protected void updateTraderRegistration(int numOfTraders)
eventOccurred
public void eventOccurred(AuctionEvent event)
- Specified by:
eventOccurred
in interface AuctionEventListener
- Specified by:
eventOccurred
in class TraderExploringMonitor
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object