There's a supply network design problem that I'm trying to solve, which is as follows:
A certain amount of goods need to be transported from point A to B, and can have stoppages in between with a limit of lets say n. These stoppages can be used to consolidate the goods and send further. The task is to achieve the transportation with minimum cost for the source-destination pairs. These potential stoppages can be any node from the graph G =(V,E).
My first attempt was to use to find the best path between source and destination pair individually, which I'm able to do, but that's not ideal as its not total cost minimization. I'm new to Pyomo and gurobi type modelling. Any advice how can i model the below data would be appreciated.
For optimizing for each src-dest piar, I did this:
stop1 = m.addVars(stops_len, vtype=GRB.BINARY, name='select stop1') stop2 = m.addVars(stops_len, vtype=GRB.BINARY, name='select stop2') assign = m.addVars(prod_stop1_stop2, ub=2, vtype=GRB.CONTINUOUS, name='Assign')
Which let me choose the combnination of stop1 and stop2. But this is not enough as i minimizes indiv scr-dest paths, not global cost.
What i wish to solve looks like below format of data:
|Source||Dest||Potential stop1||Potential stop2||Goods|
Potential stops1 and 2 are list of potential stops i find via some meta-heuristic. So, my question is how can i model the data shown above in Pyomo or gurobi or any other tool? Any help would be appreciated.