> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solvice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Waste collection with mid-route tipping

> A worked V3 example: 21 container pickups, two trucks that tip at two sites with intake limits and must come back empty, one solve, then the trips, the tip visits and the one container no truck can lift

> [!NOTE]
>
> **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

| Rule, as the depot manager states it | V3 field |
| - | - |
| A truck carries 9 tonnes, then it has to tip | `vehicles[].capacity: { "weight": 9000 }` with `pickup_load: { "weight": ... }` on every container. Capacity is enforced per trip |
| A truck may tip at the north transfer station or the south one, and go on collecting afterwards | `shifts[].reloads: ["tip-north", "tip-south"]`, naming entries in `depots[]`. A reload empties the truck and starts a new trip |
| Four trips a day at most, counting the first | `shifts[].max_trips: 4`. Trips are reloads plus one |
| Tipping takes 15 minutes north and 20 south, and the gate fee is 35 north and 20 south | `depots[].service_duration_s` and `depots[].per_reload` on each tip |
| The north site takes at most 40 tonnes from us today, the south one 20 | `depots[].max_intake: { "weight": ... }`. A total over the whole request, not per trip |
| A truck comes back to the yard empty | `shifts[].unload_before_end: true`. A route that would end loaded gets one more tip visit before `end` |
| Only truck 1 has the hook-lift, and every container of 5 tonnes or more needs it | `required_skills: [{ "name": "hook-lift" }]` on those containers, `skills` on truck 1 |
| Schools before 08:15, the bakery before 09:00, the hospital between 09:00 and 12:00, the campus between 10:00 and 14:00, the market after it closes at 12:30 | `time_windows[]`, hard: none of these carries a `per_late_hour` |
| Drivers take 30 minutes after four hours of work | A `triggered` break with `after: "duty"`, `threshold_s: 14400`, `duration_s: 1800` |
| A truck-hour costs 55, a kilometre 0.90 | `objective.costs.per_route_hour` and `per_travel_km`. No `per_route`: both trucks are paid for the day whether they go out or not |

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]`.

| Depot | Role | Handling | Fee per visit | Intake cap |
| - | - | - | - | - |
| `yard` | shift `start` and `end` | none | | |
| `tip-north` | reload | 15 min | 35 | 40,000 kg |
| `tip-south` | reload | 20 min | 20 | 20,000 kg |

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`.

```bash theme={null}
curl -X POST https://api.solvice.io/v3/routing/solve \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "problem": {
      "depots": [
        {"id": "yard", "location": [3.762, 51.072]},
        {
          "id": "tip-north",
          "location": [3.742, 51.128],
          "service_duration_s": 900,
          "per_reload": 35,
          "max_intake": {"weight": 40000}
        },
        {
          "id": "tip-south",
          "location": [3.7, 50.985],
          "service_duration_s": 1200,
          "per_reload": 20,
          "max_intake": {"weight": 20000}
        }
      ],
      "vehicles": [
        {
          "id": "truck-1",
          "capacity": {"weight": 9000},
          "shifts": [
            {
              "id": "fri",
              "from": "2026-11-13T06:00:00+01:00",
              "to": "2026-11-13T14:30:00+01:00",
              "start": {"depot": "yard"},
              "end": {"depot": "yard"},
              "reloads": ["tip-north", "tip-south"],
              "max_trips": 4,
              "unload_before_end": true,
              "breaks": [
                {"type": "triggered", "after": "duty", "threshold_s": 14400, "duration_s": 1800}
              ]
            }
          ],
          "skills": [{"name": "hook-lift"}]
        },
        {
          "id": "truck-2",
          "capacity": {"weight": 9000},
          "shifts": [
            {
              "id": "fri",
              "from": "2026-11-13T06:00:00+01:00",
              "to": "2026-11-13T14:30:00+01:00",
              "start": {"depot": "yard"},
              "end": {"depot": "yard"},
              "reloads": ["tip-north", "tip-south"],
              "max_trips": 4,
              "unload_before_end": true,
              "breaks": [
                {"type": "triggered", "after": "duty", "threshold_s": 14400, "duration_s": 1800}
              ]
            }
          ]
        }
      ],
      "jobs": [
        {
          "id": "c-school-oostakker",
          "location": [3.771, 51.092],
          "service_duration_s": 420,
          "pickup_load": {"weight": 1800},
          "time_windows": [{"from": "2026-11-13T06:30:00+01:00", "to": "2026-11-13T08:15:00+01:00"}]
        },
        {
          "id": "c-school-lochristi",
          "location": [3.831, 51.098],
          "service_duration_s": 420,
          "pickup_load": {"weight": 1500},
          "time_windows": [{"from": "2026-11-13T06:30:00+01:00", "to": "2026-11-13T08:15:00+01:00"}]
        },
        {
          "id": "c-supermarket-destelbergen",
          "location": [3.8, 51.058],
          "service_duration_s": 420,
          "pickup_load": {"weight": 3200}
        },
        {
          "id": "c-supermarket-melle",
          "location": [3.802, 51.001],
          "service_duration_s": 420,
          "pickup_load": {"weight": 2800}
        },
        {
          "id": "c-hospital-gent",
          "location": [3.731, 51.027],
          "service_duration_s": 420,
          "pickup_load": {"weight": 4200},
          "time_windows": [{"from": "2026-11-13T09:00:00+01:00", "to": "2026-11-13T12:00:00+01:00"}]
        },
        {
          "id": "c-brewery-wetteren",
          "location": [3.883, 51.003],
          "service_duration_s": 420,
          "pickup_load": {"weight": 5100},
          "required_skills": [{"name": "hook-lift"}]
        },
        {
          "id": "c-factory-zelzate",
          "location": [3.81, 51.195],
          "service_duration_s": 420,
          "pickup_load": {"weight": 4800}
        },
        {
          "id": "c-factory-evergem",
          "location": [3.703, 51.112],
          "service_duration_s": 420,
          "pickup_load": {"weight": 3900}
        },
        {
          "id": "c-garage-drongen",
          "location": [3.66, 51.052],
          "service_duration_s": 420,
          "pickup_load": {"weight": 1200}
        },
        {
          "id": "c-garage-mariakerke",
          "location": [3.681, 51.069],
          "service_duration_s": 420,
          "pickup_load": {"weight": 900}
        },
        {
          "id": "c-campus-zwijnaarde",
          "location": [3.712, 51.0],
          "service_duration_s": 420,
          "pickup_load": {"weight": 2600},
          "time_windows": [{"from": "2026-11-13T10:00:00+01:00", "to": "2026-11-13T14:00:00+01:00"}]
        },
        {
          "id": "c-retail-sdw",
          "location": [3.672, 51.021],
          "service_duration_s": 420,
          "pickup_load": {"weight": 2100}
        },
        {
          "id": "c-bakery-merelbeke",
          "location": [3.746, 50.994],
          "service_duration_s": 420,
          "pickup_load": {"weight": 700},
          "time_windows": [{"from": "2026-11-13T06:30:00+01:00", "to": "2026-11-13T09:00:00+01:00"}]
        },
        {
          "id": "c-dairy-laarne",
          "location": [3.852, 51.031],
          "service_duration_s": 420,
          "pickup_load": {"weight": 3400}
        },
        {
          "id": "c-market-gent",
          "location": [3.722, 51.056],
          "service_duration_s": 420,
          "pickup_load": {"weight": 1600},
          "time_windows": [{"from": "2026-11-13T12:30:00+01:00", "to": "2026-11-13T14:00:00+01:00"}]
        },
        {
          "id": "c-hotel-gent",
          "location": [3.716, 51.049],
          "service_duration_s": 420,
          "pickup_load": {"weight": 1100}
        },
        {
          "id": "c-warehouse-port",
          "location": [3.745, 51.135],
          "service_duration_s": 420,
          "pickup_load": {"weight": 6200},
          "required_skills": [{"name": "hook-lift"}]
        },
        {
          "id": "c-nursery-nazareth",
          "location": [3.6, 50.96],
          "service_duration_s": 420,
          "pickup_load": {"weight": 800}
        },
        {
          "id": "c-plant-aalter",
          "location": [3.448, 51.09],
          "service_duration_s": 420,
          "pickup_load": {"weight": 5600},
          "required_skills": [{"name": "hook-lift"}]
        },
        {
          "id": "c-mill-eeklo",
          "location": [3.556, 51.184],
          "service_duration_s": 420,
          "pickup_load": {"weight": 4400}
        },
        {
          "id": "c-rolloff-gentbrugge",
          "location": [3.765, 51.04],
          "service_duration_s": 600,
          "pickup_load": {"weight": 9500},
          "required_skills": [{"name": "hook-lift"}]
        }
      ],
      "objective": {"currency": "EUR", "costs": {"per_route_hour": 55, "per_travel_km": 0.9}}
    },
    "options": {"time_limit_s": 5, "seed": 7}
  }'
```

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`.

```json theme={null}
{
  "summary": {
    "score": {
      "violation_count": 0,
      "unassigned_priority": 1,
      "cost": 1207.24058,
      "currency": "EUR",
      "components": {
        "routes": 0.0,
        "stops": 0.0,
        "vehicles": 0.0,
        "time": 712.67448,
        "distance": 279.5661,
        "waiting": 0.0,
        "driving": 0.0,
        "overtime": 0.0,
        "lateness": 0.0,
        "window_choice": 0.0,
        "target": 0.0,
        "tag_preference": 0.0,
        "reloads": 215.0,
        "grouping": 0.0,
        "workload_share": 0.0,
        "drop_costs": 0.0,
        "preferences": 0.0,
        "assignment": 0.0,
        "delay": 0.0
      }
    },
    "tasks": {"served": 20, "unassigned": 1, "unassigned_required": 1},
    "vehicles_used": 2,
    "shifts_used": 2,
    "distance_m": 310629,
    "time": {
      "span_s": 46641,
      "travel_s": 23653,
      "service_s": 8400,
      "depot_s": 6900,
      "wait_s": 4088,
      "break_s": 3600,
      "overtime_s": 0
    },
    "timings": {"search_ms": 5000, "total_ms": 5037},
    "search": {"termination": "time_limit", "iterations": 56351},
    "travel_estimated": false
  },
  "routes": [
    {
      "vehicle": "truck-1",
      "shift": "fri",
      "distance_m": 160534,
      "time": {
        "span_s": 19831,
        "travel_s": 11071,
        "service_s": 3360,
        "depot_s": 3600,
        "wait_s": 0,
        "break_s": 1800,
        "overtime_s": 0
      },
      "load_peak": {"weight": 8700},
      "stops": [
        {"type": "start", "depot": "yard", "arrival": "2026-11-13T06:00:00+01:00", "departure": "2026-11-13T06:00:00+01:00", "load_after": {"weight": 0}},
        {"type": "job", "id": "c-brewery-wetteren", "arrival": "2026-11-13T06:20:08+01:00", "service_start": "2026-11-13T06:20:08+01:00", "departure": "2026-11-13T06:27:08+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 1208, "distance_m": 16694, "load_after": {"weight": 5100}},
        {"type": "job", "id": "c-dairy-laarne", "arrival": "2026-11-13T06:37:31+01:00", "service_start": "2026-11-13T06:37:31+01:00", "departure": "2026-11-13T06:44:31+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 623, "distance_m": 5797, "load_after": {"weight": 8500}},
        {"type": "reload", "depot": "tip-north", "arrival": "2026-11-13T07:05:05+01:00", "service_start": "2026-11-13T07:05:05+01:00", "departure": "2026-11-13T07:20:05+01:00", "wait_s": 0, "travel_s": 1234, "distance_m": 16771, "load_after": {"weight": 0}},
        {"type": "job", "id": "c-warehouse-port", "arrival": "2026-11-13T07:24:12+01:00", "service_start": "2026-11-13T07:24:12+01:00", "departure": "2026-11-13T07:31:12+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 247, "distance_m": 2242, "load_after": {"weight": 6200}},
        {"type": "reload", "depot": "tip-north", "arrival": "2026-11-13T07:35:24+01:00", "service_start": "2026-11-13T07:35:24+01:00", "departure": "2026-11-13T07:50:24+01:00", "wait_s": 0, "travel_s": 252, "distance_m": 2242, "load_after": {"weight": 0}},
        {"type": "job", "id": "c-school-oostakker", "arrival": "2026-11-13T08:03:26+01:00", "service_start": "2026-11-13T08:03:26+01:00", "departure": "2026-11-13T08:10:26+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 782, "distance_m": 5853, "load_after": {"weight": 1800}},
        {"type": "job", "id": "c-plant-aalter", "arrival": "2026-11-13T08:38:47+01:00", "service_start": "2026-11-13T08:38:47+01:00", "departure": "2026-11-13T08:45:47+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 1701, "distance_m": 38108, "load_after": {"weight": 7400}},
        {"type": "job", "id": "c-garage-drongen", "arrival": "2026-11-13T09:01:46+01:00", "service_start": "2026-11-13T09:01:46+01:00", "departure": "2026-11-13T09:08:46+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 959, "distance_m": 18934, "load_after": {"weight": 8600}},
        {"type": "reload", "depot": "tip-north", "arrival": "2026-11-13T09:22:43+01:00", "service_start": "2026-11-13T09:22:43+01:00", "departure": "2026-11-13T09:37:43+01:00", "wait_s": 0, "travel_s": 837, "distance_m": 13590, "load_after": {"weight": 0}},
        {"type": "job", "id": "c-factory-evergem", "arrival": "2026-11-13T09:43:54+01:00", "service_start": "2026-11-13T09:43:54+01:00", "departure": "2026-11-13T09:50:54+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 371, "distance_m": 3518, "load_after": {"weight": 3900}},
        {"type": "break", "arrival": "2026-11-13T09:50:54+01:00", "departure": "2026-11-13T10:20:54+01:00", "load_after": {"weight": 3900}},
        {"type": "job", "id": "c-factory-zelzate", "arrival": "2026-11-13T10:37:30+01:00", "service_start": "2026-11-13T10:37:30+01:00", "departure": "2026-11-13T10:44:30+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 996, "distance_m": 14934, "load_after": {"weight": 8700}},
        {"type": "reload", "depot": "tip-north", "arrival": "2026-11-13T10:58:35+01:00", "service_start": "2026-11-13T10:58:35+01:00", "departure": "2026-11-13T11:13:35+01:00", "wait_s": 0, "travel_s": 845, "distance_m": 12487, "load_after": {"weight": 0}},
        {"type": "end", "depot": "yard", "arrival": "2026-11-13T11:30:31+01:00", "departure": "2026-11-13T11:30:31+01:00", "wait_s": 0, "travel_s": 1016, "distance_m": 9364, "load_after": {"weight": 0}}
      ]
    },
    {
      "vehicle": "truck-2",
      "shift": "fri",
      "distance_m": 150095,
      "time": {
        "span_s": 26810,
        "travel_s": 12582,
        "service_s": 5040,
        "depot_s": 3300,
        "wait_s": 4088,
        "break_s": 1800,
        "overtime_s": 0
      },
      "load_peak": {"weight": 9000},
      "stops": [
        {"type": "start", "depot": "yard", "arrival": "2026-11-13T06:00:00+01:00", "departure": "2026-11-13T06:00:00+01:00", "load_after": {"weight": 0}},
        {"type": "job", "id": "c-school-lochristi", "arrival": "2026-11-13T06:08:51+01:00", "service_start": "2026-11-13T06:30:00+01:00", "departure": "2026-11-13T06:37:00+01:00", "wait_s": 1269, "lateness_s": 0, "travel_s": 531, "distance_m": 6106, "load_after": {"weight": 1500}},
        {"type": "job", "id": "c-supermarket-destelbergen", "arrival": "2026-11-13T06:47:25+01:00", "service_start": "2026-11-13T06:47:25+01:00", "departure": "2026-11-13T06:54:25+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 625, "distance_m": 6470, "load_after": {"weight": 4700}},
        {"type": "job", "id": "c-supermarket-melle", "arrival": "2026-11-13T07:06:10+01:00", "service_start": "2026-11-13T07:06:10+01:00", "departure": "2026-11-13T07:13:10+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 705, "distance_m": 10832, "load_after": {"weight": 7500}},
        {"type": "job", "id": "c-bakery-merelbeke", "arrival": "2026-11-13T07:23:47+01:00", "service_start": "2026-11-13T07:23:47+01:00", "departure": "2026-11-13T07:30:47+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 637, "distance_m": 7535, "load_after": {"weight": 8200}},
        {"type": "job", "id": "c-nursery-nazareth", "arrival": "2026-11-13T07:49:24+01:00", "service_start": "2026-11-13T07:49:24+01:00", "departure": "2026-11-13T07:56:24+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 1117, "distance_m": 15003, "load_after": {"weight": 9000}},
        {"type": "reload", "depot": "tip-south", "arrival": "2026-11-13T08:09:18+01:00", "service_start": "2026-11-13T08:09:18+01:00", "departure": "2026-11-13T08:29:18+01:00", "wait_s": 0, "travel_s": 774, "distance_m": 9555, "load_after": {"weight": 0}},
        {"type": "job", "id": "c-retail-sdw", "arrival": "2026-11-13T08:39:39+01:00", "service_start": "2026-11-13T08:39:39+01:00", "departure": "2026-11-13T08:46:39+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 621, "distance_m": 6278, "load_after": {"weight": 2100}},
        {"type": "job", "id": "c-hospital-gent", "arrival": "2026-11-13T08:56:55+01:00", "service_start": "2026-11-13T09:00:00+01:00", "departure": "2026-11-13T09:07:00+01:00", "wait_s": 185, "lateness_s": 0, "travel_s": 616, "distance_m": 8106, "load_after": {"weight": 6300}},
        {"type": "job", "id": "c-campus-zwijnaarde", "arrival": "2026-11-13T09:16:06+01:00", "service_start": "2026-11-13T10:00:00+01:00", "departure": "2026-11-13T10:07:00+01:00", "wait_s": 2634, "lateness_s": 0, "travel_s": 546, "distance_m": 5070, "load_after": {"weight": 8900}},
        {"type": "reload", "depot": "tip-south", "arrival": "2026-11-13T10:10:13+01:00", "service_start": "2026-11-13T10:10:13+01:00", "departure": "2026-11-13T10:30:13+01:00", "wait_s": 0, "travel_s": 193, "distance_m": 2016, "load_after": {"weight": 0}},
        {"type": "job", "id": "c-mill-eeklo", "arrival": "2026-11-13T11:01:51+01:00", "service_start": "2026-11-13T11:01:51+01:00", "departure": "2026-11-13T11:08:51+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 1898, "distance_m": 29881, "load_after": {"weight": 4400}},
        {"type": "break", "arrival": "2026-11-13T11:08:51+01:00", "departure": "2026-11-13T11:38:51+01:00", "load_after": {"weight": 4400}},
        {"type": "job", "id": "c-garage-mariakerke", "arrival": "2026-11-13T11:59:42+01:00", "service_start": "2026-11-13T11:59:42+01:00", "departure": "2026-11-13T12:06:42+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 1251, "distance_m": 17369, "load_after": {"weight": 5300}},
        {"type": "job", "id": "c-hotel-gent", "arrival": "2026-11-13T12:18:07+01:00", "service_start": "2026-11-13T12:18:07+01:00", "departure": "2026-11-13T12:25:07+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 685, "distance_m": 4735, "load_after": {"weight": 6400}},
        {"type": "job", "id": "c-market-gent", "arrival": "2026-11-13T12:30:59+01:00", "service_start": "2026-11-13T12:30:59+01:00", "departure": "2026-11-13T12:37:59+01:00", "wait_s": 0, "lateness_s": 0, "travel_s": 352, "distance_m": 1390, "load_after": {"weight": 8000}},
        {"type": "reload", "depot": "tip-north", "arrival": "2026-11-13T12:54:54+01:00", "service_start": "2026-11-13T12:54:54+01:00", "departure": "2026-11-13T13:09:54+01:00", "wait_s": 0, "travel_s": 1015, "distance_m": 10385, "load_after": {"weight": 0}},
        {"type": "end", "depot": "yard", "arrival": "2026-11-13T13:26:50+01:00", "departure": "2026-11-13T13:26:50+01:00", "wait_s": 0, "travel_s": 1016, "distance_m": 9364, "load_after": {"weight": 0}}
      ]
    }
  ],
  "plan": {
    "routes": [
      {
        "vehicle": "truck-1",
        "shift": "fri",
        "stops": [
          {"type": "job", "id": "c-brewery-wetteren"},
          {"type": "job", "id": "c-dairy-laarne"},
          {"type": "reload", "depot": "tip-north"},
          {"type": "job", "id": "c-warehouse-port"},
          {"type": "reload", "depot": "tip-north"},
          {"type": "job", "id": "c-school-oostakker"},
          {"type": "job", "id": "c-plant-aalter"},
          {"type": "job", "id": "c-garage-drongen"},
          {"type": "reload", "depot": "tip-north"},
          {"type": "job", "id": "c-factory-evergem"},
          {"type": "job", "id": "c-factory-zelzate"},
          {"type": "reload", "depot": "tip-north"}
        ]
      },
      {
        "vehicle": "truck-2",
        "shift": "fri",
        "stops": [
          {"type": "job", "id": "c-school-lochristi"},
          {"type": "job", "id": "c-supermarket-destelbergen"},
          {"type": "job", "id": "c-supermarket-melle"},
          {"type": "job", "id": "c-bakery-merelbeke"},
          {"type": "job", "id": "c-nursery-nazareth"},
          {"type": "reload", "depot": "tip-south"},
          {"type": "job", "id": "c-retail-sdw"},
          {"type": "job", "id": "c-hospital-gent"},
          {"type": "job", "id": "c-campus-zwijnaarde"},
          {"type": "reload", "depot": "tip-south"},
          {"type": "job", "id": "c-mill-eeklo"},
          {"type": "job", "id": "c-garage-mariakerke"},
          {"type": "job", "id": "c-hotel-gent"},
          {"type": "job", "id": "c-market-gent"},
          {"type": "reload", "depot": "tip-north"}
        ]
      }
    ]
  },
  "unassigned": [
    {
      "task": "c-rolloff-gentbrugge",
      "category": "impossible",
      "reasons": [
        {"constraint": "required_skills", "message": "A vehicle lacks a skill this task requires"},
        {"constraint": "capacity", "message": "Capacity refused this task on at least one vehicle"}
      ],
      "relaxations": [
        {
          "pointer": "/problem/jobs/20/pickup_load",
          "op": "reduce_load",
          "amount": 500,
          "unit": "load",
          "message": "Reduce this task's load (its `pickup_load` or `delivery_load`) by 500, or add 500 capacity to an eligible vehicle."
        }
      ]
    }
  ]
}
```

### 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`:

| Trip | Containers | Load on arrival at the tip | Tip | Tipped at |
| - | - | - | - | - |
| 1 | brewery, dairy | 8,500 kg | `tip-north` | 07:05 to 07:20 |
| 2 | port warehouse | 6,200 kg | `tip-north` | 07:35 to 07:50 |
| 3 | school, plant in Aalter, garage in Drongen | 8,600 kg | `tip-north` | 09:22 to 09:37 |
| 4 | Evergem factory, Zelzate factory | 8,700 kg | `tip-north` | 10:58 to 11:13, then empty to the yard |

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:

| Trip | Containers | Load on arrival | Tip | Tipped at |
| - | - | - | - | - |
| 1 | Lochristi school, two supermarkets, bakery, nursery | 9,000 kg | `tip-south` | 08:09 to 08:29 |
| 2 | retail park, hospital, campus | 8,900 kg | `tip-south` | 10:10 to 10:30 |
| 3 | Eeklo mill, garage, hotel, market | 8,000 kg | `tip-north` | 12:54 to 13:09, then empty to the yard |

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

```json theme={null}
{
  "unassigned": [
    {
      "task": "c-rolloff-gentbrugge",
      "category": "impossible",
      "reasons": [
        { "constraint": "required_skills", "message": "A vehicle lacks a skill this task requires" },
        { "constraint": "capacity", "message": "Capacity refused this task on at least one vehicle" }
      ],
      "relaxations": [
        {
          "pointer": "/problem/jobs/20/pickup_load",
          "op": "reduce_load",
          "amount": 500,
          "unit": "load",
          "message": "Reduce this task's load (its `pickup_load` or `delivery_load`) by 500, or add 500 capacity to an eligible vehicle."
        }
      ]
    }
  ]
}
```

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:

| Component | Value | Where it comes from |
| - | - | - |
| `time` | 712.6745 | Both routes' `time.span_s`, 19,831 s plus 26,810 s, at 55 per hour. The hourly rate is applied per second at five decimals |
| `distance` | 279.5661 | 310.629 km at 0.90 |
| `reloads` | 215.0 | Five visits to `tip-north` at 35 and two to `tip-south` at 20. The final tips of `unload_before_end` are charged like any other |
| `routes` | 0.0 | No `per_route` in this request |
| `cost` | 1207.2406 | The sum |

`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](https://docs.solvice.io/guides/vrp/v3/concepts/distance-matrices.md).

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](https://docs.solvice.io/guides/vrp/v3/constraints.md#multi-trip-reloads) lists the fields rule by rule.

## Next steps

> [card] [Multi-trip reloads](https://docs.solvice.io/guides/vrp/v3/constraints.md#multi-trip-reloads)
>
> Every reload, intake and final-tip rule, and its evaluate violation.

> [card] [Re-optimization](https://docs.solvice.io/guides/vrp/v3/reoptimization.md)
>
> Re-plan from this response's `plan` when a tip closes or a truck breaks down.

> [card] [Handling infeasibility](https://docs.solvice.io/guides/vrp/v3/infeasibility.md)
>
> Reading categories, reasons and relaxations, and the ranked fixes.

> [card] [Parcel last-mile](https://docs.solvice.io/guides/vrp/v3/examples/parcel-last-mile.md)
>
> The same loop on a delivery problem with priced lateness.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.