Hi..
I am working on Vensim. I need the following requirement. Can you please tell me the procedure to achieve this.
I need to perform some iterations during a single period of time of my model run, in order to calculate a variable value. It is just like "For" loop in C language. Can you please suggest me how to achieve this.
For example: My model runs for a time step of 1 year.
I want to calculate one variable value iteratively, in this 1 year time step for some times. Can you please help me..
Bye..
Need Help...
-
- Super Administrator
- Posts: 4835
- Joined: Wed Mar 05, 2003 3:10 am
iteration in a time step
Hi
One way is to build variables subscripted with the dimension of the subscript approximately equal to the number of iterations expected and to make the variables equal to the values of the variables for each iteration.
joined a simplistic example that computes the limit of 1 / 2N
when N is increasing.
there is a closed loop between auxiliaries without a stock and no error because every time the variable changes its values the subscript changes too.
You need at least Vensim Pro to do this.
Regards.
JJ
One way is to build variables subscripted with the dimension of the subscript approximately equal to the number of iterations expected and to make the variables equal to the values of the variables for each iteration.
joined a simplistic example that computes the limit of 1 / 2N
when N is increasing.
there is a closed loop between auxiliaries without a stock and no error because every time the variable changes its values the subscript changes too.
You need at least Vensim Pro to do this.
Regards.
JJ
- Attachments
-
- iteration.mdl
- (1.5 KiB) Downloaded 362 times