Bolus#

class pharmpy.Bolus(amount)[source]#

Bases: Dose

A Bolus dose

Parameters:

amount (symbol) – Symbolic amount of dose

Examples

>>> from pharmpy import Bolus
>>> dose = Bolus.create("AMT")
>>> dose
Bolus(AMT)

Attributes Summary

amount

Symbolic amount of dose

free_symbols

Get set of all free symbols in the dose

Methods Summary

create(amount)

subs(substitutions)

Substitute expressions or symbols in dose

Attributes Documentation

amount#

Symbolic amount of dose

free_symbols#

Get set of all free symbols in the dose

Examples

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

Methods Documentation

classmethod create(amount)[source]#
subs(substitutions)[source]#

Substitute expressions or symbols in dose

Parameters:

substitutions (dict) – Dictionary of from, to pairs

Examples

>>> from pharmpy import Bolus
>>> dose = Bolus.create("AMT")
>>> dose.subs({'AMT': 'DOSE'})
Bolus(DOSE)