|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.liv.auction.agent.RandomValuer
A valuation policy in which we randomly determine our valuation across all auctions and all units at agent-initialisation time. Valuations are drawn from a uniform distribution with the specified range.
Parameters
| base .minvalue double >= 0 |
(the minimum valuation) |
| base .maxvalue double >=0 |
(the maximum valuation) |
| Field Summary | |
protected cern.jet.random.AbstractContinousDistribution |
distribution
The probability distribution to use for drawing valuations. |
protected double |
maxValue
The maximum valuation to use. |
protected double |
minValue
The minimum valuation to use. |
static java.lang.String |
P_MAXVALUE
|
static java.lang.String |
P_MINVALUE
|
protected double |
value
The current valuation. |
| Constructor Summary | |
RandomValuer()
|
|
RandomValuer(double minValue,
double maxValue)
|
|
| Method Summary | |
void |
consumeUnit(Auction auction)
Recalculate valuation after consumption of the commodity being traded in the given auction. |
double |
determineValue(Auction auction)
Determine the current valuation of commodity in the given auction. |
void |
drawRandomValue()
|
void |
eventOccurred(AuctionEvent event)
Recalculate valuation(s) in response to an auction event. |
double |
getCurrentValuation()
|
double |
getMaxValue()
|
double |
getMinValue()
|
void |
initialise()
|
void |
reset()
Reinitialise our state to the original settings. |
void |
setMaxValue(double maxValue)
|
void |
setMinValue(double minValue)
|
void |
setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
Initialise this object from a parameter database. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double value
protected double minValue
protected double maxValue
protected cern.jet.random.AbstractContinousDistribution distribution
public static final java.lang.String P_MINVALUE
public static final java.lang.String P_MAXVALUE
| Constructor Detail |
public RandomValuer()
public RandomValuer(double minValue,
double maxValue)
| Method Detail |
public void setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
Parameterizable
setup in interface Parameterizablepublic double determineValue(Auction auction)
ValuationPolicy
determineValue in interface ValuationPolicypublic void consumeUnit(Auction auction)
ValuationPolicy
consumeUnit in interface ValuationPolicypublic void eventOccurred(AuctionEvent event)
ValuationPolicy
eventOccurred in interface ValuationPolicypublic void reset()
Resetable
reset in interface Resetablepublic void initialise()
public void setMaxValue(double maxValue)
public double getMaxValue()
public void setMinValue(double minValue)
public double getMinValue()
public double getCurrentValuation()
public void drawRandomValue()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||