User Tools

Site Tools


mapped_index_list

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:

AnimalsDiet
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, Ecolego will automatically use values corresponding to the mapping.

See also

mapped_index_list.txt · Last modified: 2019/11/18 13:34 (external edit)