Hello,
I'm new around and I would really appreciate if you could help me. How can I model a delay depending on another one(for two different stocks)? This means the longer Delay1 is, the shorter Delay2 is...
Thank you!!
interacting delays
interacting delay
Hi
You must express the duration of the second delay as a function of the duration of the first delay, with a lookup function for instance. If you want to take into consideration the stock of the stuff delayed in the first delay influencing the second duration, it is possible too but it may generate a tricky dynamic.
Be careful as it needs to modify the duration dynamically and you cannot use function like delay fixed. You must study too closely how the delays function works if you modify the duration and it is tricky if the delay is discreet.
There is normally no problem if the delay is continuous and you can easily modify the delay dynamically.
You can too explain what you are trying to do, as making a delay depends on another delay is not necessarily the best way to represent your problem.
Regards.
JJ
[Edited on 15-4-2008 by LAUJJL]
You must express the duration of the second delay as a function of the duration of the first delay, with a lookup function for instance. If you want to take into consideration the stock of the stuff delayed in the first delay influencing the second duration, it is possible too but it may generate a tricky dynamic.
Be careful as it needs to modify the duration dynamically and you cannot use function like delay fixed. You must study too closely how the delays function works if you modify the duration and it is tricky if the delay is discreet.
There is normally no problem if the delay is continuous and you can easily modify the delay dynamically.
You can too explain what you are trying to do, as making a delay depends on another delay is not necessarily the best way to represent your problem.
Regards.
JJ
[Edited on 15-4-2008 by LAUJJL]
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
A simple formulation for this would be:
stock1 = INTEG(inflow - intermediate outflow,init s1)
stock2 = INTEG(intermediate outflow - final outflow,init s2)
final outflow = stock2/delay time 2
intermediate outflow = stock1/delay time 1
delay time 1 = total delay time * fraction delay in step 1
delay time 2 = total delay time * (1 - fraction delay in step 1)
note tht is the fraction is close to 0 or 1 you can get numeric problems.
stock1 = INTEG(inflow - intermediate outflow,init s1)
stock2 = INTEG(intermediate outflow - final outflow,init s2)
final outflow = stock2/delay time 2
intermediate outflow = stock1/delay time 1
delay time 1 = total delay time * fraction delay in step 1
delay time 2 = total delay time * (1 - fraction delay in step 1)
note tht is the fraction is close to 0 or 1 you can get numeric problems.
Laujil, at first I considered using a delay fixed and use instead of a value a fraction of the total time. I don't think this is possible, and it will create the problem you mentioned. I think I'll use something as your formulation Bob. Hope it works! Thanks... and I'll get back if it's not working...
Appropriate VENSIM TOOL for Post-Graduate and PhD STUDENT RE
Bod. What version of Vensim would you recommend for my University, especially for use by PhD and Graduate student and the area of Environmental and Agricultural Engineering.
Thanks
Thanks
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm