Page 1 of 1
How can I work with vectors or arrays in Vensim?
Posted: Sat Apr 16, 2005 9:10 am
by slanefic
Hi, I want to work with different values for every month in the flow into the level variable.
Can I use vectors or arrays??
How can I do it?
thank you very much
variable inflows into an array
Posted: Sat Apr 16, 2005 9:43 am
by LAUJJL
Hi
Here is joined an example
Regards.
J.J. Laublé
Posted: Sat Apr 16, 2005 11:21 am
by bob@vensim.com
JJ provided an example that allows you to switch between different constants - however, from your query you might be after something simpler. Every flow in Vensim changes over time. The equation
population=INTEG(births,100)
births=population*.05
means that population starts at 100, and births at 5. The next period population will be 105 and births 5.25 - then 110.25/5.5 and so on. Everything is always changing - time is effectively an implicit subscript in all models.
problems with model
Posted: Mon Apr 18, 2005 2:14 pm
by slanefic
I can´t open the model, I have Vensim Ple (students version).
The error says "Model has subscripts or uses an unsupported function. Not opened "
What can I do?
Thank you very much
Reply arrays in a flow
Posted: Mon Apr 18, 2005 3:36 pm
by LAUJJL
Hi
Arrays or vectors are not implemented in Vensim PLE.
You must then use Bob's solution where you make the rate dependant from other auxiliaries and will change with the time.
Regards.
J.J. Laublé