| TargetedEvent | R Documentation |
Describes a targeted event in the simulation. This is useful for events which are triggered for a sub-population.
individual::Event -> TargetedEvent
new()Initialise a TargetedEvent.
TargetedEvent$new(population_size)
population_sizethe size of the population.
schedule()Schedule this event to occur in the future.
TargetedEvent$schedule(target, delay)
targetthe individuals to pass to the listener, this may be
either a vector of integers or a Bitset.
delaythe 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.
get_scheduled()Get the individuals who are scheduled as a Bitset.
TargetedEvent$get_scheduled()
clear_schedule()Stop a future event from triggering for a subset of individuals.
TargetedEvent$clear_schedule(target)
targetthe individuals to clear, this may be either a vector of integers or
a Bitset.
queue_extend()Extend the target size
TargetedEvent$queue_extend(n)
nthe number of new elements to add to the index
queue_extend_with_schedule()Extend the target size and schedule for the new population
TargetedEvent$queue_extend_with_schedule(delays)
delaysthe delay for each new individual
queue_shrink()Shrink the targeted event
TargetedEvent$queue_shrink(index)
indexthe individuals to remove from the event
.process_listener()TargetedEvent$.process_listener(listener)
.process_listener_cpp()TargetedEvent$.process_listener_cpp(listener)
.resize()TargetedEvent$.resize()
clone()The objects of this class are cloneable with this method.
TargetedEvent$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.