uk.ac.liv.auction.stats
Class PayoffReport
java.lang.Object
uk.ac.liv.auction.stats.AbstractAuctionReport
uk.ac.liv.auction.stats.AbstractMarketStatsReport
uk.ac.liv.auction.stats.DynamicSurplusReport
uk.ac.liv.auction.stats.PayoffReport
- All Implemented Interfaces:
- AuctionEventListener, AuctionReport, Parameterizable, Resetable, java.io.Serializable
- Direct Known Subclasses:
- GroupPayoffReport, StrategyPayoffReport
- public abstract class PayoffReport
- extends DynamicSurplusReport
- implements java.io.Serializable
An abstract report that keeps track of the ratio of actual
verses theoretical profits for a particular grouping of agents.
Concrete implementations define
- Version:
- $Revision: 1.4 $
- Author:
- Steve Phelps
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
totalProfits
protected double totalProfits
PayoffReport
public PayoffReport()
setup
public void setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
- Description copied from interface:
Parameterizable
- Initialise this object from a parameter database.
- Specified by:
setup in interface Parameterizable- Overrides:
setup in class DynamicSurplusReport
calculate
public void calculate()
- Overrides:
calculate in class DynamicSurplusReport
calculatePayoffs
protected void calculatePayoffs()
getTotalProfits
public double getTotalProfits()
getProfits
public double getProfits(java.lang.Object key)
getPayoff
public double getPayoff(java.lang.Object key)
getNumberOfAgents
public int getNumberOfAgents(java.lang.Object key)
produceUserOutput
public void produceUserOutput()
- Description copied from interface:
AuctionReport
- Produce the final report for the user. Implementors can do whatever they
see fit, for example by writing a report on stdout, or they may choose to
do nothing.
- Specified by:
produceUserOutput in interface AuctionReport- Overrides:
produceUserOutput in class DynamicSurplusReport
getVariables
public java.util.Map getVariables()
- Description copied from interface:
AuctionReport
- Returns a Map of all of the variables that are produced in the report. The
Map maps variables, represented by objects of type ReportVariable, onto
values, which may be of any class. If no variables are produced by this
report then an empty Map is returned.
- Specified by:
getVariables in interface AuctionReport- Overrides:
getVariables in class DynamicSurplusReport
initialise
public void initialise()
- Overrides:
initialise in class DynamicSurplusReport
getKey
public abstract java.lang.Object getKey(AbstractTradingAgent agent)
- Map an agent onto a group.
- Parameters:
agent - The agent to map from.
- Returns:
- An object representing the grouping of this agent.
getKeyName
public abstract java.lang.String getKeyName()
- Return user-friendly description of the space of groups.
- Returns:
- A string describing the grouping of this report.
getReportText
public abstract java.lang.String getReportText()