-
Notifications
You must be signed in to change notification settings - Fork 4
Add changeStreetNLanes functions
#397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #397 +/- ##
==========================================
+ Coverage 85.30% 85.55% +0.24%
==========================================
Files 53 53
Lines 5941 6063 +122
Branches 652 657 +5
==========================================
+ Hits 5068 5187 +119
- Misses 862 865 +3
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds functionality to dynamically change the number of lanes on streets in a road network simulation. The PR introduces methods to modify lane counts both at the Street level and RoadNetwork level (by ID or by name), with optional speed factor adjustments to simulate scenarios like construction zones.
Changes:
- Added
Street::changeNLanes()method to modify lane count with optional speed adjustment - Added
RoadNetwork::changeStreetNLanesById()andRoadNetwork::changeStreetNLanesByName()methods - Updated
dsf::queueanddsf::priority_queueclasses with move semantics and deleted copy operations - Added comprehensive test coverage for the new functionality
- Exposed the new methods to Python through pybind11 bindings
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/dsf/mobility/Street.hpp | Added changeNLanes() method declaration and private helper m_updateLaneMapping() |
| src/dsf/mobility/Street.cpp | Implemented changeNLanes() and refactored lane mapping logic into helper method |
| src/dsf/mobility/RoadNetwork.hpp | Added changeStreetNLanesById() and changeStreetNLanesByName() method declarations |
| src/dsf/mobility/RoadNetwork.cpp | Implemented RoadNetwork-level lane change methods and added logging to setStreetStatusById() |
| src/dsf/utility/queue.hpp | Added move constructors/operators and deleted copy operations; added using directives for base constructors |
| src/dsf/bindings.cpp | Exposed new lane change methods to Python API |
| test/mobility/Test_street.cpp | Added comprehensive tests for Street::changeNLanes() |
| test/mobility/Test_graph.cpp | Added comprehensive tests for RoadNetwork lane change methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cppcheck (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
No description provided.