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

Super class

individual::EventBase -> TargetedEvent

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 queue_extend()

Extend the target size.

Usage

TargetedEvent$queue_extend(n)

Arguments

n

the number of new elements to add to the index.


Method queue_extend_with_schedule()

Extend the target size and schedule for the new population.

Usage

TargetedEvent$queue_extend_with_schedule(delays)

Arguments

delays

the delay for each new individual.


Method queue_shrink()

Shrink the TargetedEvent.

Usage

TargetedEvent$queue_shrink(index)

Arguments

index

the individuals to remove from the event.


Method .process_listener()

Usage

TargetedEvent$.process_listener(listener)


Method .process_listener_cpp()

Usage

TargetedEvent$.process_listener_cpp(listener)


Method .resize()

Usage

TargetedEvent$.resize()


Method .checkpoint()

Usage

TargetedEvent$.checkpoint()


Method .restore()

Usage

TargetedEvent$.restore(time, schedule)


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.