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

efficiency fails to compute (global & local) #17

Open
anastassiavybornova opened this issue Sep 18, 2024 · 1 comment
Open

efficiency fails to compute (global & local) #17

anastassiavybornova opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@anastassiavybornova
Copy link
Collaborator

for both paris and lyon, lots of warnings

Problem with efficiency_local_routed.
Problem with efficiency_global_routed.

caused by calculate_metrics https://github.com/mszell/bikenwgrowth/blob/f4bee1cd17abb36c39070dfd3bb08d47e4e8b911/code/functions.py#L998C5-L998C22 possibly empty graphs?

@Froguin99
Copy link

Also experiencing this. It appears that efficiency value is almost always calculated as zero (as EG is always zero, presumably as there is no path between the input nodes) in here:

def calculate_efficiency_global(G, numnodepairs = 500, normalized = True):
Not sure if that is the cause of the problem or a sympton of it. Same occurs with local routed in the following function.

I've tried looking at the input data into

" output_MST, cov_MST = calculate_metrics(res[\"MST\"], res[\"MST_abstract\"], G_carall, nnids, output, buffer_walk, numnodepairs, debug, True, ig.Graph(), Polygon(), False, Gexisting)\n",
to try and find a source of the issue. The inputs G_carall seems okay, it doesn't have any disconnected components so paths between all nodes should be possible. Similarly, the graphs loaded from the resultsfile look visually correct when I plotted them prior to calculcating the metrics.

Any other ideas of where I could try and debug? Still getting my head around how everything fits together 😄

@mszell mszell added the bug Something isn't working label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants