Describes a general event in the simulation.

Super class

individual::EventBase -> Event

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.

Usage

Event$schedule(delay)

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.

Usage

Event$clear_schedule()


Method .process_listener()

Usage

Event$.process_listener(listener)


Method .process_listener_cpp()

Usage

Event$.process_listener_cpp(listener)


Method .resize()

Usage

Event$.resize()


Method save_state()

save the state of the event

Usage

Event$save_state()


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.