Page 1 of 1

Selective reporting of values in two dimensional arrays

Posted: Tue Jun 02, 2015 2:34 pm
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?

Re: Selective reporting of values in two dimensional arrays

Posted: Wed Jun 03, 2015 7:40 am
by Administrator
I cannot think of a way of doing it so I'll raise it as a future enhancement.

Re: Selective reporting of values in two dimensional arrays

Posted: Wed Jun 03, 2015 7:56 am
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