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

Function canStartAt

pyvrp/cpp/Trip.cpp:18–23  ·  view source on GitHub ↗

Returns whether given vehicle type can start a trip from the given depot.

Source from the content-addressed store, hash-verified

16{
17// Returns whether given vehicle type can start a trip from the given depot.
18bool 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.
26bool canEndAt(ProblemData::VehicleType const &vehType, size_t depot)

Callers 1

TripMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected