Subscripts

Use this forum to post Vensim related questions.
Post Reply
pochoa
Junior Member
Posts: 8
Joined: Mon Mar 15, 2004 1:54 pm

Subscripts

Post by pochoa »

I am trying to create a vector for grouping some variables. I think I can use the Subscript function but my problem is that I need to use variables, and not contants, as the arguments of the subscripted variable.
Following the example on the users guide (Ch 17), my problem is as follows:
We have a subscript Task, so
Task: design, prototype, build
then we have a variable in which we use the subscript
task size[task]=180, 250,500 => here I need to use variables, no constants like 180, because the value I need to use here is changing on every simulation step. What I need is something like:
Task Size[Task]= Size1, Size2, Size3, where Size1, Size2 and Size3 are variables in my model.
thanks for your help
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

The solution I use, is multiple equations.
In the equation editor you can click on a button called "Add Eq" (Top Right). Now it is possible to set the needed variable for each subscript e.g
Task size[design] = size1
Task size[prototype] = size2
Task size[build]=size3

Another sollution would be to see if more variables can be subscripted, like
Task size [task] = size [Task]
Size can depent on other subscripted variables etc.

I hope this answers your question, if there is a more convenient way, I would love to hear it.

Jeroen
pochoa
Junior Member
Posts: 8
Joined: Mon Mar 15, 2004 1:54 pm

Post by pochoa »

Thanks Jeroen
It works
Post Reply