set_zero_order_input#

pharmpy.modeling.set_zero_order_input(model, compartment, expression)[source]#

Set a zero order input for the ode system

If the zero order input is already set it will be updated.

Parameters:
  • model (Model) – Pharmpy model

  • compartment (str) – Name of the compartment

  • expression (Union[str, Expr]) – The expression of the zero order input

Returns:

model – Pharmpy model object

Examples

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> model = set_zero_order_input(model, "CENTRAL", 10)
>>> get_zero_order_inputs(model)
[10]