-
Notifications
You must be signed in to change notification settings - Fork 31
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
Enable multiple edges in the same direction between two nodes for pandas #156
Conversation
|
@simonbowly Would it be possible to trigger the test cases. They are working locally, but I want to make sure that everything is working properly. |
@jsfreischuetz thanks for the work! I re-ran the tests. The issue I have is that this changes the expected input/output data format. To make sure the PR doesn't make backwards-incompatible changes, could you please revert the original tests and add some new tests for cases with duplicate edges (and their expected results)? This should still be do-able, pandas can handle duplicate values in the index. |
The current format returns only identified the edge with a tuple of source destination for each flow. This makes it ambiguous which edge was taken. It can be reconstructed by the user by making a few assumptions about the flows. I will make the change leaving the format, but for ease of use for users, eventually the output format should likely be modified. |
Good point, it might need a re-think. @torressa do you have any thoughts on this one? |
Enable multiple edges in the same direction between two nodes
Description
Currently the solver does not support multiple edges of between two nodes in the same direction. This draft PR shows a quick way of enabling this feature in Pandas. This requires changing some minor implementation details about the way that indices are used in the DataFrame when converting.
fixes #155
For networkx, it would require a type change to MultiDiGraph, and for scipy, it may not be trivially possible to implement these changes.
This PR draft is mostly intended as a jumping off point for showing it is possible to solve this, rather then a general solution.
Checklist
gurobi_optimods
installable packagetests/
gurobi_optimods.datasets
for loading data)