Event | R Documentation |
Describes a general event in the simulation.
individual::EventBase
-> Event
new()
Initialise an Event.
Event$new(restore = TRUE)
restore
if true, the schedule of this event is restored when restoring from a saved simulation.
schedule()
Schedule this event to occur in the future.
Event$schedule(delay)
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.
clear_schedule()
Stop a future event from triggering.
Event$clear_schedule()
.process_listener()
Event$.process_listener(listener)
.process_listener_cpp()
Event$.process_listener_cpp(listener)
.resize()
Event$.resize()
save_state()
save the state of the event
Event$save_state()
restore_state()
restore the event from a previously saved state.
If the event was constructed with restore = FALSE
, the state
argument is ignored.
Event$restore_state(timestep, state)
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.
clone()
The objects of this class are cloneable with this method.
Event$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.