remove_peripheral_compartment#
- pharmpy.modeling.remove_peripheral_compartment(model, name=None)[source]#
Remove a peripheral distribution compartment from model
If name is set, a peripheral compartment will be removed from the compartment with the specified name.
Initial estimates:
n
2
, and3
,- Parameters:
model (Model) – Pharmpy model
name (str) – Name of compartment to remove peripheral compartment from.
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> model = set_peripheral_compartments(model, 2) >>> model = remove_peripheral_compartment(model) >>> model.statements.ode_system Bolus(AMT, admid=1) → CENTRAL ┌───────────┐ │PERIPHERAL1│ └───────────┘ ↑ │ Q/V1 Q/V2 │ ↓ ┌───────────┐ │ CENTRAL │──CL/V1→ └───────────┘
See also
set_peripheral_compartment
,add_peripheral_compartment