| 4 | using pyvrp::search::SwapRoutes; |
| 5 | |
| 6 | Cost SwapRoutes::evaluate(Route *U, |
| 7 | Route *V, |
| 8 | CostEvaluator const &costEvaluator) |
| 9 | { |
| 10 | stats_.numEvaluations++; |
| 11 | |
| 12 | if (U == V || U->vehicleType() == V->vehicleType()) |
| 13 | return 0; |
| 14 | |
| 15 | // Evaluate swapping the routes after the two depots. |
| 16 | return op.evaluate((*U)[0], (*V)[0], costEvaluator); |
| 17 | } |
| 18 | |
| 19 | void SwapRoutes::apply(Route *U, Route *V) const |
| 20 | { |