subscript equivalence

Use this forum to post Vensim related questions.
Post Reply
jvalant
Junior Member
Posts: 4
Joined: Fri Oct 05, 2007 4:08 pm

subscript equivalence

Post by jvalant »

I’m using version 5.7 of the software.

I have set up and equivalence (Drug,toDrug) and I have a variable called switch grid which is arrayed by two subscripts Drug, and its equivalence toDrug. When I sum across or down I get the expected answer. However, when I multiply this variable by any constant I get "0" for the answer across all dimensions. Also, when I normalize this variable in another variable I also get "0" values in each subscripted output. Any idea as to what is causing this?
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Can you post a sample model?
jvalant
Junior Member
Posts: 4
Joined: Fri Oct 05, 2007 4:08 pm

subscript equivalence

Post by jvalant »

Yes
Attachments
experiment.mdl
(2.2 KiB) Downloaded 339 times
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Try the attached model. Just needed to change some of the equations so that they had both [drug,todrug] instead of [drug,drug].

For example,
switch grid numbers[drug,todrug] = CONSTANT*SWITCH GRID[drug,drug]
was being calculated as

switch grid numbers[A,todrug] = CONSTANT*SWITCH GRID[A,A]
switch grid numbers[B,todrug] = CONSTANT*SWITCH GRID[B,B]
switch grid numbers[C,todrug] = CONSTANT*SWITCH GRID[C,C]

You need to include todrug on the right hand side of the equation to pick up the correct subscripts.

Hope this makes sense.

Tony.

[Edited on 17-10-2007 by Administrator]
Attachments
experiment_01.mdl
(2.21 KiB) Downloaded 314 times
jvalant
Junior Member
Posts: 4
Joined: Fri Oct 05, 2007 4:08 pm

subscript equivalence

Post by jvalant »

Thanks for your help!
Post Reply