########## NAME main_model ########## METADATA time_unit = m ########## MACROS ########## STATES d/dt(glu) = glu_input + dng - uptake d/dt(ins) = ins_prod - ins_clearance glu(0) = 5.0 ins(0) = 0 ########## PARAMETERS k_ins_prod = 0.5 k_ins_clearance = 0.5 dng = 1 ins_prod_flag=0 ########## VARIABLES ins_prod = k_ins_prod*ins_prod_flag ins_clearance = k_ins_clearance * ins uptake = adipose_uptake + muscle_uptake + other_uptake ########## FUNCTIONS ########## EVENTS glu_high_event = glu>5.1, ins_prod_flag, 1 glu_low_event = glu<4.9, ins_prod_flag, 0 ########## OUTPUTS glucose_plasma = glu insulin_plasma = ins ########## INPUTS glu_input = glucose @ 0 adipose_uptake = adipose:uptake @0 muscle_uptake = muscle:uptake @ 0 other_uptake = other:uptake @ 0 ########## FEATURES glucose_plasma = glu insulin_plasma = ins