Skip to content
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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Conversation

Grufoony
Copy link
Collaborator

No description provided.

// 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

MISRA 12.3 rule
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

MISRA 12.1 rule
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

MISRA 12.3 rule
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

MISRA 12.1 rule
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

MISRA 14.4 rule
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

MISRA 12.3 rule
src/dsm/sources/Graph.cpp Fixed Show fixed Hide fixed
"\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

MISRA 4.1 rule
"\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

MISRA 18.4 rule
#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

MISRA 4.1 rule
src/dsm/sources/Graph.cpp Fixed Show fixed Hide fixed
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 70.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 89.70%. Comparing base (a197142) to head (fe2f5c0).

Files with missing lines Patch % Lines
src/dsm/headers/Dynamics.hpp 80.00% 5 Missing ⚠️
src/dsm/sources/Graph.cpp 60.00% 4 Missing ⚠️
src/dsm/utility/Logger.cpp 0.00% 3 Missing ⚠️
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     
Flag Coverage Δ
unittests 89.70% <70.00%> (-0.10%) ⬇️

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.

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.

1 participant