Skip to main content
V3 is in beta. General availability (GA) is planned for 1 December 2026.
A commercial waste contractor east of Ghent empties 21 containers on a Friday with two 9-tonne trucks. A truck that is full drives to a tip site, empties, and carries on; the two tip sites are not equal, one is quicker and dearer per visit, the other slower and cheaper, and each accepts only so many tonnes a day. A truck must be empty when it returns to the yard. A few containers have windows: schools before the day starts, a market after it closes, a hospital in office hours. The heaviest containers need the hook-lift truck. This page models that day, solves it with POST /v3/routing/solve, and reads the plan: where the trips begin and end, which tip each trip goes to and why, how the intake limits steer the last trips, where the forced final tip appears, and the one container that no truck can take as it stands. The response is real output for the request shown. Yours can differ in the travel figures, if the road data has changed since, and in timings.

The business rules

Two things this request does not say, on purpose. There is no per_reload logic beyond the gate fee, so the solver tips wherever the fee, the handling time and the detour add up cheapest. And the yard is a plain depot with no service_duration_s, so leaving and returning take no time there; a yard with a weighbridge would set one.

The data

All times are local time on 13 November 2026, written with the +01:00 offset. Coordinates are [longitude, latitude]. Both trucks work 06:00 to 14:30 from the yard, with reloads at both tips, max_trips: 4, unload_before_end: true and the duty break. truck-1 has the hook-lift skill. The 21 containers weigh between 700 kg (a bakery) and 9,500 kg (a 40-yard roll-off at a building site) and total 67,400 kg, so the day needs at least eight truckloads. Four containers need the hook-lift: the brewery (5,100 kg), the plant in Aalter (5,600 kg), the port warehouse (6,200 kg) and the roll-off (9,500 kg). Each takes seven minutes to empty, the roll-off ten. Six have time windows, listed in the table above.

The request

The complete body, as sent. Check it with POST /v3/routing/validate/solve first; among other things it rejects a max_intake on a depot that no shift reloads at, a reloads entry that is not a depot id, and unload_before_end: true on a shift with no reloads.
Three things to notice before reading the answer:
  • The two tips are depots[] entries like the yard. What makes them tips is that the shifts list them in reloads. A depot can be a reload site for one shift and the end of another.
  • max_intake is a request-wide total. It counts what every truck unloads there over every shift in the request, the final tip of unload_before_end included. For a day it is a daily cap; for a request that spans a week it is a weekly one.
  • The break has no window. A triggered break follows the work: with after: "duty" the count is driving plus service time since the shift start or the last break, and the break is placed before that count passes threshold_s.

The response

The response below is the real output for that request, trimmed in three ways to keep it readable: each stop keeps its times, waits, travel and load and drops location, snapped_location and service_s; the top-level search_progress and warnings are left out; and plan is shown whole because it is the shape you send back. Response times are in each shift’s own offset, +01:00.

The plan in one paragraph

Both trucks go out and 20 of the 21 containers are emptied, 57,900 kg in all. truck-1, the hook-lift truck, makes four trips and tips at the north station four times, the fourth being the forced final tip, and is back at the yard empty at 11:30. truck-2 makes three trips: two to the south station, where the fees are lower, then a final tip at the north station, because by then the south station is within one load of its cap and the north one is on the way home. The north station receives exactly its 40,000 kg. The roll-off is unassigned, and the response says both why and by how much.

Summary

  • tasks reads served: 20, unassigned: 1, unassigned_required: 1. The roll-off has no drop_cost, so it counts as required and the plan is incomplete. HTTP 200 all the same.
  • distance_m 310,629 and time.travel_s 23,653 s are sums over both routes, tip detours included. time.depot_s 6,900 s is the handling time at the tips: five visits north at 900 s and two south at 1,200 s. There is no yard handling because the yard sets no service_duration_s.
  • time.break_s 3,600 s: one 30-minute break per truck.
  • search used the five-second budget in full (termination: "time_limit"). A multi-trip problem explores reload positions as well as stop order, so the same budget buys fewer iterations than a plain delivery problem of the same size.

Trips and tip visits

A trip is the stretch between two reload stops, or between start and the first reload, or the last reload and end. Each reload stop carries depot, the id of the tip, and a load_after of 0: the truck leaves empty. Reading truck-1: Four trips against max_trips: 4. The last reload is the one unload_before_end adds: the route would otherwise have ended at the yard with 8,700 kg on board. It does not count toward max_trips, so the shift used three counted reloads plus the final tip. The load_after on the end stop is 0 for both trucks; that is the field that proves the rule held. Trip 2 is a single container. The port warehouse’s 6,200 kg leaves no room for anything useful on the same trip, and the port is five minutes from the north station, so a dedicated trip is cheaper than threading it into another. truck-2 is the one to watch for the intake caps: The first trip is full to the kilogram: load_peak is 9000, and the nursery’s 800 kg is the last thing that fits. The south station is the cheaper tip, and the first two trips go there. By the third trip it has received 17,900 kg, so one more load of 8,000 kg would exceed its 20,000 kg cap, and the solver sends the final tip north instead, which costs the higher fee but needs no detour from the market in the city to the yard. The north station then stands at exactly 40,000 kg: truck-1’s 32,000 kg plus this 8,000 kg. Both caps held, one of them with nothing to spare. The response has no field that totals what a depot received. Sum, per depot, the load_after of the stop before each reload there; the sums are 40,000 and 17,900 here. A plan sent to /v3/routing/evaluate that overfilled a site would report max_intake on the first route unloading there, with the excess.

Windows and the break

Every windowed container is inside its window: the Lochristi school at 06:30 after a 21-minute wait (wait_s: 1269) because the shift starts at 06:00 and the school opens at 06:30; the Oostakker school at 08:03, twelve minutes before its 08:15 close; the hospital at 09:00 after a three-minute wait; the campus at 10:00 after a 44-minute wait, the biggest idle of the day; the market at 12:30 on the minute. Where a stop waits, service_start is later than arrival by wait_s. Each truck has one break stop of 1,800 s. On truck-1 it falls at 09:50, right after the Evergem factory and before the drive to Zelzate, with 3 hours 50 minutes of driving and service behind it; the leg and the Zelzate service would have taken the count past four hours. On truck-2 it falls at 11:08, after the Eeklo mill. A break is listed before the stop whose arrival it delays, and the count starts again after it. Neither truck’s time.overtime_s is above 0: no max_overtime_s was set, so the 14:30 end is hard, and both are back well before it.

The unassigned container

Read it from the outside in:
  1. category: "impossible" says no vehicle can serve this container whatever happens to the rest of the day. More search time will not place it, and neither will rearranging the other stops.
  2. reasons[] lists one entry per rule that refused it, on at least one vehicle each. required_skills is truck-2: it has no hook-lift. capacity is truck-1: the roll-off weighs 9,500 kg and the truck carries 9,000. A task lists each constraint once, so two trucks refusing for two different reasons give two reasons, not a reason per truck.
  3. relaxations[] gives the smallest change that would let it in: 500 kg less on this container, or 500 kg more capacity on a vehicle that is otherwise eligible, with a pointer to the field in the request.
The fix is operational, not a solver setting: a second lift, a bigger truck, or an agreement with the site to keep the roll-off under 9 tonnes. What the response does not do is overload the truck a little: capacity is hard, and the container stays on the list.

Score

score.cost is the sum of score.components, in the currency you labelled: unassigned_priority is 1: the roll-off’s default priority. violation_count is 0, as on every solve response without pinned plan stops.

One KPI line

Cost per tonne collected: 20.85 (1,207.24 over 57.9 tonnes), with seven tip visits paying 215 in gate fees and both trucks back at the yard empty before noon and 13:30. The tonne figure includes the time the trucks spend driving to and queueing at the tips, which is what makes it comparable between a day with intake caps and a day without.

What the solution cannot prove

The response proves what the solver was told to respect. It cannot prove what it was not told:
  • That the containers weigh what the request says. pickup_load is a declared weight. A container 20 percent heavier than booked overloads a trip that the plan shows as full to the kilogram, like truck-2’s first. A fleet that weighs on the truck plans with a margin: capacity a little under the legal payload.
  • That the tip sites honour the caps at the gate. max_intake is the contractor’s own ceiling, enforced by the plan. The response cannot know that the north site closed its gate at 11:00 for a breakdown; that is a re-plan from this response’s plan, with the stops already made inside locked_count and the north site’s max_intake lowered to what it has already received.
  • That seven minutes per container is right. Service times are averages and the plan has slack in some places (the campus wait) and none in others (truck-1’s morning). wait_s per stop shows where the slack is.
  • That the forced final tip is the right policy for every truck. unload_before_end is a yes or no per shift. A truck that may park loaded overnight sets it to false or leaves it out, and its last trip then ends at the yard with load on board, which load_after on the end stop shows.
  • That driving times hold in the morning peak. These are free-flow travel times from the default engine; travel.departure_time asks for traffic-aware times instead. See Distance matrices.
What it does prove, and how to check it in code: no stop’s load_after exceeds 9,000; every reload stop’s depot is one of the shift’s reloads; each route’s trips, the reload stops that are not a final tip before end plus one, are at most max_trips; the end stop’s load_after is 0 on every route; the per-depot sums of load on arrival are within max_intake; every windowed stop’s service_start is inside its window; and every task is either in some route’s stops or in unassigned[]. Multi-trip reloads lists the fields rule by rule.

Next steps

Multi-trip reloads

Every reload, intake and final-tip rule, and its evaluate violation.

Re-optimization

Re-plan from this response’s plan when a tip closes or a truck breaks down.

Handling infeasibility

Reading categories, reasons and relaxations, and the ranked fixes.

Parcel last-mile

The same loop on a delivery problem with priced lateness.