IBM ILOG Dispatcher User's Manual > The Basics > Adding Visit Disjunctions > Solve > Define the addNewVisit function |
Define the addNewVisit function |
INDEX
![]() |
Once new visits have been added to an existing routing plan using the function createAdditionalVisits
, they can be inserted into the existing solution using the function addNewVisit
. This function uses IloRoutingSolution::add
to directly add the new visit to the solution. When it is added, its saved state is unperformed. To make the visit performed, you create a goal using IloInsertVisit
, which eliminates the need to recompute the routing plan from scratch. If the visit cannot be inserted in the solution, the goal fails. If the visit is inserted, the new solution is stored.
Add the following code after the comment //Add a new visit
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |