net.sourceforge.jabm
Class SimulationExperiment

java.lang.Object
  extended by net.sourceforge.jabm.SimulationExperiment
All Implemented Interfaces:
java.lang.Runnable

public class SimulationExperiment
extends java.lang.Object
implements java.lang.Runnable

A simulation experiment represents a simulation and a corresponding treatment: that is, a set of parameter bindings represented as Java Properties.

 

Field Summary
protected  org.springframework.beans.factory.BeanFactory beanFactory
          The Spring BeanFactory instance which is used to construct the model.
protected  java.lang.String directoryName
          The path name of the directory where report data will be written to.
protected  SimulationController model
          The SimulationController for conducting this experiment.
protected static cern.jet.random.engine.RandomSeedGenerator prngSeedGenerator
           
protected  java.util.Properties properties
          The properties specified here represent parameter bindings which override those specified in the original model configuration.
 
Constructor Summary
SimulationExperiment(org.springframework.beans.factory.BeanFactory beanFactory, java.lang.String baseDirName, int experimentNumber, java.util.Map<java.lang.String,java.lang.String> variableBindings, boolean generateSeeds, int seedMask)
           
SimulationExperiment(java.util.Properties properties)
           
 
Method Summary
 void createPropertyFile()
          Save the parameter bindings of this experiment to a property file.
 void initialise()
          Initialise the model by constructing it from the bean factory and then applying the parameter bindings specified by the properties attribute using Spring's properties post-processing feature.
 void logProperties()
          Print a summary of the parameter bindings for this experiment to a log.
 void run()
          Run this experiment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected SimulationController model
The SimulationController for conducting this experiment.


properties

protected java.util.Properties properties
The properties specified here represent parameter bindings which override those specified in the original model configuration.


directoryName

protected java.lang.String directoryName
The path name of the directory where report data will be written to.


beanFactory

protected org.springframework.beans.factory.BeanFactory beanFactory
The Spring BeanFactory instance which is used to construct the model.


prngSeedGenerator

protected static cern.jet.random.engine.RandomSeedGenerator prngSeedGenerator
Constructor Detail

SimulationExperiment

public SimulationExperiment(org.springframework.beans.factory.BeanFactory beanFactory,
                            java.lang.String baseDirName,
                            int experimentNumber,
                            java.util.Map<java.lang.String,java.lang.String> variableBindings,
                            boolean generateSeeds,
                            int seedMask)

SimulationExperiment

public SimulationExperiment(java.util.Properties properties)
Method Detail

initialise

public void initialise()
Initialise the model by constructing it from the bean factory and then applying the parameter bindings specified by the properties attribute using Spring's properties post-processing feature.


run

public void run()
Run this experiment.

Specified by:
run in interface java.lang.Runnable

logProperties

public void logProperties()
Print a summary of the parameter bindings for this experiment to a log.


createPropertyFile

public void createPropertyFile()
Save the parameter bindings of this experiment to a property file. The property file is called 'experiment.properties' and is saved in the same directory as the report data.