How to express constraints¶
Most routing problems only need the everyday constraints. Start there. The later pages cover pairing, then features you only need for some operations.
-
Service time on site, and dock or gate time that should not be charged twice
-
arrive_afterandleave_by— appointments, opening hours, SLAs -
Fix first job (or last job) to the start or end of a run
-
How much a vehicle can hold, in one dimension or several
-
Who is allowed to serve which Jobs, and delivery zones
-
Shift hours, and where the Driver begins and finishes the route
-
Make one Driver slower or faster than the default travel times
-
Pickup delivery and later than
Carry an item on one vehicle, or require one stop after another
-
Unserved penalty / job importance
Say that some Jobs matter more if something has to be left unserved
-
Several Shifts in one request — last-mile days, or a continuous journey
-
Optional penalty on used time on later Shifts, so later days stay open
-
Optional lump on each vehicle (or reset Shift) that serves any Job, so the fleet stays smaller