def po_bolus(simulator, r): """ Oral bolus dose oral dose (single dose, at given start with given dose). Examples are the oral glucose tolerance test (OGTT) or the application of a drug orally, e.g., codeine, midazolam, caffeine or paracetamol. :return: """ # set initial concentration of somatostatin in all blood compartments changes_init = pkpd.init_concentrations_changes(r, 'som', 0E-6) # [0 nmol/L] # oral bolus dose # FIXME: dosing changesets changes_po_bolus = { 'PODOSE_som': 10.0E-6, # [mg] } # simulate tcsims = ensemble( TimecourseSim([ Timecourse(start=0, end=1200, steps=600, changes={ **changes_init, **changes_po_bolus} ) ]), changeset=ChangeSet.parameter_sensitivity_changeset(r, 0.1) ) return simulator.timecourses(tcsims)
def stepped_clamp(simulator, r): changes_init = pkpd.init_concentrations_changes(r, 'som', 0E-6) # [0 nmol/L] tcsims = ensemble( TimecourseSim([ Timecourse(start=0, end=60, steps=120, changes=changes_init), Timecourse(start=0, end=60, steps=120, changes={'Ri_som': 10.0E-6}), # [mg/min], Timecourse(start=0, end=60, steps=120, changes={'Ri_som': 20.0E-6}), # [mg/min], Timecourse(start=0, end=60, steps=120, changes={'Ri_som': 40.0E-6}), # [mg/min], Timecourse(start=0, end=60, steps=120, changes={'Ri_som': 80.0E-6}), # [mg/min], ]), ChangeSet.parameter_sensitivity_changeset(r, 0.1) ) return simulator.timecourses(tcsims)
def mix(simulator, r): """ [5] combination experiments - somatostatin infusion + c-peptide bolus - hyperinsulinemic, euglycemic clamp """ changes_init = pkpd.init_concentrations_changes(r, 'som', 0E-6) # [0 nmol/L] tcsims = ensemble( TimecourseSim([ Timecourse(start=0, end=60, steps=120, changes=changes_init), Timecourse(start=0, end=60, steps=120, changes={'IVDOSE_som': 10.0E-6}), Timecourse(start=0, end=60, steps=240, changes={'Ri_som': 10.0E-6}), # [mg/min], Timecourse(start=0, end=60, steps=120, changes={'Ri_som': 10.0E-6, 'PODOSE_som': 10.0E-4}), Timecourse(start=0, end=120, steps=240, changes={'Ri_som': 0.0}), # [mg/min], ]), ChangeSet.parameter_sensitivity_changeset(r, 0.1)) return simulator.timecourses(tcsims)
def iv_infusion(simulator, r): """ [3] constant infusion (for given period, tstart, tend) - somatostatin infusion - insulin infusion - glucose infusion - glucagon infusion :return: """ changes_init = pkpd.init_concentrations_changes(r, 'som', 0E-6) # [0 nmol/L] tcsims = ensemble( TimecourseSim([ Timecourse(start=0, end=60, steps=120, changes=changes_init), Timecourse(start=0, end=120, steps=240, changes={'Ri_som': 10.0E-6}), # [mg/min], Timecourse(start=0, end=120, steps=240, changes={'Ri_som': 0.0}), # [mg/min], ]), ChangeSet.parameter_sensitivity_changeset(r, 0.1) ) return simulator.timecourses(tcsims)
def clamp(simulator, r): """ clamping of substance (e.g. glucose, tstart, tend) - glucose clamping (euglycemic clamp) - insulin clamping (insulin clamp) :return: """ changes_init = pkpd.init_concentrations_changes(r, 'som', 0E-6) # [0 nmol/L] # FIXME: some bug in the concentrations and assignments tcsims = ensemble( TimecourseSim([ Timecourse(start=0, end=60, steps=120, changes={**changes_init, **{'PODOSE_som': 1E-9}}), Timecourse(start=0, end=120, steps=240, model_changes={'boundary_condition': {"Ave_som": True}}), # clamp venous som Timecourse(start=0, end=120, steps=240, model_changes={'boundary_condition': {"Ave_som": False}}), # release venous som, ]), ChangeSet.parameter_sensitivity_changeset(r, 0.1) ) return simulator.timecourses(tcsims)
def iv_bolus(simulator, r): """ [2] bolus injection (at given time tstart, with given dose and given injection time, e.g. 5-10 min) - c-peptide bolus - ivGTT (glucose bolus) - insulin injection """ changes_init = pkpd.init_concentrations_changes(r, 'som', 0E-6) # [0 nmol/L] changes_iv_bolus = { 'IVDOSE_som': 10E-6, # [mg] } p_changeset = ChangeSet.parameter_sensitivity_changeset(r, 0.1) tcsims = ensemble( TimecourseSim([ Timecourse(start=0, end=1200, steps=600, changes={ **changes_init, **changes_iv_bolus} ) ]), p_changeset) return simulator.timecourses(tcsims)