Git Product home page Git Product logo

Comments (6)

simonbowly avatar simonbowly commented on September 23, 2024 1

network_flow might as well be public: it could make a good nup itself if there is more information we want to convey about the formulation

from gurobi-optimods.

torressa avatar torressa commented on September 23, 2024

Happy if we want to further split this into three issues, but thinking about the common formulation probably leads to a cleaner implementation.

from gurobi-optimods.

rluce avatar rluce commented on September 23, 2024

Yes such network flow problems certainly deserve a nup/nups. How exactly this should be realized in the backend? Many options, we should brainstorm a little before starting this. My current thinking is "simplicity first", but what exactly that means remains to be determined.

from gurobi-optimods.

simonbowly avatar simonbowly commented on September 23, 2024

In the short term I agree, simplicity first. It would be good to just implement various specific network flow problems without any dependency on one another.

Long term - as an educational tool it would be great to show a heirarchy of how various problems reduce to network flows, then each specific case can use the network flow nup as it's backend.

from gurobi-optimods.

torressa avatar torressa commented on September 23, 2024

Cool! Will split this into three at some point this week.

How exactly this should be realized in the backend?

In the backend complicated version, I was thinking of just having a single private network flow formulation for these problems nupstup._network_flow and then using the table above to formulate and solve the problem depending on the call.

# nupstup.min_cost_flow would return 
nupstup._network_flow(G, costs, capacities, demand, source, sink)
# nupstup.shortest_path
nupstup._network_flow(G, costs, [1 for _ in arcs], [1, 1], source, sink)
# max_flow returns (need to define V' for this one)
nupstup._network_flow(
    G,
    [-1 for e in edges if e[0] == source],
    capacities,
    None,
    source,
    sink,
    Vd=[n for n in nodes if n not in [source, sink]],
)

Except for min-cut where max-flow has to be run then we have to process the cutsets using the solution but this we will have to do anyway.

I think this sort of grouping would help maintenance, but yeah I agree it is a bit too much for the beginning.

from gurobi-optimods.

rluce avatar rluce commented on September 23, 2024

Closing as base functionality is already in; follow-up in #51.

from gurobi-optimods.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.