IBM ILOG Dispatcher User's Manual > The Basics > Adding Visit Disjunctions > Solve > Define the removeVisitAndResolve function |
Define the removeVisitAndResolve function |
INDEX
![]() |
To remove that same new visit from the solution, you use the function removeVisitAndResolve
. This function uses IloRoutingSolution::remove
to directly remove the new visit to the solution. You then restore the solution.
Add the following code after the comment //Remove the visit and resolve
IloBool RoutingSolver::removeVisitAndResolve (IloVisit visit) { _solution.remove(visit); if (_solver.solve(_restoreSolution)) return IloTrue; else return IloFalse; } |
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |