| 117 | Duration Solution::timeWarp() const { return timeWarp_; } |
| 118 | |
| 119 | void Solution::makeNeighbours() |
| 120 | { |
| 121 | for (auto const &route : routes_) |
| 122 | for (auto const &trip : route.trips()) |
| 123 | { |
| 124 | auto const startDepot = trip.startDepot(); |
| 125 | auto const endDepot = trip.endDepot(); |
| 126 | |
| 127 | for (size_t idx = 0; idx != trip.size(); ++idx) |
| 128 | neighbours_[trip[idx]] = { |
| 129 | idx == 0 ? startDepot : trip[idx - 1], // pred |
| 130 | idx == trip.size() - 1 ? endDepot : trip[idx + 1]}; // succ |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | bool Solution::operator==(Solution const &other) const |
| 135 | { |
nothing calls this directly
no test coverage detected