Comments (3)
I am happy with using pandas as our main external interface for problems with many edge attributes. It's cleaner than adding a new dep or using a function with many inputs.
To make it super easy for people to use I think we should aim to transform stuff for people with different preferences to use (we can add these as optional deps: i.e. only define the function when the import is available).
For graph-based mods, we could have, for example (thanks to Python's lack of overloading),
graph_mod(data: pd.DataFrame, ...)
graph_mod_sp(G: sp.sparray, ...)
(This can be the default one when pandas one is not needed)graph_mod_nx(G: nx.DiGraph, ...)
(optional dep)
This will really help peeps in the graph community try these out. Of course, as @ruthmair pointed out, some of these libraries will already have algorithms for these problems in place, but sometimes they will not!
from gurobi-optimods.
Sounds good. You can overload the same function name if you want; just check the argument type. I've done that in bipartite matching. It looks ok but might start to look odd when e.g. networkx requires only one object as an argument but pandas/scipy require two.
from gurobi-optimods.
We have a more consistent approach now: use scipy and pandas as much as possible, but also provide some documented way to pass a networkx graph. Closing.
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
- MeanVariancePortfolio.efficient_portfolio should return a dataclass HOT 1
- Add an 'advanced' label to some parts of the docs HOT 1
- Upon license limit exceeded error, rephrase error message and link KB article 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.