0

I am pretty new to CPLEX. I searched for some solution for the last couple of days, but I could not find.

SO,in addition to my production transportation model, I want to add something that allows transshipment between warehouses. So in addition to the transportation amount from the production plan, each warehouse can receive stocks from other warehouses, if needed.

My idea was to use network flow model, but I did not know how to go further.

So I would create add into my model,

tuple routes{ int fromWarehouse: int toWarehouse;} {routes} possible_routes=...;

and in data I defined the routes as following:

possible_routes = {<1,2>, <1,3>, <2,1>, <2,3>, <3,1>, <3,2>}

And for example if X is the quantity that can go from warehouse 1 to warehouse 3, how do I use define indexes for these? The already existing index for warehouse is i.

Thank you in advance!

jen p
  • 1
  • 2

1 Answers1

0
dvar int+ X[possible_routes];

will define a positive integer decision variable per route in posible routes

Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15