| 8 | using pyvrp::search::SearchSpace; |
| 9 | |
| 10 | SearchSpace::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 | |
| 29 | void SearchSpace::setNeighbours(Neighbours neighbours) |
| 30 | { |
nothing calls this directly
no test coverage detected