Skip to content

Conversation

@Grufoony
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a 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 PR adds a CounterPosition enum to enable configurable counter placement on streets. The counter can now be positioned at ENTRY, MIDDLE, or EXIT points, allowing more flexible traffic flow monitoring.

Changes:

  • Introduced CounterPosition enum with three values: ENTRY, MIDDLE, and EXIT
  • Updated enableCounter() method signature to accept a CounterPosition parameter with EXIT as the default
  • Modified counter increment logic in addAgent(), enqueue(), and dequeue() methods to respect the counter position
  • Added comprehensive test coverage for all three counter positions

Reviewed changes

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

File Description
src/dsf/mobility/Street.hpp Adds CounterPosition enum and updates enableCounter signature with position parameter
src/dsf/mobility/Street.cpp Implements position-aware counter increment logic across agent lifecycle methods
test/mobility/Test_street.cpp Adds three test subcases validating counter behavior at ENTRY, MIDDLE, and EXIT positions

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

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.66%. Comparing base (bb14e39) to head (e4ec4b2).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
+ Coverage   83.60%   83.66%   +0.06%     
==========================================
  Files          53       53              
  Lines        5373     5393      +20     
  Branches      616      618       +2     
==========================================
+ Hits         4492     4512      +20     
  Misses        870      870              
  Partials       11       11              
Flag Coverage Δ
unittests 83.66% <100.00%> (+0.06%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

THEN("The input flow is one immediately") { CHECK_EQ(street.counts(), 1); }
street.enqueue(0);
THEN("The input flow is still one") { CHECK_EQ(street.counts(), 1); }
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
@Grufoony Grufoony merged commit 3898522 into main Jan 15, 2026
20 checks passed
@Grufoony Grufoony deleted the counterPosition branch January 15, 2026 10:01
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