MCPcopy Index your code
hub / github.com/PyVRP/PyVRP / SearchSpace

Method SearchSpace

pyvrp/cpp/search/SearchSpace.cpp:10–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using pyvrp::search::SearchSpace;
9
10SearchSpace::SearchSpace(ProblemData const &data, Neighbours neighbours)
11 : neighbours_(data.numLocations()),
12 promising_(data.numLocations()),
13 clientOrder_(data.numClients()),
14 routeOrder_(data.numVehicles())
15{
16 setNeighbours(neighbours);
17
18 std::iota(clientOrder_.begin(), clientOrder_.end(), data.numDepots());
19 std::iota(routeOrder_.begin(), routeOrder_.end(), 0);
20
21 size_t offset = 0;
22 for (size_t vehType = 0; vehType != data.numVehicleTypes(); vehType++)
23 {
24 vehTypeOrder_.emplace_back(vehType, offset);
25 offset += data.vehicleType(vehType).numAvailable;
26 }
27}
28
29void SearchSpace::setNeighbours(Neighbours neighbours)
30{

Callers

nothing calls this directly

Calls 8

numLocationsMethod · 0.80
numVehiclesMethod · 0.80
numVehicleTypesMethod · 0.80
numClientsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
numDepotsMethod · 0.45
vehicleTypeMethod · 0.45

Tested by

no test coverage detected