Hi there,
Please is there any technique or function I can use to hold the value of a variable such that variable "A" at time T or T+1 will have the value of a variable "B" at that "T" or "T-1" respectively. Many thanks
Olu
function to retain another variable at time T-1
-
- Super Administrator
- Posts: 4845
- Joined: Wed Mar 05, 2003 3:10 am
Re: function to retain another variable at time T-1
Take a look at SAMPLE IF TRUE or DELAY FIXED. One of these should do what you need.
Tony.
Tony.
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: function to retain another variable at time T-1
perhaps mixed it up..I need a function that can perform the opposite of the delay function i.e a function that will let a variable "A" at time T to hve a value of a variable "B" t time T+1
Re: function to retain another variable at time T-1
Vensim (and reality) is causal - that is, no variable can use information about the future.
Can you say more about the reason for this approach?
Can you say more about the reason for this approach?
/*
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: function to retain another variable at time T-1
cheers Tom, in the attache model for example, I need a function that will let variable "y" have values of 0.94, 0.909651...at times t= 1 and 2 ....theoretically i know it isnt right but I need it or some analysis...tnx
- Attachments
-
- example.mdl
- (15.1 KiB) Downloaded 475 times
-
- Super Administrator
- Posts: 4845
- Joined: Wed Mar 05, 2003 3:10 am
Re: function to retain another variable at time T-1
There is no function that can do that. You can try using FORECAST or TREND. Otherwise, you would need to calculate the model a time step in the future.
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: function to retain another variable at time T-1
There is a trick you could do though - cumbersome in general, but feasible in a simple model. Create an auxiliary that calculates the value of the stocks ahead a unit of time (assuming Euler integration):
future bad code = bad code + roc*TIME STEP
Then use can use the "future" stocks to calculate other future variables.
future bad code = bad code + roc*TIME STEP
Then use can use the "future" stocks to calculate other future variables.
/*
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: function to retain another variable at time T-1
cheers Tom!!!should have thought of that
Re: function to retain another variable at time T-1
The other possibility is to just put minus signs in all your integrations, and run the whole model backwards. 

/*
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
*/