net.sourceforge.jasa.report
Class ReportVariableWriterReport

java.lang.Object
  extended by net.sourceforge.jasa.report.ReportVariableWriterReport
All Implemented Interfaces:
java.util.Observer, AuctionReport

public class ReportVariableWriterReport
extends java.lang.Object
implements AuctionReport, java.util.Observer

This class writes market data to the specified DataWriter objects, and thus can be used to log data to eg, CSV files, a database backend, etc.

 

Field Summary
protected  Market auction
          The market we are keeping statistics on.
protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport auctionLog
           
protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport dayLog
           
protected static boolean initialized
           
protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport roundLog
           
protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVDistributionWriterReport settingLog
           
protected  int transactionCount
          Number of transactions that have been executed in the current round.
protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport transactionLog
           
 
Constructor Summary
ReportVariableWriterReport()
           
ReportVariableWriterReport(net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVDistributionWriterReport settingLog, net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport auctionLog, net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport dayLog, net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport roundLog, net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport transactionLog)
           
 
Method Summary
 void eventOccurred(SimEvent event)
           
 void generateHeader()
          Generats the CSV file header, i.e.
 java.lang.String getName()
           
 java.util.Map<java.lang.Object,java.lang.Number> getVariableBindings()
           
 void produceUserOutput()
           
 void setAuction(Market auction)
           
 void update(java.util.Observable o, java.lang.Object arg)
          listens to CaseEnumConfig for the start and end of processing each case enumeration so as to update log of different market settings.
 void updateAuctionLog(MarketClosedEvent event)
           
 void updateDayLog(EndOfDayEvent event)
           
 void updateRoundLog(RoundFinishedEvent event)
           
 void updateSettingLog(MarketClosedEvent event)
           
 void updateTransactionLog(TransactionExecutedEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialized

protected static boolean initialized

settingLog

protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVDistributionWriterReport settingLog

auctionLog

protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport auctionLog

dayLog

protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport dayLog

roundLog

protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport roundLog

transactionLog

protected static net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport transactionLog

transactionCount

protected int transactionCount
Number of transactions that have been executed in the current round.


auction

protected Market auction
The market we are keeping statistics on.

Constructor Detail

ReportVariableWriterReport

public ReportVariableWriterReport()

ReportVariableWriterReport

public ReportVariableWriterReport(net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVDistributionWriterReport settingLog,
                                  net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport auctionLog,
                                  net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport dayLog,
                                  net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport roundLog,
                                  net.sourceforge.jasa.report.ReportVariableWriterReport.InternalRVWriterReport transactionLog)
Method Detail

eventOccurred

public void eventOccurred(SimEvent event)

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
listens to CaseEnumConfig for the start and end of processing each case enumeration so as to update log of different market settings.

Specified by:
update in interface java.util.Observer

generateHeader

public void generateHeader()
Generats the CSV file header, i.e. field names in the first lines.


updateTransactionLog

public void updateTransactionLog(TransactionExecutedEvent event)

updateRoundLog

public void updateRoundLog(RoundFinishedEvent event)

updateDayLog

public void updateDayLog(EndOfDayEvent event)

updateAuctionLog

public void updateAuctionLog(MarketClosedEvent event)

updateSettingLog

public void updateSettingLog(MarketClosedEvent event)

produceUserOutput

public void produceUserOutput()

getVariableBindings

public java.util.Map<java.lang.Object,java.lang.Number> getVariableBindings()

setAuction

public void setAuction(Market auction)

getName

public java.lang.String getName()