IBM ILOG Dispatcher User's Manual > The Basics > Multiple Tours per Vehicle > Model > Define the addDimensions function |
Define the addDimensions function |
INDEX
![]() |
The member function addDimensions
is used to create the two dimensions, _weight
and _distance
, and add them to the model. The _weight
dimension is defined as in Chapter 2, Modeling a Vehicle Routing Problem. The _distance
dimension is computed using the shortest path from the road network graph, as in Chapter 4, Minimizing the Number of Vehicles. This code is provided for you:
In this example, you could also use the predefined distance functions IloEuclidean
or IloManhattan
or define your own distance function.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |