Class AbstractExperiment
- java.lang.Object
-
- de.uka.ipd.sdq.simulation.abstractsimengine.AbstractExperiment
-
- All Implemented Interfaces:
ISimulationControl
- Direct Known Subclasses:
DesmoJExperiment
,SSJExperiment
public abstract class AbstractExperiment extends Object implements ISimulationControl
-
-
Field Summary
Fields Modifier and Type Field Description protected ISimulationModel
model
-
Constructor Summary
Constructors Constructor Description AbstractExperiment(ISimulationModel model)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addStopCondition(SimCondition condition)
void
addTimeObserver(Observer observer)
boolean
checkStopConditions()
boolean
isRunning()
Returns whether the simulation is running.protected void
notifyTimeObservers()
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()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl
getCurrentSimulationTime
-
-
-
-
Field Detail
-
model
protected final ISimulationModel model
-
-
Constructor Detail
-
AbstractExperiment
public AbstractExperiment(ISimulationModel model)
-
-
Method Detail
-
setMaxSimTime
public void setMaxSimTime(long simTime)
Description copied from interface:ISimulationControl
Sets the simulation time at which the simulation is supposed to stop.- Specified by:
setMaxSimTime
in interfaceISimulationControl
- Parameters:
simTime
- the time instant at which the simulation is to stop, expressed in simulated time units
-
addStopCondition
public void addStopCondition(SimCondition condition)
- Specified by:
addStopCondition
in interfaceISimulationControl
-
start
public void start()
Description copied from interface:ISimulationControl
Starts the simulation.- Specified by:
start
in interfaceISimulationControl
-
stop
public void stop()
Description copied from interface:ISimulationControl
Stops the simulation.- Specified by:
stop
in interfaceISimulationControl
-
isRunning
public boolean isRunning()
Description copied from interface:ISimulationControl
Returns whether the simulation is running.- Specified by:
isRunning
in interfaceISimulationControl
-
checkStopConditions
public boolean checkStopConditions()
-
addTimeObserver
public void addTimeObserver(Observer observer)
- Specified by:
addTimeObserver
in interfaceISimulationControl
-
startSimulator
public abstract void startSimulator()
-
stopSimulator
public abstract void stopSimulator()
-
notifyTimeObservers
protected void notifyTimeObservers()
-
-