setEvents
applies given values to events of the model depending on the key
argument.
setEvents(
key = NULL,
name = NULL,
trigger_expression = NULL,
fire_at_initial_time = NULL,
trigger_must_remain_true = NULL,
priority_expression = NULL,
delayed = NULL,
delay_expression = NULL,
assignment_target = NULL,
assignment_expression = NULL,
data = NULL,
model = getCurrentModel()
)
Identify which event to edit by specifying it's key, as string. Also supports fragments of keys, if uniquely matching one event.
Name to set, as string.
Trigger expression to set, as string, finite numeric, or logical.
Whether to fire at initial time if true, as logical.
Whether the trigger must remain true, as logical.
Priority expression to set, as string, finite numeric, or logical.
Whether the event assignment and / or calculation is to be delayed ("no", "assignment", "calculation"), as string.
Delay expression to set, as string, finite numeric, or logical.
List of assignment target entities (species, compartments, global quantities) per event to set, as list containing strings.
List of assignment expressions per event to set, as list containing string, finite numeric, or logical.
A data frame as given by getEvents
which will be applied before the other arguments.
A model object.
Use the key
argument to specify which event to modify and any of the other arguments to specify the value to set.
The function is fully vectorized.
If a NA
value is supplied, the model value is kept unchanged.
The online article on managing model entities provides some further context.
Other event functions:
deleteEvent()
,
entity_finders
,
getEvents()
,
newEvent()