MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / Depot

Method Depot

pyvrp/cpp/ProblemData.cpp:226–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224void ProblemData::ClientGroup::clear() { clients_.clear(); }
225
226ProblemData::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
249ProblemData::Depot::Depot(Depot const &depot)
250 : x(depot.x),

Callers

nothing calls this directly

Calls 2

duplicateFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected