Save intermediate sums of states and parameters so that they can be used as factors in rate expressions and retured as part of the simulation history.

add_state_param_sum(model, sum_name, summands)

Arguments

model

flexmodel object

sum_name

name of sum of state variables and parameters

summands

character vector of regular expressions for identifying state variables and parameters to sum together. See avail_for_sum for a function that will return all names that these regular expressions will search through.

Value

updated flexmodel