@@ -115,6 +115,32 @@ into the set. This is because 7 < 9 (comparing the 1st criterion of element 1),
115115(comparing with the 2nd criterion of elements 2 and 3). ` [6,7] ` would not make it into the set
116116because the existing element ` [5,6] ` is better than the new element for both criteria.
117117
118+
119+ ## Via-Location Search (chained-segments)
120+
121+ Via-location search enables routing through one or more intermediate via points. The design
122+ composes multiple Raptor searches together, with one search per segment between consecutive via
123+ points. For example, a journey from A to C via B requires two segments: A→B and B→C.
124+
125+ When the search arrives at a via point stop, the arrival state is transferred to the next segment's
126+ search for that same stop using stop arrival events. This allows the subsequent segment to continue
127+ from where the previous segment ended. At the completion of all segment searches, the results are
128+ aggregated into complete paths that traverse all via points in order.
129+
130+ One or more via points may be reached via access/egress. To support this, the access and egress are
131+ inserted in the "correct" segment, and the result is collected from all segments. The destination
132+ can be reached from any segment (if egress contains the via points), not just the last one.
133+
134+ The via-location implementation does not change the routing implementation, it just wires it up
135+ differently. This maintains the performance characteristics and optimizations of the
136+ underlying Raptor algorithm while extending it to support via-point routing.
137+
138+ Important code for this is found in:
139+ - ` RangeRaptorWorkerComposite ` - chains Raptor searches together
140+ - ` RouterResultPathAggregator ` - aggregates results
141+ - ` ViaConnectionStopArrivalEventListener ` - copies stop arrivals from one segment to the next
142+
143+
118144# Features
119145
120146## Algorithm implementation
0 commit comments