-
Notifications
You must be signed in to change notification settings - Fork 4
Make RoadJunction's transportCapacity attribute a real number #281
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #281 +/- ##
==========================================
+ Coverage 90.95% 90.97% +0.01%
==========================================
Files 36 37 +1
Lines 5153 5152 -1
Branches 463 463
==========================================
Hits 4687 4687
+ Misses 466 465 -1
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:
|
| /// @brief Construct a new Intersection object | ||
| /// @param id The node's id | ||
| explicit Intersection(Id id) : Node{id} {}; | ||
| explicit Intersection(Id id) : RoadJunction{id} {}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
Member variable 'Intersection::m_agentCounter' is not initialized in the constructor. Note
| /// @param id The node's id | ||
| /// @param coords A std::pair containing the node's coordinates | ||
| Intersection(Id id, std::pair<double, double> coords) : Node{id, coords} {}; | ||
| Intersection(Id id, std::pair<double, double> coords) : RoadJunction{id, coords} {}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
Member variable 'Intersection::m_agentCounter' is not initialized in the constructor. Note
| Intersection(Id id, std::pair<double, double> coords) : RoadJunction{id, coords} {}; | ||
|
|
||
| Intersection(Node const& node) : Node{node} {}; | ||
| Intersection(RoadJunction const& node) : RoadJunction{node} {}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
Member variable 'Intersection::m_agentCounter' is not initialized in the constructor. Note
| Intersection(Id id, std::pair<double, double> coords) : RoadJunction{id, coords} {}; | ||
|
|
||
| Intersection(Node const& node) : Node{node} {}; | ||
| Intersection(RoadJunction const& node) : RoadJunction{node} {}; |
Check warning
Code scanning / Cppcheck (reported by Codacy)
Class 'Intersection' has a constructor with 1 argument that is not explicit. Warning
|
|
||
| RoadJunction& operator=(RoadJunction const& other) { | ||
| if (this != &other) { | ||
| Node::operator=(other); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 17.7 rule Note
| value += pStreet->nLanes() * pStreet->transportCapacity(); | ||
| } | ||
| pNode->setTransportCapacity(value == 0 ? 1 : value); | ||
| pNode->setTransportCapacity(value == 0. ? 1. : value); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
| namespace dsm { | ||
| Station::Station(Id id, Delay managementTime) | ||
| : Node(id), m_managementTime{managementTime} {} | ||
| : RoadJunction(id), m_managementTime{managementTime} {} |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
|
|
||
| Station::Station(Id id, std::pair<double, double> coords, Delay managementTime) | ||
| : Node(id, coords), m_managementTime{managementTime} {} | ||
| : RoadJunction(id, coords), m_managementTime{managementTime} {} |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| Station::Station(Node const& node, Delay managementTime) | ||
| : Node(node), m_managementTime{managementTime} {} | ||
| Station::Station(RoadJunction const& node, Delay managementTime) | ||
| : RoadJunction(node), m_managementTime{managementTime} {} |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| Station::Station(Station const& other) | ||
| : Node(other), m_managementTime{other.m_managementTime}, m_trains{other.m_trains} {} | ||
| : RoadJunction(other), | ||
| m_managementTime{other.m_managementTime}, |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
And separate RoadJunction class from Node