Define how the rate of flow from one compartment to another depends on parameters, state variables, .

add_rate(model, from, to, formula)

Arguments

model

flexmodel object

from

Name of state from which flow is coming

to

Name of state to which flow is going

formula

Model formula defining dependence of the rate on existing variables. See avail_for_rate for a function that will print out the names of variables that are available for use in these formulas.

Value

updated flexmodel with an additional non-zero rate matrix element specified