Page 1 of 1

Using Time Steps

Posted: Fri Apr 26, 2019 12:02 pm
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?

Re: Using Time Steps

Posted: Fri Apr 26, 2019 1:50 pm
by tomfid
Not following this ... if variable #2 only has an initial value, how can new values be measured?

Re: Using Time Steps

Posted: Sun Apr 28, 2019 9:57 am
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.

Re: Using Time Steps

Posted: Mon Apr 29, 2019 8:28 am
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.

Re: Using Time Steps

Posted: Mon Apr 29, 2019 2:42 pm
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.

Re: Using Time Steps

Posted: Tue Apr 30, 2019 8:55 am
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?