MCPcopy Index your code
hub / github.com/PyVRP/PyVRP / canEndAt

Function canEndAt

pyvrp/cpp/Trip.cpp:26–31  ·  view source on GitHub ↗

Returns whether given vehicle type can end a trip at the given depot.

Source from the content-addressed store, hash-verified

24
25// Returns whether given vehicle type can end a trip at the given depot.
26bool canEndAt(ProblemData::VehicleType const &vehType, size_t depot)
27{
28 auto const &reloads = vehType.reloadDepots;
29 return depot == vehType.endDepot
30 || std::find(reloads.begin(), reloads.end(), depot) != reloads.end();
31}
32} // namespace
33
34Trip::Trip(ProblemData const &data,

Callers 1

TripMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected