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

Method loadSolution

pyvrp/cpp/search/LocalSearch.cpp:469–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469void LocalSearch::loadSolution(pyvrp::Solution const &solution)
470{
471 std::fill(lastTestedNodes.begin(), lastTestedNodes.end(), -1);
472 std::fill(lastTestedRoutes.begin(), lastTestedRoutes.end(), -1);
473 std::fill(lastUpdated.begin(), lastUpdated.end(), 0);
474 searchSpace_.markAllPromising();
475 numUpdates_ = 0;
476
477 solution_.load(solution);
478
479 for (auto *nodeOp : nodeOps)
480 nodeOp->init(solution);
481
482 for (auto *routeOp : routeOps)
483 routeOp->init(solution);
484}
485
486void LocalSearch::addNodeOperator(NodeOperator &op)
487{

Callers

nothing calls this directly

Calls 5

markAllPromisingMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
loadMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected