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

Implement max flow and min cut #96

Merged
merged 18 commits into from
Oct 20, 2023
Merged

Conversation

simonbowly
Copy link
Member

@simonbowly simonbowly commented Jun 13, 2023

Description

Continuation of #51.

For a new Mod contribution, please include the issue number for the Mod proposal and check through the list below.

Checklist

  • Implementation:
    • Implementation of the Mod in the gurobi_optimods installable package
    • Tests for the Mod implementation in tests/
    • Docstrings for public API, correctly linked using sphinx-autodoc
  • Documentation page:
    • Background and problem specification
    • Example of the input data format (use gurobi_optimods.datasets for loading data)
    • Runnable code example
    • Presentation of solutions
    • Included in the mod gallery and toctree

Have a nice day!

@simonbowly simonbowly marked this pull request as ready for review June 13, 2023 22:47
Copy link
Member Author

@simonbowly simonbowly left a comment

Choose a reason for hiding this comment

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

@torressa looking good! I made some adjustments to the docstrings and doctests to align with changes we made to the rest of the mods. Please see my comments for some further changes I think are needed here.

docs/source/mods/max-flow-min-cut.rst Outdated Show resolved Hide resolved
docs/source/gallery.rst Show resolved Hide resolved
docs/source/mods/max-flow-min-cut.rst Outdated Show resolved Hide resolved
docs/source/mods/max-flow-min-cut.rst Outdated Show resolved Hide resolved
docs/source/mods/max-flow-min-cut.rst Outdated Show resolved Hide resolved
docs/source/mods/max-flow-min-cut.rst Outdated Show resolved Hide resolved
docs/source/mods/max-flow-min-cut.rst Outdated Show resolved Hide resolved
tests/test_max_flow.py Outdated Show resolved Hide resolved
tests/test_min_cut.py Outdated Show resolved Hide resolved
@torressa
Copy link
Member

@simonbowly I think I've addressed most comments and may have messed up the commits again.

@CLAassistant
Copy link

CLAassistant commented Jul 10, 2023

CLA assistant check
All committers have signed the CLA.

@simonbowly
Copy link
Member Author

@torressa sorry for the delay on this one. I have a couple more suggestions:

  • Can the formulation code be re-used between max-flow and min-cut? The model is exactly the same, right?
  • In the docs, I think the solution section would be easier to follow if it were split up. At least the code blocks showing the max-flow/min-cost results should be separated for readability, and it may help to separate the figures showing the max flow and min-cut results.

@simonbowly simonbowly added this to the 1.1.0 release milestone Jul 28, 2023
@simonbowly simonbowly removed this from the 1.1.0 release milestone Jul 31, 2023
@torressa
Copy link
Member

torressa commented Aug 4, 2023

Can the formulation code be re-used between max-flow and min-cut? The model is exactly the same, right?

It is, yeah, but I need the dual values for the constraints, and it's easier to access this separately. Otherwise I can't see how to do it without modifying a lot of stuff.

@simonbowly simonbowly added this to the 1.2.0 release milestone Oct 16, 2023
@simonbowly simonbowly merged commit d1723e8 into Gurobi:main Oct 20, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants