How can I work with vectors or arrays in Vensim?

Use this forum to post Vensim related questions.
Post Reply
slanefic
Junior Member
Posts: 12
Joined: Sun Mar 20, 2005 2:07 pm

How can I work with vectors or arrays in Vensim?

Post 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
LAUJJL
Senior Member
Posts: 1426
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

variable inflows into an array

Post by LAUJJL »

Hi

Here is joined an example
Regards.
J.J. Laublé
Attachments
array.mdl
(1.99 KiB) Downloaded 552 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
slanefic
Junior Member
Posts: 12
Joined: Sun Mar 20, 2005 2:07 pm

problems with model

Post 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
LAUJJL
Senior Member
Posts: 1426
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Reply arrays in a flow

Post 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é
Post Reply