1

I am making a simple model in Vensim. the model consists of a stock and an out-flow variable:

stock: equations = INTEG (-"out-flow"), initial value: 2.5

out-flow: equations = IF THEN ELSE( stock>0, MIN(stock, 1), 0)

simulation runs for 5 years (initial time = 0 and final time = 5) and the unit of time is year. I need to do the simulation 64 times every year, therefore the time step is set to “0.015625”. the result I get with this time step is not logical and is not what I expect but the desired result is obtained by setting "time step = 1".

as mentioned earlier the simulation needs to run 64 times every year and simulation with time step = 1 is of no use to me. how can I solve this problem? thanks in advance.

ehsun
  • 137
  • 9

1 Answers1

1

To do that you can transform your units of years into days, rounding off the days of the TIME STEP.

Units for Time = Year, INITIAL TIME = 0, FINAL TIME = 5, TIME STEP = 1

IF THEN ELSE( stock > 0, MIN(stock, 1), 0)

before

after transformation

Units for Time = Day, INITIAL TIME = 0, FINAL TIME = 1825, TIME STEP = 6

IF THEN ELSE( stock/365 > 0, MIN(stock/365, 1/365), 0)

after

claudius
  • 747
  • 1
  • 10
  • 24