| 237 | } |
| 238 | |
| 239 | void LocalSearch::applyDepotRemovalMove(Route::Node *U, |
| 240 | CostEvaluator const &costEvaluator) |
| 241 | { |
| 242 | if (!U->isReloadDepot()) |
| 243 | return; |
| 244 | |
| 245 | // We remove the depot when that's either better, or neutral. It can be |
| 246 | // neutral if for example it's the same depot visited consecutively, but |
| 247 | // that's then unnecessary. |
| 248 | if (removeCost(U, data, costEvaluator) <= 0) |
| 249 | { |
| 250 | searchSpace_.markPromising(U); // U's neighbours might not be depots |
| 251 | auto *route = U->route(); |
| 252 | route->remove(U->idx()); |
| 253 | update(route, route); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | void LocalSearch::applyEmptyRouteMoves(Route::Node *U, |
| 258 | CostEvaluator const &costEvaluator) |
nothing calls this directly
no test coverage detected