uk.ac.liv.auction.stats
Class TrueSupplyAndDemandStats

java.lang.Object
  extended byuk.ac.liv.auction.stats.AbstractAuctionReport
      extended byuk.ac.liv.auction.stats.AbstractMarketStatsReport
          extended byuk.ac.liv.auction.stats.DirectRevelationReport
              extended byuk.ac.liv.auction.stats.SupplyAndDemandStats
                  extended byuk.ac.liv.auction.stats.TrueSupplyAndDemandStats
All Implemented Interfaces:
AuctionEventListener, AuctionReport, Parameterizable, Resetable, java.io.Serializable

public class TrueSupplyAndDemandStats
extends SupplyAndDemandStats

A class to calculate the supply and demand curves and write them to the specified DataWriters. This can be used to log data to DataSeriesWriters, which can then be viewed in a JSci graph or a swing table.

Version:
$Revision: 1.2 $
Author:
Steve Phelps
See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList asks
          The sorted list of agents' truthful asks (ie sellers' private values).
protected  java.util.ArrayList bids
          The sorted list of agent's truthful bids (ie buyers' private values).
 
Fields inherited from class uk.ac.liv.auction.stats.SupplyAndDemandStats
demandStats, supplyStats
 
Fields inherited from class uk.ac.liv.auction.stats.DirectRevelationReport
auction, shoutEngine, shouts
 
Constructor Summary
TrueSupplyAndDemandStats(RoundRobinAuction auction, DataWriter supplyStats, DataWriter demandStats)
           
 
Method Summary
protected  void enumerateTruthfulShout(Shout shout)
          Process a truthful shout from an agent
 java.util.Map getVariables()
          Returns a Map of all of the variables that are produced in the report.
 void initialise()
           
 void writeDemandStats()
           
 void writeSupplyStats()
           
 
Methods inherited from class uk.ac.liv.auction.stats.SupplyAndDemandStats
produceUserOutput, writeStats
 
Methods inherited from class uk.ac.liv.auction.stats.DirectRevelationReport
calculate, reset, setAuction, setup, simulateDirectRevelation
 
Methods inherited from class uk.ac.liv.auction.stats.AbstractMarketStatsReport
eventOccurred
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bids

protected java.util.ArrayList bids
The sorted list of agent's truthful bids (ie buyers' private values).


asks

protected java.util.ArrayList asks
The sorted list of agents' truthful asks (ie sellers' private values).

Constructor Detail

TrueSupplyAndDemandStats

public TrueSupplyAndDemandStats(RoundRobinAuction auction,
                                DataWriter supplyStats,
                                DataWriter demandStats)
Method Detail

writeSupplyStats

public void writeSupplyStats()
Specified by:
writeSupplyStats in class SupplyAndDemandStats

writeDemandStats

public void writeDemandStats()
Specified by:
writeDemandStats in class SupplyAndDemandStats

enumerateTruthfulShout

protected void enumerateTruthfulShout(Shout shout)
Description copied from class: DirectRevelationReport
Process a truthful shout from an agent

Overrides:
enumerateTruthfulShout in class DirectRevelationReport
Parameters:
shout - The truthful shout

initialise

public void initialise()
Overrides:
initialise in class DirectRevelationReport

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 SupplyAndDemandStats