get_initial_conditions#

pharmpy.modeling.get_initial_conditions(model, dosing=False)[source]#

Get initial conditions for the ode system

Default initial conditions at t=0 for amounts is 0

Parameters:
  • model (Model) – Pharmpy model

  • dosing (bool) – Set to True to add dosing as initial conditions

Returns:

dict – Initial conditions

Examples

>>> from pharmpy.modeling import get_initial_conditions, load_example_model
>>> model = load_example_model("pheno")
>>> get_initial_conditions(model)
{A_CENTRAL(0): 0}
>>> get_initial_conditions(model, dosing=True)
{A_CENTRAL(0): AMT}