What makes this vertical distinctive
- Reconfigurable cold compartment — a truck’s compartment is set to ambient or frozen mode before departure, fixed for the whole tour, never carrying both loads at once.
- Trusted-keychain deliveries — a set of key-gated stops is kept to a single driver for the day, not split across whoever has room.
- Preferred zones — drivers are softly tied to their usual sector, pulled elsewhere only once it’s covered.
- Predictive traffic — forecast travel time is baked into the route calculation itself.
Combined example
Reconfigurable cold compartment
truck-1.capacities carries ambiant and frozen as two independent dimensions. An atLeastOneValidCapacity constraint scoped to bi-temperature-tagged resources requires at least one of the two to stay at zero at every stop — in practice, the truck ends up loaded exclusively with ambient or exclusively with frozen goods for the tour, never a mix. This is a related but distinct pattern from Multi-compartment vehicles: that guide’s atLeastOneConstraint chooses between whole fixed setups, while this gate is checked stop by stop through an ordinary capacities mutual-exclusion.
Trusted-keychain deliveries
order-keychain-0/-1 share the tag keychain:trusted-set-1. A globalConstraints entry of type maxCumulatedCost caps the number of distinct drivers (tagged driver) who can visit a keychain:trusted-set-1 stop at 1 across the whole fleet — so whichever driver the engine assigns to the first keychain stop is the only one allowed on the rest of that set. See Constraints catalog.
Preferred zones
truck-1.preferredStopTags: ["zone:usual-sector-7"] is matched against the same tag on stop-afternoon-delivery — a soft pull toward the truck’s usual sector, scored through maximizePreferredStops rather than enforced as a hard rule. It’s the same preferredStopTags mechanism Driver skills and qualifications documents for a skill preference, applied here to a zone instead.
Predictive traffic
truck-1.vehicleProfile.withTraffic: true makes the engine use forecast travel times for this truck’s legs rather than free-flow distances.
Full payload
Full payload — ready to submit as POST /plans
Full payload — ready to submit as POST /plans
The preceding example isolates the four mechanisms this vertical needs; this expands it to the scale of a real working day — a full fleet schedule (
workingTimeWindow, departure, arrival), the complete objectives list, and enough orders to look like an actual route rather than a minimal illustration. Submit it as-is via POST /plans — the service assigns the plan’s id, so don’t include one of your own.See also
- Modeling advanced constraints — the related whole-tour compartment-setup pattern.
- Modeling advanced constraints —
preferredStopTags, the soft mechanism behind zone preference. - Data model — the full
additionalConstraintsandglobalConstraintscatalog.

