Fairness
Class SimulationRunner
java.lang.Object
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 |
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 simulationbehaviors
- non-null Collection of all NodeBehaviors in the simnodeGroups
- non-null Map to group Nodes into groups by namesim
- non-null Simulation to runoutputDirectory
- non-null File denoting an existing directory for output
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.