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

Use this forum to post Vensim related questions.
Post Reply
BrianLE
Junior Member
Posts: 2
Joined: Thu May 22, 2025 6:12 pm
Vensim version: PLE

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

Post 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.
tomfid
Administrator
Posts: 3993
Joined: Wed May 24, 2006 4:54 am

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

Post 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
BrianLE
Junior Member
Posts: 2
Joined: Thu May 22, 2025 6:12 pm
Vensim version: PLE

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

Post by BrianLE »

thank you
Post Reply