Table of Contents
Mapped index list
The indices of a mapped index lists are mapped to another index list, and make it possible to create categories of indices. A typical example in the world of radio physics is the mapping of isotopes to elements.
Example
Assume you have created an index list for different types of Animals. This index list is used when calculating the life expectancy of different animals, and means that your model contains a long list of complicated expressions that are using it.
Animals |
---|
Lion |
Lamb |
Cow |
Python |
Pike |
One of the essential factors in life expectancy prediction is the digestion parameter. The parameter can be approximated to be the same for all carnivores, and the same for all herbivores.
Rather than using the Animals index list for the parameter, which would mean having to enter the same value in many places, you can create a new index list named Diet:
Diet |
---|
herbivore |
carnivore |
The list can then be mapped to the Animals index list as such:
Animals | Diet |
---|---|
Lion | carnivore |
Lamb | herbivore |
Cow | herbivore |
Python | carnivore |
Pike | carnivore |
The digestion parameter can now be assigned the Diet index list. When the parameter is used by an expression which is vectorized using the Animals index list, AFRY Intelligent Scenario Modelling will automatically use values corresponding to the mapping.