MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / applyDepotRemovalMove

Method applyDepotRemovalMove

pyvrp/cpp/search/LocalSearch.cpp:239–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239void 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
257void LocalSearch::applyEmptyRouteMoves(Route::Node *U,
258 CostEvaluator const &costEvaluator)

Callers

nothing calls this directly

Calls 5

isReloadDepotMethod · 0.80
markPromisingMethod · 0.80
removeMethod · 0.80
idxMethod · 0.80
routeMethod · 0.45

Tested by

no test coverage detected