IBM ILOG Dispatcher User's Manual > Transportation Industry Solutions > Docking Bays: Modeling External Resources > Solve |
Solve |
INDEX
![]() |
The solution is largely computed, improved, and displayed by methods previously presented for the PDP problem, but with two additions. A small section of code is added to iterate through the Scheduler activity, and a Scheduler subgoal is added to instantiate the starting times of the visits.
Step 7 - | Add the activity iteration |
Add the following code after the comment //Add the activity iteration.
IlcScheduler sched(_solver); for (IlcActivityIterator iter(sched); iter.ok(); ++iter) { _solver.out() << *iter << endl; |
This section of the function RoutingSolver::printInformation
iterates through the activity schedule to retrieve solution information for display.
Step 8 - | Add the subgoals |
Add the following code after the comment //Add the subgoals.
The predefined Scheduler subgoal IloSetTimesForward
instantiates the activity variables, which via propagation, in turn instantiates the time variables of the visits. It is necessary to do this to make certain that the current solution is feasible.
Step 9 - | Compile and run the program |
The solution improvement phase finds a solution using 6 vehicles with a cost of 1432.17 units:
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |