net.sourceforge.jasa.report
Class TrueSupplyAndDemandStats

java.lang.Object
  extended by AbstractReportVariables
      extended by net.sourceforge.jasa.report.DirectRevelationReportVariables
          extended by net.sourceforge.jasa.report.SupplyAndDemandStats
              extended by net.sourceforge.jasa.report.TrueSupplyAndDemandStats
All Implemented Interfaces:
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.

 

Field Summary
protected  java.util.ArrayList<Order> asks
          The sorted list of agents' truthful asks (ie sellers' private values).
protected  java.util.ArrayList<Order> bids
          The sorted list of agent's truthful bids (ie buyers' private values).
 
Fields inherited from class net.sourceforge.jasa.report.SupplyAndDemandStats
demandStats, supplyStats
 
Fields inherited from class net.sourceforge.jasa.report.DirectRevelationReportVariables
auction, shoutEngine, shouts
 
Constructor Summary
TrueSupplyAndDemandStats(Market auction, DataWriter supplyStats, DataWriter demandStats)
           
 
Method Summary
protected  void enumerateTruthfulShout(Order shout)
          Process a truthful shout from an agent
 void initialise()
           
 void writeDemandStats()
           
 void writeSupplyStats()
           
 
Methods inherited from class net.sourceforge.jasa.report.SupplyAndDemandStats
produceUserOutput, writeStats
 
Methods inherited from class net.sourceforge.jasa.report.DirectRevelationReportVariables
compute, dispose, initialise, setAuction, simulateDirectRevelation
 
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<Order> bids
The sorted list of agent's truthful bids (ie buyers' private values).


asks

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

Constructor Detail

TrueSupplyAndDemandStats

public TrueSupplyAndDemandStats(Market 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(Order shout)
Description copied from class: DirectRevelationReportVariables
Process a truthful shout from an agent

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

initialise

public void initialise()
Overrides:
initialise in class DirectRevelationReportVariables