vensim function

Use this forum to post Vensim related questions.
Post Reply
eddypra
Junior Member
Posts: 2
Joined: Mon Feb 12, 2018 9:15 am
Vensim version: PLE

vensim function

Post 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
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: vensim function

Post by Administrator »

There is an INTEGER function, does that do what you need?

Or simply use the variable "time".
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: vensim function

Post by tomfid »

Create a stock, with inflow 1/TIME STEP?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: vensim function

Post 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/
eddypra
Junior Member
Posts: 2
Joined: Mon Feb 12, 2018 9:15 am
Vensim version: PLE

Re: vensim function

Post 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)
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: vensim function

Post by tomfid »

x=TIME BASE(0,1)

is the same as

x = Time

when INITIAL TIME=0 and TIME STEP=1.
Post Reply