Comments (6)
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.
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.
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.
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.
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.
Closing as base functionality is already in; follow-up in #51.
from gurobi-optimods.
Related Issues (20)
- Conda package HOT 1
- Add a generic timelimit parameter
- Mention time limit more prominently
- Vertex Coloring Optimod HOT 4
- Facility location optimod HOT 3
- OPF problem HOT 6
- Update (most) mods to return a dataclass
- lower and upper bound for the real part of the slack voltage
- Metromap - Octilinear Graph Representation
- Numpy 2.0 Compatibility HOT 1
- Fix numpy 2.0 and scipy 1.14 incompatibilities
- Missing option in line optimization mod documentation HOT 2
- Two edges between two nodes not properly calculated HOT 2
- Link to KB article explaining Gurobi-side of the optimods HOT 4
- Updates to the workforce scheduling mod HOT 1
- Use pydocstyle to force pedantism on our docstrings via precommit hook HOT 1
- Extend the workforce scheduling mod HOT 2
- Mod enhancement: labor rules in workforce mod HOT 1
- Make sure linked article in mod error message is public HOT 1
- Domino Art HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gurobi-optimods.