Skip to content

Add edge Dijkstra#493

Merged
Grufoony merged 11 commits into
mainfrom
edgeDijkstra2
Jul 1, 2026
Merged

Add edge Dijkstra#493
Grufoony merged 11 commits into
mainfrom
edgeDijkstra2

Conversation

@Grufoony

@Grufoony Grufoony commented Jul 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() and RoadNetwork::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.

Comment thread src/dsf/base/PathCollection.cpp
Comment thread src/dsf/bindings.cpp Outdated
Comment thread src/dsf/mobility/FirstOrderDynamics.hpp
Comment thread src/dsf/mobility/FirstOrderDynamics.cpp
Comment thread src/dsf/mobility/RoadNetwork.hpp Outdated
Comment thread test/mobility/Test_graph.cpp Outdated
Comment thread test/mobility/Test_graph.cpp Outdated
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.13953% with 90 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.79%. Comparing base (f3b06af) to head (9ab930d).

Files with missing lines Patch % Lines
src/dsf/base/Network.hpp 0.00% 57 Missing ⚠️
src/dsf/mobility/RoadNetwork.hpp 69.51% 25 Missing ⚠️
src/dsf/mobility/FirstOrderDynamics.cpp 87.09% 8 Missing ⚠️
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              
Flag Coverage Δ
unittests 84.79% <58.13%> (-0.84%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Grufoony
Grufoony merged commit 6a147ed into main Jul 1, 2026
29 of 32 checks passed
@Grufoony
Grufoony deleted the edgeDijkstra2 branch July 1, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants