Setting multiple number to facilities in a single location
Awaiting user inputHi,
My problem can be described in reference of GUROBI Jupyter Supply Cahin - 2 example. Please see the link - (https://colab.research.google.com/github/Gurobi/modeling-examples/blob/master/supply_network_design_1_2/supply_network_design_2_gcl.ipynb#scrollTo=rtVsVxAQBUPB) or (https://www.gurobi.com/resource/supply-network-design-i-and-ii/).
But, in the supply chain design in the link, maximum one depo can be opened in one location, i.e., the equation is following with a binary type.
open = model.addVars(depots, obj=opencost, vtype=GRB.BINARY, name="open")
How can I make the model flexible to select more than one depo in a single location using INTEGER type? I just tried to convert my model using GRB.INTEGER variable type, but it did not get solution.
Thanks in advance
Kazi
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Kazi,
Changing the variable type to integer results into the exact same solution. It means that even you allow for opening of more than one depot at each location, the solution with the optimal cost is still to have at most one depot at each location (for the given input data).
To better understand the problem you are trying to solve, could you please explain how opening more than one depot in each location affects the problem input? Is there additional fixed cost to open the second depot in a location? How about the total throughput of a location? Is it fixed in advance?
Best regards,
Maliheh0 -
Hi Maliheh,
Thanks for your comments! I already solved the problem. Simply setting the variable type to GRB.INTEGER was my solution. Yes, it depends on the throughput of a location. In my case the material flows are much higher than a single depot in a location. Therefore, I needed to open more than one depot in the candidate locations. There is an additional fixed cost for opening a depot. With a cost minimizing approach, the model selected the optimum number of depos in the candidate locations.
Thanking you,
Kazi
0
Post is closed for comments.
Comments
3 comments