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

Method markRequiredMissingAsPromising

pyvrp/cpp/search/LocalSearch.cpp:421–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421void LocalSearch::markRequiredMissingAsPromising()
422{
423 for (auto client = data.numDepots(); client != data.numLocations();
424 ++client)
425 {
426 if (solution_.nodes[client].route()) // then it's not missing, so
427 continue; // nothing to do
428
429 ProblemData::Client const &clientData = data.location(client);
430 if (clientData.required)
431 {
432 searchSpace_.markPromising(client);
433 continue;
434 }
435
436 if (clientData.group) // mark the group's first client as promising so
437 { // the group at least gets inserted if needed
438 auto const &group = data.group(clientData.group.value());
439 if (group.required && group.clients().front() == client)
440 {
441 searchSpace_.markPromising(client);
442 continue;
443 }
444 }
445 }
446}
447
448void LocalSearch::update(Route *U, Route *V)
449{

Callers

nothing calls this directly

Calls 6

numLocationsMethod · 0.80
locationMethod · 0.80
markPromisingMethod · 0.80
clientsMethod · 0.80
numDepotsMethod · 0.45
routeMethod · 0.45

Tested by

no test coverage detected