uk.ac.liv.auction.stats
Class MeanValueDataWriterReport

java.lang.Object
  extended byuk.ac.liv.auction.stats.AbstractAuctionReport
      extended byuk.ac.liv.auction.stats.DataWriterReport
          extended byuk.ac.liv.auction.stats.MeanValueDataWriterReport
All Implemented Interfaces:
AuctionEventListener, AuctionReport, Parameterizable
Direct Known Subclasses:
GraphReport

public class MeanValueDataWriterReport
extends DataWriterReport

This report keeps track of the mean value of each market variable over the course of each round of bidding and logs the mean value to the specified DataWriter objects.

Version:
$Revision: 1.2 $
Author:
Steve Phelps

Field Summary
protected  CummulativeDistribution[] allStats
           
protected  CummulativeDistribution askQuoteStats
           
protected  CummulativeDistribution askStats
           
protected  CummulativeDistribution bidQuoteStats
           
protected  CummulativeDistribution bidStats
           
protected  int round
           
protected  CummulativeDistribution transPriceStats
           
 
Fields inherited from class uk.ac.liv.auction.stats.DataWriterReport
askLog, askQuoteLog, auction, bidLog, bidQuoteLog, transPriceLog
 
Constructor Summary
MeanValueDataWriterReport()
           
MeanValueDataWriterReport(DataWriter askQuoteLog, DataWriter bidQuoteLog, DataWriter bidLog, DataWriter askLog, DataWriter transPriceLog)
           
 
Method Summary
 void eventOccurred(AuctionEvent event)
           
 void produceUserOutput()
          Produce the final report for the user.
 void roundClosed(RoundClosedEvent event)
           
protected  void update(DataWriter writer, CummulativeDistribution stats)
           
 void updateQuoteLog(RoundClosedEvent event)
           
 void updateShoutLog(ShoutPlacedEvent event)
           
 void updateTransPriceLog(TransactionExecutedEvent event)
           
 
Methods inherited from class uk.ac.liv.auction.stats.DataWriterReport
dataUpdated, getVariables, setAuction, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

askQuoteStats

protected CummulativeDistribution askQuoteStats

bidQuoteStats

protected CummulativeDistribution bidQuoteStats

bidStats

protected CummulativeDistribution bidStats

askStats

protected CummulativeDistribution askStats

transPriceStats

protected CummulativeDistribution transPriceStats

allStats

protected CummulativeDistribution[] allStats

round

protected int round
Constructor Detail

MeanValueDataWriterReport

public MeanValueDataWriterReport(DataWriter askQuoteLog,
                                 DataWriter bidQuoteLog,
                                 DataWriter bidLog,
                                 DataWriter askLog,
                                 DataWriter transPriceLog)

MeanValueDataWriterReport

public MeanValueDataWriterReport()
Method Detail

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener
Overrides:
eventOccurred in class DataWriterReport

updateQuoteLog

public void updateQuoteLog(RoundClosedEvent event)
Overrides:
updateQuoteLog in class DataWriterReport

updateTransPriceLog

public void updateTransPriceLog(TransactionExecutedEvent event)
Overrides:
updateTransPriceLog in class DataWriterReport

updateShoutLog

public void updateShoutLog(ShoutPlacedEvent event)
Overrides:
updateShoutLog in class DataWriterReport

roundClosed

public void roundClosed(RoundClosedEvent event)

update

protected void update(DataWriter writer,
                      CummulativeDistribution stats)

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 DataWriterReport