Page 1 of 1

vensim function

Posted: Mon Feb 12, 2018 12:00 pm
by eddypra
Dear vensim forum,

Hi, I'm a newbie in systems dynamic & vensim. I've downloaded vensim PLE for
creating a very simple model. I need a (integer) variabel that (automatically) varies (increment) 0,1,2,3,...10
along with the initial time (from 0) to final time (100) with step of 1.

step : 0, 1, 2, 3, 4, 5, 6, 7,....., 100
output function: 0, 1, 2, 3, 4, 5, 6, 7,....., 100

I want to know if vensim has the function for that?

Thank for your help.

Regards,

Eddy

Re: vensim function

Posted: Mon Feb 12, 2018 1:29 pm
by Administrator
There is an INTEGER function, does that do what you need?

Or simply use the variable "time".

Re: vensim function

Posted: Mon Feb 12, 2018 2:39 pm
by tomfid
Create a stock, with inflow 1/TIME STEP?

Re: vensim function

Posted: Mon Feb 12, 2018 2:41 pm
by tomfid
Or just use INTEGER(Time).

However, you should avoid creating something that's tied to a particular time step. http://metasd.com/2017/11/discrete-time-stinks/

Re: vensim function

Posted: Tue Feb 13, 2018 4:36 am
by eddypra
Thank to all the reply. I've just found the answer.
The answer is giving a variabel and let the equation -->TIME BASE (0,1)

Re: vensim function

Posted: Tue Feb 13, 2018 5:17 am
by tomfid
x=TIME BASE(0,1)

is the same as

x = Time

when INITIAL TIME=0 and TIME STEP=1.