Using Time Steps

Use this forum to post Vensim related questions.
Post Reply
grayven87
Junior Member
Posts: 15
Joined: Wed Apr 17, 2019 3:54 pm
Vensim version: PLE

Using Time Steps

Post by grayven87 »

Hi everyone

A homework model in vensim that I have starts from a variable no.1 that depends on the value of variable no.2, but variable no.2 only has an initial value and after each run time, a new value is measured for it.I unfortunately have problems running the model.

My questions are:
Is it even possible to define variables like this?
Is it possible in Vensim to start the simulation of a model from a specific variable?
How can I add a time step for the variables?
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Re: Using Time Steps

Post by tomfid »

Not following this ... if variable #2 only has an initial value, how can new values be measured?
grayven87
Junior Member
Posts: 15
Joined: Wed Apr 17, 2019 3:54 pm
Vensim version: PLE

Re: Using Time Steps

Post by grayven87 »

tomfid wrote: Fri Apr 26, 2019 1:50 pm Not following this ... if variable #2 only has an initial value, how can new values be measured?
My aim is for variable no.2 to have an initial value just for the first time the model is run, other then that I want it to have a function that is defined and is depended on variable no.1.
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Using Time Steps

Post by Administrator »

You'll need to do this manually if you are using PLE. Run the model, get the value for variable 2 and change variable 1 to this.
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: 3808
Joined: Wed May 24, 2006 4:54 am

Re: Using Time Steps

Post by tomfid »

How about:

Is First Run = 0 ~ dmnl ~ switch indicating whether or not this is a first run
Defined value var 1 = ... ~ something
Initial var 2 = ... ~ something
Var 2 = IF THEN ELSE( is first run, Initial var 2, functionOf(Defined value var 1) )

If you tell us something about the problem you're trying to model we can often identify a better solution.
grayven87
Junior Member
Posts: 15
Joined: Wed Apr 17, 2019 3:54 pm
Vensim version: PLE

Re: Using Time Steps

Post by grayven87 »

tomfid wrote: Mon Apr 29, 2019 2:42 pm How about:

Is First Run = 0 ~ dmnl ~ switch indicating whether or not this is a first run
Defined value var 1 = ... ~ something
Initial var 2 = ... ~ something
Var 2 = IF THEN ELSE( is first run, Initial var 2, functionOf(Defined value var 1) )

If you tell us something about the problem you're trying to model we can often identify a better solution.
Thanks for the reply!

I am trying to model an office's working system and to do that, one of the variables is the availability of staff for the night shift.I want to say that this number depends on various variables but the initial value is 1.
I want to use the suggestion you stated, but I couldn't understand the first part.Could you explain a little more about the function that I should use for the "is first run" part?
Post Reply