Describes a general event in the simulation.
Methods
Inherited methods
Method new()
Initialise an Event.
Usage
Event$new(restore = TRUE)
Arguments
restore
if true, the schedule of this event is restored when
restoring from a saved simulation.
Method schedule()
Schedule this event to occur in the future.
Arguments
delay
the number of time steps to wait before triggering the event,
can be a scalar or a vector of values for events that should be triggered
multiple times.
Method clear_schedule()
Stop a future event from triggering.
Method .process_listener()
Usage
Event$.process_listener(listener)
Method .process_listener_cpp()
Usage
Event$.process_listener_cpp(listener)
Method save_state()
save the state of the event
Method restore_state()
restore the event from a previously saved state.
If the event was constructed with restore = FALSE
, the state
argument is ignored.
Usage
Event$restore_state(timestep, state)
Arguments
timestep
the timestep at which simulation is resumed.
state
the previously saved state, as returned by the
save_state
method. NULL is passed when restoring from a saved
simulation in which this variable did not exist.
Method clone()
The objects of this class are cloneable with this method.
Usage
Event$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.