Fairness
Class SimulationRunner

java.lang.Object
  extended by Fairness.SimulationRunner

public class SimulationRunner
extends java.lang.Object

SimulationRunner wraps a Simulation and runs it, generating the output files and writing them to disk after the simulation is complete.


Constructor Summary
SimulationRunner(java.util.List<NodeMonitor> monitors, java.util.Collection<NodeBehavior> behaviors, java.util.Map<java.lang.String,java.util.List<Node>> nodeGroups, Simulation sim, java.io.File outputDirectory)
          Constructs a new SimulationRunner.
 
Method Summary
 void runSimulation()
          Runs the simulation and generates output files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulationRunner

public SimulationRunner(java.util.List<NodeMonitor> monitors,
                        java.util.Collection<NodeBehavior> behaviors,
                        java.util.Map<java.lang.String,java.util.List<Node>> nodeGroups,
                        Simulation sim,
                        java.io.File outputDirectory)
Constructs a new SimulationRunner. The number and format of output files is described in the user guide.

Parameters:
monitors - non-null List of all node monitors used in the simulation
behaviors - non-null Collection of all NodeBehaviors in the sim
nodeGroups - non-null Map to group Nodes into groups by name
sim - non-null Simulation to run
outputDirectory - non-null File denoting an existing directory for output
Method Detail

runSimulation

public void runSimulation()
                   throws SimulationException
Runs the simulation and generates output files.

Throws:
SimulationException - if the Simulation could not finish or errors occured writing output files.