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

Function hasTimeOverlap

pyvrp/cpp/ProblemData.cpp:38–42  ·  view source on GitHub ↗

Small helper that determines if the time windows of a and b overlap.

Source from the content-addressed store, hash-verified

36
37// Small helper that determines if the time windows of a and b overlap.
38bool hasTimeOverlap(auto const &a, auto const &b)
39{
40 // See https://stackoverflow.com/a/325964/4316405.
41 return a.twEarly <= b.twLate && a.twLate >= b.twEarly;
42}
43
44bool hasTimeWindow(auto const &arg)
45{

Callers 1

validateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected