EXPLAIN / REASON CODES
Why it routed that way.
A router that can't tell you why a stop is unassigned is a router your dispatcher will stop trusting by Tuesday. Arclane attaches a machine-readable reason code and a plain sentence to every exception.
CODES / FOUR
- CAPACITY_EXCEEDED
- Every reachable vehicle is full.
- WINDOW_INFEASIBLE
- No vehicle arrives before the window closes.
- SHIFT_OVERRUN
- Serving it breaks a driver's duty limit.
- SKILL_MISSING
- No in-service vehicle carries the skill.
The code is the dominant blocker: a hard capacity or skill wall outranks a time-window near-miss, so the reason you see is the one worth acting on.
{
"stop": 142,
"status": "unassigned",
"reason_code": "WINDOW_INFEASIBLE",
"message": "No vehicle can arrive before
this stop's window closes.",
"window_start": 545,
"window_end": 605
}
CONTRACT / STABLE
One shape, for humans and systems.
The same JSON that your dispatch screen renders as a sentence, your WMS consumes as a field. Assigned stops answer too, call explain(stop) on anything and get its status.
{
"stop": 61,
"status": "assigned",
"message": "Stop 61 is on a run."
}