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

Method evaluate

pyvrp/cpp/search/SwapRoutes.cpp:6–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using pyvrp::search::SwapRoutes;
5
6Cost SwapRoutes::evaluate(Route *U,
7 Route *V,
8 CostEvaluator const &costEvaluator)
9{
10 stats_.numEvaluations++;
11
12 if (U == V || U->vehicleType() == V->vehicleType())
13 return 0;
14
15 // Evaluate swapping the routes after the two depots.
16 return op.evaluate((*U)[0], (*V)[0], costEvaluator);
17}
18
19void SwapRoutes::apply(Route *U, Route *V) const
20{

Calls 1

vehicleTypeMethod · 0.45