|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.liv.auction.stats.AbstractAuctionReport
uk.ac.liv.auction.stats.AbstractMarketStatsReport
uk.ac.liv.auction.stats.DynamicSurplusReport
A report that keeps track of the surplus available to each agent in theoretical equilibrium. The equilibrium price is recomputed at the end of each day, thus this class can be used to keep track of theoretically available surplus even when supply and demand are changing over time. Each agent is assumed to be hypothetically able to trade the specified quantity of units in each day.
| Field Summary | |
protected EquilibriumReport |
equilibriaStats
|
static java.lang.String |
P_QUANTITY
|
protected int |
quantity
The quantity that each agent can theoretically trade per day. |
| Fields inherited from class uk.ac.liv.auction.stats.AbstractAuctionReport |
auction |
| Constructor Summary | |
DynamicSurplusReport()
|
|
| Method Summary | |
void |
calculate()
|
double |
calculateTotalEquilibriumSurplus()
|
protected double |
equilibriumSurplus(AbstractTradingAgent agent,
double ep,
int quantity)
|
void |
eventOccurred(AuctionEvent event)
|
double |
getEquilibriumProfits(AbstractTradingAgent agent)
|
int |
getQuantity()
|
java.util.Map |
getVariables()
Returns a Map of all of the variables that are produced in the report. |
void |
initialise()
|
void |
produceUserOutput()
Produce the final report for the user. |
void |
recalculate(AuctionEvent event)
|
void |
reset()
Reinitialise our state to the original settings. |
void |
setAuction(RoundRobinAuction auction)
Specify the auction to be used when generating the report. |
void |
setQuantity(int quantity)
|
void |
setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
Initialise this object from a parameter database. |
protected void |
updateStats(AbstractTradingAgent agent,
double lastSurplus)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected EquilibriumReport equilibriaStats
protected int quantity
public static final java.lang.String P_QUANTITY
| Constructor Detail |
public DynamicSurplusReport()
| Method Detail |
public void setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
Parameterizable
setup in interface Parameterizablepublic void setAuction(RoundRobinAuction auction)
AuctionReport
setAuction in interface AuctionReportsetAuction in class AbstractAuctionReportpublic void eventOccurred(AuctionEvent event)
eventOccurred in interface AuctionEventListenereventOccurred in class AbstractMarketStatsReportpublic void calculate()
calculate in class AbstractMarketStatsReportpublic void recalculate(AuctionEvent event)
public double getEquilibriumProfits(AbstractTradingAgent agent)
public double calculateTotalEquilibriumSurplus()
protected void updateStats(AbstractTradingAgent agent,
double lastSurplus)
protected double equilibriumSurplus(AbstractTradingAgent agent,
double ep,
int quantity)
public void initialise()
public void reset()
Resetable
reset in interface Resetablepublic void produceUserOutput()
AuctionReport
produceUserOutput in interface AuctionReportpublic java.util.Map getVariables()
AuctionReport
getVariables in interface AuctionReportReportVariablepublic int getQuantity()
public void setQuantity(int quantity)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||