set_ode_solver#

pharmpy.modeling.set_ode_solver(model, solver)[source]#

Sets ODE solver to use for model

Recognized solvers and their corresponding NONMEM advans:

Solver

NONMEM ADVAN

CVODES

ADVAN14

DGEAR

ADVAN8

DVERK

ADVAN6

IDA

ADVAN15

LSODA

ADVAN13

LSODI

ADVAN9

Parameters:
  • model (Model) – Pharmpy model

  • solver ({‘CVODES’, ‘DGEAR’, ‘DVERK’, ‘IDA’, ‘LSODA’, ‘LSODI’}) – Solver to use or None for no preference

Returns:

Model – Pharmpy model object

Examples

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> model = set_ode_solver(model, 'LSODA')