IBM ILOG Dispatcher User's Manual > The Basics > Multiple Tours per Vehicle > Solve > Define the insertCustomerVisits function |
Define the insertCustomerVisits function |
INDEX
![]() |
You use the insertCustomerVisits
function to add the ordered visits from _orderedVisitArray
to the first solution in the multitour model. As you remember, you already added the return visits to the first solution in the section "Define the insertAllReturnVisits function".
Step 20 - | Add the ordered customer visits to the model |
Add the following code after the comment //Add the ordered customer visits to the model
You insert the visit directly into the first solution by creating a goal using IloInsertVisit
. This function makes visit
performed without the need to recompute the routing plan from scratch. If the visit cannot be inserted, the goal fails. If the visit can be inserted, you use the function IloRoutingSolution::add
to directly add the visit to the solution. The new solution is then stored.
Step 21 - | Insert the ordered customer visits into the first solution |
Add the following code after the comment //Insert the ordered customer visits into the first solution
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |