Simulation
Properties
The environment of this simulation. It is not a copy, but the actual environment used in the simulation: manipulate it carefully.
The OutputMonitors currently attached to this simulation.
The current SimulationState of the simulation.
Functions
Adds an OutputMonitor to this simulation.
Sends a pause command to the simulation. There is no guarantee on when this command will be actually processed. The returned future completes when the simulation is paused.
Sends a play command to the simulation. There is no guarantee on when this command will be actually processed. The returned future completes when the simulation is played.
Notifies the simulation that a reaction host has registered reactionToAdd. Model code should register the reaction through its host; the host invokes this callback after membership actually changes. Adding a node invokes this callback once for each reaction already hosted by that node; node and topology changes have no separate simulation callback.
Marks reactionToUpdate as a reaction whose observed scheduling inputs changed. The notification is synchronous and must originate on the simulation thread. The engine refreshes each affected reaction once when the enclosing model mutation completes.
Notifies the simulation that a reaction host has unregistered reactionToRemove. Model code should unregister the reaction through its host; the host invokes this callback after membership actually changes. Removing a node invokes this callback once for each hosted reaction before disposing it.
Removes an OutputMonitor from this simulation. If monitor was not among those already added, nothing happens.
Sends a terminate command to the simulation. There is no guarantee on when this command will be actually processed. The returned future completes when the simulation is terminated.
Suspends the caller until the simulation reaches the selected SimulationState, or the timeout, expressed in timeunit, expires. Waiting for a status does not mean that every OutputMonitor has already been notified of the update.