uk.ac.liv.auction
Class MarketSimulation

java.lang.Object
  extended byuk.ac.liv.auction.MarketSimulation
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable
Direct Known Subclasses:
ZIPExperiment

public class MarketSimulation
extends java.lang.Object
implements java.io.Serializable, java.lang.Runnable

The main JASA application class. This application takes as an argument the name of a parameter file describing an auction experiment, and proceeds to run that experiment. This application can be used to run many iterations of an experiment in batch-mode, in contrast to the interactive mode provided by RepastMarketSimulation.

Version:
$Revision: 1.76 $
Author:
Steve Phelps
See Also:

Parameters

base.auction
classname inherits uk.ac.liv.auction.core.RoundRobinAuction
(the class of auction to use)
baseiterations
int
(the number of repetitions of this experiment to sample)
basew
int
(the number of repetitions of this experiment to sample)
base.writer
classname inherits uk.ac.liv.auction.io.DataWriter
(the data writer used to record results if running a batch of experiments)
, Serialized Form

Field Summary
protected  RoundRobinAuction auction
          The auction used in this simulation.
protected  int iterations
          The number of repeatitions of this experiment to sample.
static java.lang.String P_AUCTION
           
static java.lang.String P_ITERATIONS
           
static java.lang.String P_SIMULATION
           
static java.lang.String P_WRITER
           
protected  DataWriter resultsFile
          If running more than one iteration, then write batch statistics to this DataWriter.
 
Constructor Summary
MarketSimulation()
           
 
Method Summary
protected static void fatalError(java.lang.String message)
           
protected  void finalReport(java.util.Map resultsStats)
           
static void gnuMessage()
           
static void main(java.lang.String[] args)
           
protected  void recordResults(java.util.Map results, java.util.Map resultsStats)
           
 void run()
           
 void runBatchExperiment(int n)
           
 void runSingleExperiment()
           
 void setup(ec.util.ParameterDatabase parameters, ec.util.Parameter base)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

auction

protected RoundRobinAuction auction
The auction used in this simulation.


iterations

protected int iterations
The number of repeatitions of this experiment to sample.


resultsFile

protected DataWriter resultsFile
If running more than one iteration, then write batch statistics to this DataWriter.


P_AUCTION

public static final java.lang.String P_AUCTION
See Also:
Constant Field Values

P_SIMULATION

public static final java.lang.String P_SIMULATION
See Also:
Constant Field Values

P_ITERATIONS

public static final java.lang.String P_ITERATIONS
See Also:
Constant Field Values

P_WRITER

public static final java.lang.String P_WRITER
See Also:
Constant Field Values
Constructor Detail

MarketSimulation

public MarketSimulation()
Method Detail

main

public static void main(java.lang.String[] args)

setup

public void setup(ec.util.ParameterDatabase parameters,
                  ec.util.Parameter base)

run

public void run()
Specified by:
run in interface java.lang.Runnable

runSingleExperiment

public void runSingleExperiment()

runBatchExperiment

public void runBatchExperiment(int n)

gnuMessage

public static void gnuMessage()

finalReport

protected void finalReport(java.util.Map resultsStats)

recordResults

protected void recordResults(java.util.Map results,
                             java.util.Map resultsStats)

fatalError

protected static void fatalError(java.lang.String message)