-
Notifications
You must be signed in to change notification settings - Fork 4
New SINGLE TAIL optimization algorithm for Traffic Lights
#295
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
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 implements changes to support the new SINGLE TAIL optimization algorithm for traffic lights. Key changes include updates to test cases reflecting new parameters, additions to utility type definitions, modifications to traffic light cycle reset logic, and a version bump.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/Test_dynamics.cpp | Updated test cases to call optimizeTrafficLights with a new numeric parameter value. |
| src/dsm/utility/Typedef.hpp | Added header includes and introduced a new constexpr array mapping directions to text. |
| src/dsm/sources/TrafficLight.cpp | Modified the resetCycles() logic to use a ternary operator for cycle resetting. |
| src/dsm/headers/TrafficLight.hpp | Added a new member variable (m_defaultCycles) to hold default traffic light cycle values. |
| src/dsm/dsm.hpp | Updated the DSM version patch to reflect the new version. |
Comments suppressed due to low confidence (2)
test/Test_dynamics.cpp:802
- [nitpick] Consider using a named constant instead of the literal '1' for the first parameter of optimizeTrafficLights to improve code clarity.
dynamics.optimizeTrafficLights(1, dsm::TrafficLightOptimization::SINGLE_TAIL);
src/dsm/sources/TrafficLight.cpp:231
- [nitpick] The use of the ternary operator for executing assignments reduces readability; consider refactoring this logic using an if-else statement for clarity and maintainability.
m_defaultCycles.empty() ? m_defaultCycles = m_cycles : m_cycles = m_defaultCycles;
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
==========================================
- Coverage 89.99% 87.65% -2.35%
==========================================
Files 38 38
Lines 5536 5790 +254
Branches 520 572 +52
==========================================
+ Hits 4982 5075 +93
- Misses 554 715 +161
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.
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.