Bolus#

class pharmpy.model.Bolus(amount, admid=1)[source]#

Bases: Dose, Immutable

A Bolus dose

Parameters:
  • amount (symbol) – Symbolic amount of dose

  • admid (int) – Administration ID

Examples

>>> from pharmpy.model import Bolus
>>> dose = Bolus.create("AMT")
>>> dose
Bolus(AMT, admid=1)

Attributes Summary

amount

Symbolic amount of dose

free_symbols

Get set of all free symbols in the dose

Methods Summary

create(amount[, admid])

from_dict(d)

replace(**kwargs)

subs(substitutions)

Substitute expressions or symbols in dose

to_dict()

Attributes Documentation

amount#

Symbolic amount of dose

free_symbols#

Get set of all free symbols in the dose

Examples

>>> from pharmpy.model import Bolus
>>> dose = Bolus.create("AMT")
>>> dose.free_symbols
{AMT}

Methods Documentation

classmethod create(amount, admid=1)[source]#
classmethod from_dict(d)[source]#
replace(**kwargs)[source]#
subs(substitutions)[source]#

Substitute expressions or symbols in dose

Parameters:

substitutions (dict) – Dictionary of from, to pairs

Examples

>>> from pharmpy.model import Bolus
>>> dose = Bolus.create("AMT")
>>> dose.subs({'AMT': 'DOSE'})
Bolus(DOSE, admid=1)
to_dict()[source]#