IBM ILOG Dispatcher User's Manual > The Basics > Minimizing the Number of Vehicles > Model > Define the RoutingModel constructor |
Define the RoutingModel constructor |
INDEX
![]() |
The constructor is defined as in Chapter 2, Modeling a Vehicle Routing Problem, except that it also allows you to specify the names of the input files relating to the road network graph. If you do not specify input files, the defaults will be used. In addition to files with node, vehicle, and visit data, as in Chapter 2, Modeling a Vehicle Routing Problem, this constructor loads information from an arc file, a turn file, and a node coordinates file. The arc file contains the arc name, the "from" graph node, the "to" graph node, the time to traverse the arc, and the distance between the two graph nodes that define the arc. The turn file contains two arcs and the time penalty associated with the turn between the two arcs. For example, a left turn may take longer than a right turn at certain intersections. By default, all turns are permitted with no penalty. The node coordinates file contains the name of a graph node and its x and y coordinates. It is used to associate a graph node and an IloNode
representing a visit location.
This constructor will be called from the main
function. It calls the following functions: addDimensions
, loadGraphInformation
, createIloNodes
, createVehicles
, and createVisits
.
The following code is provided for you:
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |