| 224 | void ProblemData::ClientGroup::clear() { clients_.clear(); } |
| 225 | |
| 226 | ProblemData::Depot::Depot(Coordinate x, |
| 227 | Coordinate y, |
| 228 | Duration twEarly, |
| 229 | Duration twLate, |
| 230 | Duration serviceDuration, |
| 231 | std::string name) |
| 232 | : x(x), |
| 233 | y(y), |
| 234 | serviceDuration(serviceDuration), |
| 235 | twEarly(twEarly), |
| 236 | twLate(twLate), |
| 237 | name(duplicate(name.data())) |
| 238 | { |
| 239 | if (serviceDuration < 0) |
| 240 | throw std::invalid_argument("service_duration must be >= 0."); |
| 241 | |
| 242 | if (twEarly > twLate) |
| 243 | throw std::invalid_argument("tw_early must be <= tw_late."); |
| 244 | |
| 245 | if (twEarly < 0) |
| 246 | throw std::invalid_argument("tw_early must be >= 0."); |
| 247 | } |
| 248 | |
| 249 | ProblemData::Depot::Depot(Depot const &depot) |
| 250 | : x(depot.x), |