setGlobalQuantities
applies given values to global quantities of the model depending on the key
argument.
setGlobalQuantities(
key = NULL,
name = NULL,
type = NULL,
unit = NULL,
initial_value = NULL,
initial_expression = NULL,
expression = NULL,
data = NULL,
model = getCurrentModel()
)
Identify which global quantity to edit by specifying it's key, as string. Also supports fragments of keys, if uniquely matching one global quantity.
Name to set, as string.
Type ("fixed", "assignment", "ode") to set, as string.
Unit to set, as string.
Initial value to set, as numeric.
Initial expression to set, as string, finite numeric, or logical.
Expression to set, as string, finite numeric, or logical.
A data frame as given by getGlobalQuantities
which will be applied before the other arguments.
A model object.
Use the key
argument to specify which global quantity 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.
getGlobalQuantities
getGlobalQuantityReferences
Other global quantity functions:
deleteGlobalQuantity()
,
entity_finders
,
getGlobalQuantities()
,
getGlobalQuantityReferences()
,
newGlobalQuantity()