Selective reporting of values in two dimensional arrays

Use this forum to post Vensim related questions.
Post Reply
John Swanson
Member
Posts: 23
Joined: Mon Jan 10, 2005 12:39 pm

Selective reporting of values in two dimensional arrays

Post by John Swanson »

I've got a large model that includes lots of arrays describing travel volumes between pairs of locations, or zones. There is a subscript called zones, which lists all the zone names, plus two others, called livezone and workzone, which are both equivalenced to zones. This means I can refer, in the model, to things like trips(livezone, workzone), and it's clear that the calculations have to work for each pair of origin and destination zone (whereas trips(zone,zone) would always have the same original and destination) . I've never worked out how to get the model to report values for different livezone and workzone values, like Trips(London, Leeds), because the subscript control menu only allows me to select values for the main subscript, zones. So I can see trips(London,London), and Trips(leeds,leeds). I can select London and Leeds in the subscript control, and then it will report all the London/leeds combinations, but that's messy when all I want is one of them. How can I do this?
Administrator
Super Administrator
Posts: 4611
Joined: Wed Mar 05, 2003 3:10 am

Re: Selective reporting of values in two dimensional arrays

Post by Administrator »

I cannot think of a way of doing it so I'll raise it as a future enhancement.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
LAUJJL
Senior Member
Posts: 1432
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Selective reporting of values in two dimensional arrays

Post by LAUJJL »

Hi

example joined.

When you define the variable time to travel ... in the model you first define it clicking on it and goind to edit, set subscripts with a first subscript towns and second subscritp towns again, because the equivalence subscripts are not available when you set subscripts for a variable, but when you define the equation for that same variable, you must change the subscript towns in the equation editor to living town and working town and it works.

Regards.

JJ
Attachments
zones.mdl
(1.31 KiB) Downloaded 215 times
Post Reply