set_upper_bounds#

pharmpy.modeling.set_upper_bounds(model, bounds, strict=True)[source]#

Set parameter upper bounds

Parameters:
  • model (Model) – Pharmpy model

  • bounds (dict) – A dictionary of parameter bounds for parameters to change

  • strict (bool) – Whether all parameters in input need to exist in the model. Default is True

Returns:

Model – Pharmpy model object

Examples

>>> from pharmpy.modeling import load_example_model, set_upper_bounds
>>> model = load_example_model("pheno")
>>> model = set_upper_bounds(model, {'POP_CL': 10})
>>> model.parameters['POP_CL']
Parameter("POP_CL", 0.00469307, lower=0.0, upper=10, fix=False)

See also

set_lower_bounds

Set parameter lower bounds

unconstrain_parameters

Remove all constraints of parameters