IBM ILOG Dispatcher User's Manual > The Basics > IBM ILOG Dispatcher Concepts > Model > Basic Modeling Objects |
Basic Modeling Objects |
INDEX
![]() |
Dispatcher models include the following basic objects: nodes, visits, and vehicles.
Routing problems have a geometric component: the visits must be performed at specific physical locations.
Dispatcher represents these physical locations as nodes. These nodes are then used to compute distances and times (and subsequently cost) between customers and depots.
Theoretically, a node represents an intersection of roads or some other place where a vehicle can stop, such as the buildings--factories, offices, houses, and so on--where visits are made. Nodes can be depots (where the vehicles pick up the goods to be delivered) or customer locations (where the goods or services are delivered). A node may be defined by coordinates that give its location.
The following code shows how to create a node at coordinates x and y.
IloEnv env; IloModel mdl(env); IloNum x=4, y=-5; IloNode node(env, x, y); |
Note |
For more information on the classes and functions in the example code, see Chapter 2, Modeling a Vehicle Routing Problem and Chapter 3, Solving a Vehicle Routing Problem. You can also refer to the IBM ILOG Dispatcher Reference Manual. |
A visit represents an activity that the vehicle has to perform. A visit occurs at a single node or at a single arc (composed of two nodes), and it is performed by only one vehicle. You can create many different visits at the same node.
The following code shows how to create a visit associated with a customer node.
IloEnv env; IloModel mdl(env); IloNode node(env); IloVisit visit(node); mdl.add(visit); |
Visits have quantities, which can be weights, volumes, numbers of objects, and so on. These quantities represent the amount of a good picked up or dropped off by the vehicle at the visit.
Vehicles are resources that convey goods from one visit to another. A vehicle has a start and an end visit and can have variable start and end times associated with those visits. In Dispatcher, a vehicle can be created without start and end visits; this means the vehicle starts and ends at a "dummy" node which is at distance 0 of all the other nodes.
The following code shows how to create a vehicle associated with the locations where it must start and end its route.
IloEnv env; IloModel mdl(env); IloNode depot(env); IloVisit startVisit(depot); IloVisit endVisit(depot); IloVehicle vehicle(startVisit, endVisit); mdl.add(vehicle); |
Vehicles can be given capacities. These capacities represent the total quantity the vehicle can carry. Capacity, like quantity, can be a weight, volume, number of objects, and so on.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |