Returns whether given vehicle type can start a trip from the given depot.
| 16 | { |
| 17 | // Returns whether given vehicle type can start a trip from the given depot. |
| 18 | bool canStartAt(ProblemData::VehicleType const &vehType, size_t depot) |
| 19 | { |
| 20 | auto const &reloads = vehType.reloadDepots; |
| 21 | return depot == vehType.startDepot |
| 22 | || std::find(reloads.begin(), reloads.end(), depot) != reloads.end(); |
| 23 | } |
| 24 | |
| 25 | // Returns whether given vehicle type can end a trip at the given depot. |
| 26 | bool canEndAt(ProblemData::VehicleType const &vehType, size_t depot) |