fern.benchmark
Class SimulatorCorrectness

java.lang.Object
  extended by fern.benchmark.Benchmark
      extended by fern.benchmark.SimulatorPerformance
          extended by fern.benchmark.SimulatorCorrectness

public class SimulatorCorrectness
extends SimulatorPerformance

Benchmark the correctness of the built-in simulators for a given net. For this net and a specified moment in time, the average histogram distance is calculated for given species of the network. Additionally the histograms are plotted. The benchmark method can be invoked repeatedly to calculate the average over many simulations.

For references, see Yang Cao, Linda Petzold, Accuracy limitations and the measurement of errors in the stochastic simulation of chemically reacting systems, Journal of Computational Physics 212 (2006) 6�24.

Author:
Florian Erhard

Constructor Summary
SimulatorCorrectness(Network net, double moment, String... speciesNames)
          Creates the benchmark instance with given network, moment in time and species.
 
Method Summary
static void main(String[] args)
           
 void present()
          Gets called after some iterations of the method benchmark in the base class.
 
Methods inherited from class fern.benchmark.SimulatorPerformance
benchmark, getShowSteps, getSimulators, setShowSteps
 
Methods inherited from class fern.benchmark.Benchmark
addData, clearData, createRandomDoubleArray, end, getNumBins, setNumBins, start, toGnuplot, toGnuplot, toGnuPlotAsHistogram, toGnuPlotAsHistogram
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulatorCorrectness

public SimulatorCorrectness(Network net,
                            double moment,
                            String... speciesNames)
Creates the benchmark instance with given network, moment in time and species.

Parameters:
net - the network to benchmark
moment - the moment in time at which the amounts are to be measured
speciesNames - the names of the species of which the amounts are to be measured
Method Detail

present

public void present()
Gets called after some iterations of the method benchmark in the base class. A gnuplot is created containing histograms for each species and simulator and the histogram distances for the simulators is printed to stdout

See Also:
SimulatorPerformance.setShowSteps(int)

main

public static void main(String[] args)
                 throws IOException,
                        org.jdom.JDOMException
Throws:
IOException
org.jdom.JDOMException