Gurobi / gurobi-optimods

Data-driven APIs for common optimization tasks
https://gurobi-optimods.readthedocs.io
Apache License 2.0
143 stars 31 forks source link

Network Design Optimod #36

Open stevedwards opened 1 year ago

stevedwards commented 1 year ago

Why this Mod?

I have heard Network Design problems being discussed with a few users now so they seem to be receiving a bit of attention. Essentially you have nodes and possible arcs between the nodes as well as commodities that must flow from one specific node to another in certain quantities. There are costs to build the arcs as well as costs for commodities to flow along them. The task is to design the network to minimize the cost such that all the commodities can get where they need to be in the required quantities. This feels like a nice optimod as it can be expressed and visualised with graphs. Alternatively, it could naturally be described in terms of supply chains.

Does it fall under an existing category?

What will the API be?

The data that needs to be conveyed is:

The API could look something like

network, cost = gurobi_optimods.network_design(arc_labeled_network, commodities)

Where:

Additional context

Started looking into Network Design problems as supposedly they lend themselves well to Benders Decomposition but have found that the default Gurobi behavior is very strong so think a basic MIP model will suffice for this.

simonbowly commented 1 year ago

Sounds great @stevedwards !

Just one thought, I know I suggested scipy.sparse as a way to capture the graph, but I did not think about the multiple labels part. networkx might be more suited to that, or a pandas dataframe with a multi-index like this: https://github.com/Gurobi/gurobipy-pandas/blob/netflow/docs/source/examples/networkflow.ipynb

stevedwards commented 1 year ago

I don't have permissions to assign myself to this mod btw. I've already failed step 1 of contributing haha.