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

_dissect_flow_to_paths skips flow on parallel channels #34

Open
sebulino opened this issue Jan 30, 2023 · 0 comments
Open

_dissect_flow_to_paths skips flow on parallel channels #34

sebulino opened this issue Jan 30, 2023 · 0 comments

Comments

@sebulino
Copy link
Contributor

Flow is not added to an edge if placed on a parallel edge with a short_channel_id that is not yet in the MultiGraph.

if G.has_edge(src, dest):
                if channel.short_channel_id in G[src][dest]:
                    G[src][dest][channel.short_channel_id]["flow"] += flow
            else:
                G.add_edge(src, dest, key=channel.short_channel_id, flow=flow,
                           channel=channel, weight=channel.combined_linearized_unit_cost())

should be

if G.has_edge(src, dest) and (channel.short_channel_id in G[src][dest]):
                    G[src][dest][channel.short_channel_id]["flow"] += flow
            else:
                G.add_edge(src, dest, key=channel.short_channel_id, flow=flow,
                           channel=channel, weight=channel.combined_linearized_unit_cost())
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

No branches or pull requests

1 participant