Mapping subscript subranges that are of different sizes?

Use this forum to post Vensim related questions.
Post Reply
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Mapping subscript subranges that are of different sizes?

Post by WayneZhou2009 »

Hi,

Suppose a model is about age cohorts of a population. The age cohorts are from 0 to 100. If subrange A is from 0 to 90, subrange B is from 10 to 60, is possible to somehow "map" subrange B onto the subrange 0 to 50 of subrange A, without having to create a new subrange specifically from 0 to 50?

Thanks a lot.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Mapping subscript subranges that are of different sizes?

Post by Administrator »

You'll need to create the 0-50 subrange if you want to map to 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
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Mapping subscript subranges that are of different sizes?

Post by tomfid »

An alternative for unconstrained mapping is VECTOR ELM MAP. It's easy to use, but also easy to make a mess.

Another option is to create a [from, to] matrix containing the mapping, with 0s and 1s in the relevant locations, and use it with VECTOR SELECT or SUM. The drawback is that this turns an n-dimensional problem into n^2. Often it doesn't matter though.
Post Reply