Shifts, working hours, and route limits

By Nathan ColeUpdated

A vehicle's Shift hours set the earliest it may leave the depot and the latest it must return. Latest start time caps departure separately. The three route limits, Max duration, Max overtime, and Max distance, cap how much of the shift window one route may use. All are set in the Limits group on the Fleet page.

This page covers the shift window, the latest start time, day offsets for multi-day plans, the three route limits, where a broken limit appears, and the spreadsheet columns that set them.

This tutorial plan splits windowed orders between a Morning van and an Evening van. The Evening van has a latest start time and a Max duration:

Tutorial - Shifts and route limits
A morning van and an evening van with a latest start time, serving orders windowed across the day; the evening van has a max route duration. Uses Max duration.

Shift hours

Shift hours are the vehicle's working window: the earliest it may leave the depot and the latest it must return (or reach its last stop, for open-ended routes). The optimizer schedules every route to fit inside it, including service times and any waiting for time windows.

  • A route normally departs at shift start, unless waiting elsewhere on the route costs less.
  • Shift end is a hard limit. An order that cannot be reached and served before shift end moves to another vehicle or goes unassigned.

In the tutorial plan the Morning van works 07:00 to 13:00 and the Evening van 12:00 to 20:00. The Morning orders have delivery windows that close by 12:00, and one of them closes at 11:00. The Evening orders have windows that open from 14:00, and one of them opens at 15:00. The shifts therefore decide which van serves which side of the day. Only the two Anytime orders, which have no window, may be served by either van.

Latest start time

Latest start time caps when the vehicle may depart, separately from when it must finish. Use it when departure has to happen inside a window, for example a driver who clocks in between 07:00 and 09:30 and then works a full shift. The tutorial's Evening van has a latest start of 14:00. It leaves the Warehouse depot between 12:00 and 14:00 and finishes by 20:00.

Multi-day plans

A day offset, from same day through +7 days, accompanies these time fields:

  • A vehicle's Shift hours, both ends, and its Latest start time.
  • A depot's Open hours, both ends.
  • An order's Opening hours, each of its extra windows, and its Release time.

Set a shift like 20:00 to 06:00 (+1 day) for a night run, or give orders windows on different days to plan a multi-day tour. The fixed break windows under Breaks take clock times only and have no day offset.

The route limits

Three more limits are set in the vehicle editor:

  • Max duration: the longest a single route may run, measured from start to finish and entered in minutes. Use it when the shift window is wider than the workday it should contain. The tutorial's Evening van is set up this way: its shift window spans 8 hours (12:00 to 20:00), and a Max duration of 360 minutes caps any single route at a 6-hour workday inside it.
  • Max overtime: minutes allowed beyond Max duration, priced by Overtime cost per hour in the Cost group. Max duration then becomes a priced limit rather than a hard one. The optimizer uses overtime only where it costs less than the alternative. Left empty, Overtime cost per hour falls back to the vehicle's hourly cost, and overtime is never free unless the rate is an explicit 0.
  • Max distance: a distance cap per route. The label shows the unit, kilometers or miles. Use it for leased vehicles, battery range, or wear budgets. An electric van capped at 180 km serves the orders that fit inside that range, and the optimizer assigns the rest to another vehicle.

Depot Open hours interact with the shift window and the latest start time. A vehicle cannot load before its depot opens, no matter how early its shift starts.

Where you see it

Overtime reaches the plan total through the COST metric in the top metrics strip. Each hour of overtime charges Overtime cost per hour on top of the vehicle's regular time cost. Overtime appears only inside that total: no metric, route card, or export column reports it separately.

A limit that a route breaks shows as a red problem line under the affected stop, counted as PROBLEMS on the route card. The messages are:

  • "Runs past the vehicle's shift end by X" for the shift window.
  • "Exceeds the shift duration limit by X" for Max duration.
  • "Exceeds the distance limit by X km/mi" for Max distance.
  • "Misses the depot's opening hours by X" for a depot visit outside the depot's Open hours.

A fresh optimization respects every one of these limits, so a problem line follows a manual edit to a route. See Problems and warnings, explained.

Driver breaks

Driver breaks and driving-time limits covers mandatory driver breaks (EU 45-minutes-per-4.5-hours, US 30-minutes-per-8-hours, custom rules, fixed lunch windows) and weekly driving-hour budgets. Break time counts toward Max duration like service time does.

In spreadsheets

Vehicles take Shift start and Shift end for the shift window, Latest start for the departure cap, and Max duration, Max overtime, and Max distance, km for the three route limits. A workbook in miles spells that last column Max distance, mi. The overtime rate is Cost, overtime hour. Max duration and Max overtime take minutes. Each time column has a day column beside it: Shift start day, Shift end day, and Latest start day, left blank for the same day and 1 for the next day. Depots take Open from, Open to, Open from day, and Open to day. See the column reference.

Next step

The optimizer trades time against distance through their costs. See Vehicle costs and the COST metric.

FAQ

What happens to an order that cannot be served before the shift ends?

Shift end is a hard limit. The optimizer moves the order to another vehicle that can reach and serve it in time. When no vehicle can, the order goes unassigned with the reason attached. A fresh optimization never runs a route past its shift end. The problem line Runs past the vehicle's shift end appears only after a manual edit.

What is the difference between Shift hours and Max duration?

Shift hours are a clock window. Max duration is the longest one route may run inside that window, in minutes. A driver who may start between 12:00 and 14:00 but works at most 6 hours gets a shift of 12:00 to 20:00, a Latest start time of 14:00, and a Max duration of 360.

How do I plan a night shift that crosses midnight?

Use the day offset. Set Shift hours from 20:00 to 06:00 with +1 day on the end time. The shift then runs overnight. Depot Open hours and order Opening hours take the same offsets, up to +7 days. In spreadsheets each time column has a paired day column, such as Shift end day, where 1 means the next day.

Is overtime free if I set Max overtime?

No. Every hour past Max duration, up to Max overtime, is charged at the vehicle's Overtime cost per hour on top of its regular time cost. With that rate empty, the optimizer uses the vehicle's hourly cost instead. Overtime is free only when the rate is an explicit 0. The charge appears inside the COST metric.

(c) 2024–2026 Routinghub LLC, a Delaware company. File number 7159503.