Get subranges?

Use this forum to post Vensim related questions.
Post Reply
linear feedback
Member
Posts: 25
Joined: Tue Sep 16, 2014 2:20 pm
Vensim version: DSS

Get subranges?

Post by linear feedback »

I can use GET SUBSCRIPTS to read in subscripts but how can I add or map subranges to it if the names of subscripts are not known in advance?
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Get subranges?

Post by Administrator »

Can you upload a simple model demonstrating what mapping you need to do? There may be a way to do it.
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
linear feedback
Member
Posts: 25
Joined: Tue Sep 16, 2014 2:20 pm
Vensim version: DSS

Re: Get subranges?

Post by linear feedback »

I'd like to map the subranges in column B to the range in A. Trouble is that the number of elements in the subrange categories can change and should adjust itself to the data sets. Any thoughts?
Attachments
Subrange.xlsx
(8.75 KiB) Downloaded 221 times
subrange.mdl
(1.16 KiB) Downloaded 210 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Get subranges?

Post by Administrator »

Can you work with these files?

Read in the subscripts as before, but create a cross reference matrix. Then use this as a multiplier to convert
Attachments
subrange.mdl
(2.06 KiB) Downloaded 211 times
Subrange.xlsx
(10.95 KiB) Downloaded 218 times
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
linear feedback
Member
Posts: 25
Joined: Tue Sep 16, 2014 2:20 pm
Vensim version: DSS

Re: Get subranges?

Post by linear feedback »

Thank you for your suggestion. As I would be dealing with 700 x 70 items a matrix does get a bit more complex in Excel. I have attached a solution which uses indexed subscripts - as one cannot calculate (especially references) with subscripts in vensim I use variables for doing so. Any thoughts which approach is better?

Is there a way around the necessity to call GET SUBSCRIPT with two fixed cell references? Using a different data set with a different structure requires also changing the model which a user won't like doing.
Attachments
Subrange.xlsx
(11.08 KiB) Downloaded 202 times
subrange v3.mdl
(2.48 KiB) Downloaded 215 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Get subranges?

Post by Administrator »

Is there a way around the necessity to call GET SUBSCRIPT with two fixed cell references? Using a different data set with a different structure requires also changing the model which a user won't like doing.
I'll raise this a feature request.

Regarding which method is better, it's really a matter of personal preference (and ease of understanding).
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
Post Reply