TargetedEvent: TargetedEvent Class

Description Super class Methods

Description

Describes a targeted event in the simulation. This is useful for events which are triggered for a sub-population.

Super class

individual::Event -> TargetedEvent

Methods

Public methods

Inherited methods

Method new()

Initialise a TargetedEvent.

Usage
TargetedEvent$new(population_size)
Arguments
population_size

the size of the population.


Method schedule()

Schedule this event to occur in the future.

Usage
TargetedEvent$schedule(target, delay)
Arguments
target

the individuals to pass to the listener, this may be either a vector of integers or a Bitset.

delay

the number of time steps to wait before triggering the event, can be a scalar in which case all targeted individuals are scheduled for for the same delay or a vector of values giving the delay for that individual.


Method get_scheduled()

Get the individuals who are scheduled as a Bitset.

Usage
TargetedEvent$get_scheduled()

Method clear_schedule()

Stop a future event from triggering for a subset of individuals.

Usage
TargetedEvent$clear_schedule(target)
Arguments
target

the individuals to clear, this may be either a vector of integers or a Bitset.


Method .process_listener()

Usage
TargetedEvent$.process_listener(listener)

Method .process_listener_cpp()

Usage
TargetedEvent$.process_listener_cpp(listener)

Method clone()

The objects of this class are cloneable with this method.

Usage
TargetedEvent$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


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