6.6 Function Indexes

In some cases, when working with indexes you want to have the ability to be able to map certain index elements to elements of another index. In MPL this is done with function indexes.

For example, you are creating a model that schedules trucks to certain routes, but their current location is not where each route starts. Therefore, in the model we create two function indexes. One that maps each truck to the city where they are currently located and the other where we map each route to the city of departure. In MPL this can be formulated as follows:

Now we can create an objective function that minimizes the total distance for each assigned truck route as follows:


Back To Top | Maximal Home Page | Table of Contents | Previous Page | Next Page