Skip to content

Better handle of lane_mapping and forbidden_turns#495

Merged
Grufoony merged 10 commits into
mainfrom
manageTurnLanes
Jul 6, 2026
Merged

Better handle of lane_mapping and forbidden_turns#495
Grufoony merged 10 commits into
mainfrom
manageTurnLanes

Conversation

@Grufoony

@Grufoony Grufoony commented Jul 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.50847% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.94%. Comparing base (27c1cd5) to head (e3c5d36).

Files with missing lines Patch % Lines
src/dsf/mobility/RoadNetwork.cpp 8.21% 67 Missing ⚠️
src/dsf/mobility/FirstOrderDynamics.cpp 66.66% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #495      +/-   ##
==========================================
- Coverage   84.70%   83.94%   -0.77%     
==========================================
  Files          54       54              
  Lines        8304     8400      +96     
  Branches      975     1001      +26     
==========================================
+ Hits         7034     7051      +17     
- Misses       1255     1334      +79     
  Partials       15       15              
Flag Coverage Δ
unittests 83.94% <30.50%> (-0.77%) ⬇️

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.

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 lane-level turn information to cartography outputs (lane_mapping) and uses it to infer per-edge forbidden_turns, then wires these new attributes through the C++ road-network loaders and lane-choice logic.

Changes:

  • Add turn:lanes ingestion and derive lane_mapping plus optional forbidden_turns inference in Python cartography processing.
  • Extend C++ RoadNetwork CSV/JSON loading to read lane_mapping and forbidden_turns, and update lane selection behavior in FirstOrderDynamics.
  • Add Python tests for lane_mapping/forbidden_turns on a real OSM extract; bump DSF version to 6.5.0.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test/Test_cartography.py Adds integration-style tests asserting lane_mapping and inferred forbidden_turns exist and are well-formed.
src/dsf/utility/Typedef.hpp Reorders Direction enum values to support updated lane/turn semantics.
src/dsf/mobility/RoadNetwork.cpp Loads lane_mapping and forbidden_turns from CSV/JSON edge properties.
src/dsf/mobility/FirstOrderDynamics.cpp Uses laneMapping() to constrain lane selection; adjusts agent bookkeeping when removing “ghost” agents.
src/dsf/dsf.hpp Bumps minor version to 6.5.
src/dsf/cartography/cartography.py Adds turn:lanes capture, produces lane_mapping, and infers forbidden_turns based on headings.
CITATION.cff Updates package version to 6.5.0 and release date.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dsf/utility/Typedef.hpp Outdated
Comment thread src/dsf/mobility/RoadNetwork.cpp
Comment thread src/dsf/mobility/RoadNetwork.cpp
Comment thread src/dsf/mobility/FirstOrderDynamics.cpp
Comment thread src/dsf/mobility/FirstOrderDynamics.cpp
Comment thread src/dsf/cartography/cartography.py
Comment thread src/dsf/cartography/cartography.py Outdated
@Grufoony
Grufoony merged commit 9ae9a5a into main Jul 6, 2026
@Grufoony
Grufoony deleted the manageTurnLanes branch July 6, 2026 14:47
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