Skip to content

make sure graph has travel time#195

Merged
nreinicke merged 6 commits intomainfrom
ndr/osm-weight-check
Apr 26, 2023
Merged

make sure graph has travel time#195
nreinicke merged 6 commits intomainfrom
ndr/osm-weight-check

Conversation

@nreinicke
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread nrel/hive/config/hive_config.py Outdated
Copy link
Copy Markdown
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