Hello,
I am Taskia.
I am facing a problem. I am developing a model where I want to get only the final value of a stock variable to another variable. I used the 'CUMULATEF' function for this purpose, but it shows 'no data'. Please give me some suggestions on how can I solve the problem.
For understanding, I have uploaded a sample model.
I am using DSS version of Vensim.
Thank you.
Taskia
Getting the final value of a stock to another variable
Getting the final value of a stock to another variable
- Attachments
-
- example.mdl
- (2.43 KiB) Downloaded 171 times
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Getting the final value of a stock to another variable
You can use
arrived tasks at final time = IF THEN ELSE ( time = FINAL TIME , arrived tasks , 0 )
arrived tasks at final time = IF THEN ELSE ( time = FINAL TIME , arrived tasks , 0 )
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: Getting the final value of a stock to another variable
Thank you for your reply.
Another issue is that if I want to use the value of 'arrived tasks at final time' as the initial value for another stock, it remains zero because the final value of 'arrived task' is shown at FINAL TIME. In this case, how can I use this value to other stock's initial value?
Please give me a suggestion about this.
Thank you.
Taskia
Another issue is that if I want to use the value of 'arrived tasks at final time' as the initial value for another stock, it remains zero because the final value of 'arrived task' is shown at FINAL TIME. In this case, how can I use this value to other stock's initial value?
Please give me a suggestion about this.
Thank you.
Taskia
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Getting the final value of a stock to another variable
All you can do is run the simulation to get the value at FINAL TIME. Then use that value to initialize the other level and run the simulation again.
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: Getting the final value of a stock to another variable
Thank you very much.
Re: Getting the final value of a stock to another variable
More importantly, using the value of a variable at FINAL TIME to set the value of another stock at INITIAL TIME is acausal, i.e. it implies effect preceding cause. You can't do that in Vensim by design, because no one really knows the future.
/*
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
*/