Page 1 of 1
interacting delays
Posted: Tue Apr 15, 2008 7:43 am
by Tina
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 delay
Posted: Tue Apr 15, 2008 8:52 am
by LAUJJL
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]
Posted: Tue Apr 15, 2008 11:29 am
by bob@vensim.com
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.
Posted: Tue Apr 15, 2008 1:56 pm
by Tina
I'll try it and let you know! Thank you!!
Posted: Tue Apr 15, 2008 2:05 pm
by Tina
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...
Posted: Tue Apr 15, 2008 8:34 pm
by grockson
Thanks so much, I will work around it and keep in touch.
My Vensim PLE is geeting interesting (with some fun)
Posted: Thu Apr 17, 2008 11:11 am
by Tina
Hello,
Bob & Laujjl: I'll formulate the second delay as a function of the first one through an impact by using a lookup. I had to exclude other possibilities including the one which sounded the easiest, as you suggested Bob, also because the sum of the two delays is not constant...
Appropriate VENSIM TOOL for Post-Graduate and PhD STUDENT RE
Posted: Thu Apr 17, 2008 11:53 pm
by grockson
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
Posted: Fri Apr 18, 2008 11:48 am
by bob@vensim.com
We recommend Vensim PLE for teaching. For research Vensim Professional is usually appropriate, though many find PLE Plus sufficient for their needs. If you want to work on alternative interfaces or extending functionality Vensim DSS is needed.
Posted: Tue Apr 22, 2008 2:30 pm
by grockson
Thanks you, I will pass this information
on.
Posted: Fri May 09, 2008 3:11 pm
by grockson
I having a problem with unit check on a differential equation i am trying to test.
How do I post the diagram for you to see what I have been about.