|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimulation.Simulator
public class Simulator
The Class Simulator controls the simulation.
Constructor Summary | |
---|---|
Simulator()
Instantiates a new simulator. |
Method Summary | |
---|---|
void |
addListener(SimulatorListener listener)
Adds the listener. |
void |
createSimulator(org.rakiura.cpn.Net net,
PetriNet pn)
Creates the simulator. |
java.util.List<SimulatorListener> |
getListener()
Gets the listener. |
int |
getSleepTime()
Gets the sleep time. |
void |
removeListener(SimulatorListener listener)
Removes the listener. |
void |
runSimulation(de.ipk_gatersleben.ag_nw.graffiti.services.task.BackgroundTaskStatusProviderSupportingExternalCallImpl status)
Runs the simulation for the defined steps and paused the simulation for the defined sleep time. |
void |
setSleepTime(int sleepTime)
Sets the sleep time. |
void |
setSteps(int steps)
Sets the steps. 0 = infinity steps |
void |
stop()
Stops the simulation and calls all registered listener (step(true) = last step). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Simulator()
Method Detail |
---|
public void createSimulator(org.rakiura.cpn.Net net, PetriNet pn)
net
- the netpublic void stop()
public void runSimulation(de.ipk_gatersleben.ag_nw.graffiti.services.task.BackgroundTaskStatusProviderSupportingExternalCallImpl status)
status
- the statuspublic void setSteps(int steps)
steps
- the new stepspublic void addListener(SimulatorListener listener)
listener
- the listenerpublic void removeListener(SimulatorListener listener)
listener
- the listenerpublic java.util.List<SimulatorListener> getListener()
public int getSleepTime()
public void setSleepTime(int sleepTime)
sleepTime
- the new sleep time
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |