Time Step

Use this forum to post Vensim related questions.
Post Reply
krintas
Junior Member
Posts: 2
Joined: Thu Mar 25, 2004 12:49 pm

Time Step

Post by krintas »

The attached model has a very simple Level-Rate-Level structure.
We start with 1m cranberies. The Daily Cranbery Collection rate is based on the level (in fact it is equal to the level - therefore expecting everything to be collected in one day). The last level is the number of collected cranberies.
Everything works OK until you change the Time Step. If you change it to 0.5 then 500k are collected at time 0.5 (as expected) but only an extra 250k at time 1 rather than the 500k. Why?
Attachments
Test.mdl
(1.78 KiB) Downloaded 435 times
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

It's easy. At time 0.5 there are 500K cranberries in the first level. Since you made the flow dependant of the amount in the level a new speed is calculated. 500K/1 day. If you would further refine the time step, the process would slow down even further.

What you want is a constant rate at which the cranberries are collected. Make an initial value for the amount of cranberries in the level.

Initial cranberies = 1e6
~Cranberies
~
|
Cranberies = Integ(-Daily Cranberry Rate, Initial Cranberies)
~Cranberies
~
|

You would have to watch out with the rate this time. Since with a constant rate the level of cranberries would become negative. The solution for this is the following:
Daily Cranbery Collection Rate=
Min(Initial Cranberies/oneday. Cranberies/Time Step)
~ Cranberies/Day
~ |

Hope this helps to solve your problem.

Jeroen
Post Reply