Commit 47ed737
committed
feat: introduce GeofencingEnforcement strategy pattern for zone-type-specific routing decisions
Replace the 220-line StreetEdge geofencing if-chain with a three-layer
architecture using the Strategy pattern:
- Layer 0: Zone state tracking (StateEditor.updateGeofencingZones, from commit 3)
- Layer 1: Network commitment for generic arriveBy states
- Layer 2: GeofencingEnforcement strategy per zone type
New enforcement implementations:
- RestrictedZoneEnforcement: no-drop-off and no-traversal zones (fork, block, drop)
- BusinessAreaEnforcement: inverted logic (exit = restrict)
- DeferredForkHandler: backState zone exit detection for deferred renting branches
The traversal skeleton iterates paired boundary extensions on fromv,
delegates to the appropriate enforcement via GeofencingEnforcement.forZone(),
and handles network commitment for generic states separately.
Delete old per-edge geofencing system: RentalRestrictionExtension,
GeofencingZoneExtension, NoRestriction, CompositeRentalRestrictionExtension,
BusinessAreaBorder, and all associated Vertex/State/StreetEdge methods.1 parent 7d18de8 commit 47ed737
44 files changed
Lines changed: 2732 additions & 1595 deletions
File tree
- application/src/main/java/org/opentripplanner
- routing/impl
- updater/vehicle_rental
- street/src
- main/java/org/opentripplanner
- service/vehiclerental/street
- geofencing
- street
- graph
- linking
- model
- edge
- vertex
- search
- state
- strategy
- test/java/org/opentripplanner
- service/vehiclerental/street/geofencing
- street
- integration
- linking
- model
- edge
- vertex
- search
- state
- strategy
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
| |||
224 | 222 | | |
225 | 223 | | |
226 | 224 | | |
227 | | - | |
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
| |||
235 | 232 | | |
236 | 233 | | |
237 | 234 | | |
238 | | - | |
239 | 235 | | |
240 | 236 | | |
241 | 237 | | |
| |||
246 | 242 | | |
247 | 243 | | |
248 | 244 | | |
249 | | - | |
| 245 | + | |
250 | 246 | | |
251 | 247 | | |
252 | | - | |
253 | 248 | | |
254 | 249 | | |
255 | 250 | | |
| |||
Lines changed: 0 additions & 81 deletions
This file was deleted.
Lines changed: 0 additions & 113 deletions
This file was deleted.
Lines changed: 0 additions & 13 deletions
This file was deleted.
street/src/main/java/org/opentripplanner/service/vehiclerental/street/GeofencingZoneExtension.java
Lines changed: 0 additions & 94 deletions
This file was deleted.
0 commit comments