public abstract class AbstractExperiment extends Object implements ISimulationControl
Constructor and Description |
---|
AbstractExperiment(ISimulationModel model) |
Modifier and Type | Method and Description |
---|---|
void |
addStopCondition(SimCondition condition) |
void |
addTimeObserver(Observer observer) |
boolean |
checkStopConditions() |
boolean |
isRunning()
Returns whether the simulation is running.
|
void |
setMaxSimTime(long simTime)
Sets the simulation time at which the simulation is supposed to stop.
|
void |
start()
Starts the simulation.
|
abstract void |
startSimulator() |
void |
stop()
Stops the simulation.
|
abstract void |
stopSimulator() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentSimulationTime
public AbstractExperiment(ISimulationModel model)
public void setMaxSimTime(long simTime)
ISimulationControl
setMaxSimTime
in interface ISimulationControl
simTime
- the time instant at which the simulation is to stop, expressed in simulated time
unitspublic void addStopCondition(SimCondition condition)
addStopCondition
in interface ISimulationControl
public void start()
ISimulationControl
start
in interface ISimulationControl
public void stop()
ISimulationControl
stop
in interface ISimulationControl
public boolean isRunning()
ISimulationControl
isRunning
in interface ISimulationControl
public boolean checkStopConditions()
public void addTimeObserver(Observer observer)
addTimeObserver
in interface ISimulationControl
public abstract void startSimulator()
public abstract void stopSimulator()