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

Travel time weight #268

Merged
merged 5 commits into from
Feb 18, 2025
Merged

Travel time weight #268

merged 5 commits into from
Feb 18, 2025

Conversation

Grufoony
Copy link
Collaborator

No description provided.

}
double streetTime(const Graph* graph, Id node1, Id node2) {
const auto street{graph->street(node1, node2)};
const auto length{(*street)->length()};

Check warning

Code scanning / Cppcheck (reported by Codacy)

Local variable 'speed' shadows outer function Warning

Local variable 'speed' shadows outer function
GIVEN(
"A dynamics objects, many streets and an itinerary with bifurcations (TIME "
"WEIGHTED)") {
Street s1{0, std::make_pair(0, 1), 5., 50.};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
"A dynamics objects, many streets and an itinerary with bifurcations (TIME "
"WEIGHTED)") {
Street s1{0, std::make_pair(0, 1), 5., 50.};
Street s2{1, std::make_pair(1, 2), 7., 70.};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
"WEIGHTED)") {
Street s1{0, std::make_pair(0, 1), 5., 50.};
Street s2{1, std::make_pair(1, 2), 7., 70.};
Street s3{2, std::make_pair(0, 3), 9., 90.};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
Street s1{0, std::make_pair(0, 1), 5., 50.};
Street s2{1, std::make_pair(1, 2), 7., 70.};
Street s3{2, std::make_pair(0, 3), 9., 90.};
Street s4{3, std::make_pair(3, 2), 10., 100.};

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.90%. Comparing base (03a0785) to head (14084eb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   90.71%   90.90%   +0.18%     
==========================================
  Files          35       35              
  Lines        4976     5011      +35     
  Branches      459      462       +3     
==========================================
+ Hits         4514     4555      +41     
+ Misses        462      456       -6     
Flag Coverage Δ
unittests 90.90% <100.00%> (+0.18%) ⬆️

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.

@@ -132,17 +134,17 @@
auto const& row{m_graph.adjMatrix().getRow(nodeId)};
for (const auto nextNodeId : row) {
if (nextNodeId == destinationID) {
if (std::abs(m_graph.street(nodeId * dimension + nextNodeId)->length() -
minDistance) < 1.) // 1 meter tolerance between shortest paths
if (std::abs(m_weightFunction(&m_graph, nodeId, nextNodeId) - minDistance) <

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 10.4 rule Note

MISRA 10.4 rule
distance - minDistance) <
1.}; // 1 meter tolerance between shortest paths
std::abs(m_weightFunction(&m_graph, nodeId, nextNodeId) + distance -
minDistance) <

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 10.4 rule Note

MISRA 10.4 rule
@Grufoony Grufoony marked this pull request as ready for review February 18, 2025 08:34
@Grufoony Grufoony merged commit 1848e83 into main Feb 18, 2025
17 checks passed
@Grufoony Grufoony deleted the travelTimeWeight branch February 18, 2025 08:34
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