Add edge Dijkstra#493
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an edge-based “global Dijkstra” capability (dual graph) to compute next-hop transitions toward a target edge, and wires it through the mobility stack with updated tests and bindings. It also includes a few ancillary changes (PathCollection formatting/behavior, random agent transition refactor, and version bumps).
Changes:
- Add
Network::allEdgePathsTo()andRoadNetwork::allEdgePathsTo()plus edge-distance Dijkstra helpers. - Extend tests to validate edge-path behavior (including closed-road filtering) and expose the API via pybind.
- Refactor random-agent next-street selection logic and bump DSF version / citation metadata.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/mobility/Test_graph.cpp | Adds/adjusts unit tests covering allEdgePathsTo() and updates PathCollection::explode expectations. |
| src/dsf/mobility/RoadNetwork.hpp | Implements RoadNetwork-specific edge-distance Dijkstra and allEdgePathsTo() with turn/U-turn rules. |
| src/dsf/mobility/Itinerary.hpp | Adds Itinerary::size() convenience accessor. |
| src/dsf/mobility/FirstOrderDynamics.hpp | Declares helper to extract a street from weighted transition probabilities; adds random-agent path selection API. |
| src/dsf/mobility/FirstOrderDynamics.cpp | Implements random-agent transition selection and refactors probability-based edge selection into a helper. |
| src/dsf/dsf.hpp | Bumps patch version to 6.3.3. |
| src/dsf/bindings.cpp | Exposes RoadNetwork::allEdgePathsTo() to Python. |
| src/dsf/base/PathCollection.hpp | Adds <format> include and a std::formatter<dsf::PathCollection> specialization. |
| src/dsf/base/PathCollection.cpp | Changes PathCollection::explode() to throw when a source is missing. |
| src/dsf/base/Network.hpp | Adds edge-distance Dijkstra helpers and allEdgePathsTo() to the generic network. |
| CITATION.cff | Updates version/date-released metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #493 +/- ##
==========================================
- Coverage 85.62% 84.79% -0.84%
==========================================
Files 54 54
Lines 8121 8289 +168
Branches 931 975 +44
==========================================
+ Hits 6954 7029 +75
- Misses 1152 1245 +93
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No description provided.