Skip to content

An ODE model example

########## NAME
Glucose
########## METADATA
time_unit = s
########## MACROS
########## STATES
d/dt(GLUC) = UPTAKE - CLEARANCE
d/dt(TEST) = 0
TEST(0) = 0
GLUC(0) = 10
########## PARAMETERS
k1 = 1
k2 = 1
k3 = 1
########## VARIABLES
UPTAKE = k1*INS
tmp = k3*UPTAKE
CLEARANCE = k2*GLUC
########## FUNCTIONS
########## EVENTS
E1 = GLUC < 3,k1,1,TEST,10
E2 = GLUC < 1.5,TEST,-10
########## OUTPUTS
INS_UPTAKE = tmp
########## INPUTS
INS = 1*INSULIN
########## FEATURES
GLUCOSE = GLUC # g/ml
TEST = TEST