-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for io flags in importOSMNodes
function
#256
base: main
Are you sure you want to change the base?
Conversation
// cycle over the nodes | ||
|
||
// Cache shortest paths to avoid redundant calculations | ||
std::unordered_map<Id, std::optional<DijkstraResult>> shortestPaths; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
for (const auto& [nodeId, node] : m_graph.nodeSet()) { | ||
if (nodeId == destinationID) { | ||
if (nodeId == destinationID || m_graph.adjMatrix().getRow(nodeId).empty()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
const auto minDistance = result.value().distance(); | ||
shortestPaths[nodeId] = result; // Cache for reuse | ||
|
||
for (const auto& [nextNodeId, _] : m_graph.adjMatrix().getRow(nodeId)) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
if (nextNodeId == destinationID) { | ||
if (minDistance == | ||
m_graph.streetSet()[nodeId * dimension + nextNodeId]->length()) { | ||
path.insert(nodeId, nextNodeId, true); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
shortestPaths[nextNodeId] = m_graph.shortestPath(nextNodeId, destinationID); | ||
} | ||
|
||
if (shortestPaths[nextNodeId].has_value()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
requires(is_numeric_v<delay_t>) | ||
void RoadDynamics<delay_t>::addAgentsRandomly(Size nAgents, | ||
const size_t minNodeDistance) { | ||
std::unordered_map<Id, double> src_weights, dst_weights; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
"\033[0m\n"; | ||
#endif | ||
if (m_verbose) { | ||
std::clog << buildMessage("\033[38;2;0;255;0mDEBUG", message, location, m_verbose) + |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 4.1 rule Note
"\033[0m\n"; | ||
#endif | ||
if (m_verbose) { | ||
std::clog << buildMessage("\033[38;2;0;255;0mDEBUG", message, location, m_verbose) + |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 18.4 rule Note
#endif | ||
if (m_verbose) { | ||
std::clog << buildMessage("\033[38;2;0;255;0mDEBUG", message, location, m_verbose) + | ||
"\033[0m\n"; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 4.1 rule Note
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #256 +/- ##
==========================================
- Coverage 89.79% 89.70% -0.10%
==========================================
Files 34 34
Lines 4518 4545 +27
Branches 442 445 +3
==========================================
+ Hits 4057 4077 +20
- Misses 461 468 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
No description provided.