Event: Event Class

Description Methods

Description

Describes a general event in the simulation.

Methods

Public methods


Method new()

Initialise an Event.

Usage
Event$new()

Method add_listener()

Add an event listener.

Usage
Event$add_listener(listener)
Arguments
listener

the function to be executed on the event, which takes a single argument giving the time step when this event is triggered.


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 .tick()

Usage
Event$.tick()

Method .process()

Usage
Event$.process()

Method .process_listener()

Usage
Event$.process_listener(listener)

Method .process_listener_cpp()

Usage
Event$.process_listener_cpp(listener)

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.


individual documentation built on Oct. 25, 2021, 9:09 a.m.