Expand description
Call-driven sweep for closed-loop topologies.
LoopSweep — call-driven dispatch for LineKind::Loop groups.
On a one-way closed loop, “dispatch” reduces to a label: the
systems::dispatch phase already kickstarts an Idle Loop car onto
its forward-next stop and excludes Loop cars from the Hungarian idle
pool, and the door FSM hands the car straight from DoorClosing
back to MovingToStop(next) without ever passing through
Stopped. The loading phase boards every eligible rider regardless
of the linear up/down lamps, so a Loop car serves every waiter at
every served stop on every lap.
That continuous-patrol behaviour is the LoopSweep contract from
docs/plans/loop-lines-v1.md. This struct exists so that:
- Loop groups have a typed default that round-trips through
snapshots and config files via
BuiltinStrategy::LoopSweepinstead of silently inheritingBuiltinStrategy::Scan— which would replay any restored sim with the wrong identity. - The construction-time validation can name the only strategy a Loop group is allowed to carry, rejecting Linear-only strategies loud rather than silently misbehaving.
All DispatchStrategy hooks fall back to defaults: Loop cars
never reach the Hungarian, so rank is
unreachable in practice, and there is no per-car or per-pass scratch
that needs to round-trip — the whole struct is unit-shaped.
Future Loop-aware behaviour (skip-empty-stops, headway-driven hold
recovery) will land in successors (LoopSchedule).
Structs§
- Loop
Sweep Dispatch - Dispatch strategy for
LineKind::Loopgroups.