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

make sure graph has travel time #195

Merged
merged 6 commits into from
Apr 26, 2023
Merged

make sure graph has travel time #195

merged 6 commits into from
Apr 26, 2023

Conversation

nreinicke
Copy link
Collaborator

@nreinicke nreinicke commented Apr 26, 2023

Based on the networkx docs, the shortest path algorithm accepts a weight string and if that string does not appear on an edge, the weight defaults to 1. This makes sure that the travel time attribute exists on all the edges when importing a graph.

Closes #36

@nreinicke nreinicke requested a review from robfitzgerald April 26, 2023 15:34
Copy link
Collaborator

@robfitzgerald robfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. one question, maybe a straggler change from another PR

Copy link
Collaborator

@robfitzgerald robfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested by fudging with the denver road network and saw both helpful warnings. i think that's enough to let the user know that something's wrong. thanks nick!

@nreinicke nreinicke merged commit 185d0cf into main Apr 26, 2023
@nreinicke nreinicke deleted the ndr/osm-weight-check branch April 26, 2023 19:29
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.

assign travel time to networkx links
2 participants