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?
Using Time Steps
Re: Using Time Steps
Not following this ... if variable #2 only has an initial value, how can new values be measured?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Using Time Steps
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.
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: Using Time Steps
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Using Time Steps
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.
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.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Using Time Steps
Thanks for the reply!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.
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?