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

Method SwapStar

pyvrp/cpp/search/SwapStar.cpp:254–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252void SwapStar::update(Route *U) { isCached(U->idx(), 0) = false; }
253
254SwapStar::SwapStar(ProblemData const &data, double overlapTolerance)
255 : RouteOperator(data),
256 overlapTolerance(overlapTolerance),
257 insertCache(data.numVehicles(), data.numLocations()),
258 isCached(data.numVehicles(), data.numLocations()),
259 removalCosts(data.numVehicles(), data.numLocations())
260{
261 if (overlapTolerance < 0 || overlapTolerance > 1)
262 throw std::invalid_argument("overlap_tolerance must be in [0, 1].");
263}

Callers

nothing calls this directly

Calls 2

numVehiclesMethod · 0.80
numLocationsMethod · 0.80

Tested by

no test coverage detected