Dispatcher provides an open framework to define custom first solution heuristics. A first solution heuristic builds a routing plan by assigning visits (or groups of visits) to vehicles. It does so by considering elementary decisions, and either rejecting them as infeasible, or committing them into the solution that is being built.
To show how to use the Dispatcher First Solution Framework to create your own first solution heuristic, you will solve a PDP problem. Except for creating and using the first solution framework goal, you will model and solve this problem in the same way as shown in Lesson 7, Pickup and Delivery Problems. Only the changed parts of the example are shown in this section. You can view the complete program online in the YourDispatcherHome/examples/src/fsframepdp.cpp
file.
Note |
This example is designed to show how to use the Dispatcher First Solution Framework. It is not intended to scale for use with problems that have large numbers of vehicles or orders.
|
You will perform the following steps to create a first solution framework goal:
-
Create a decision class
PDPDecision
with four member functions: make
, evaluate
, calcFeasibility
, and display
.
-
Create a decision maker class
PDPDecisionMakerI
with three member functions: init
, getBestDecision
, and getBestSerialDecision
. This class will use the decision class PDPDecision
.
-
Create a decision tracer class
PDPDecisionTracerI
.
-
Create the first solution goal
IloPDPFSGoal
.