Page 1 of 1

two constants as input, with a time delay on one constant

Posted: Thu May 22, 2025 6:41 pm
by BrianLE
I have two inputs IV infusion and endogenous glucose production for glucose homeostatis for a type 1 diabetic. How do I delay the input for IV infusion by a certain time period eg 4hours taking into account glucose production is continious? Current model uses = step(("endogenous (mmol/min)"+"IV infusion (mmol/min)"),2). to calculate glucose intake over a 72 hour period.

Re: two constants as input, with a time delay on one constant

Posted: Thu May 22, 2025 7:34 pm
by tomfid
Maybe this?
glucose in = infusion + endogenous
endogenous = STEP( endogenous rate, endogenous start time )
endogenous start time = 2
infusion = STEP( infusion rate, endogenous start time + infusion delay )
infusion delay = 4

Re: two constants as input, with a time delay on one constant

Posted: Thu May 22, 2025 8:21 pm
by BrianLE
thank you