Setting up large linear programming problem

I am trying to solve a large scale linear programming problem for allocation of flows between three types of nodes, a, b and c. Allowable flows are from a to a' F(a,a'), from a to b F(a,b), and flows from a to c F(a,c). Then flows from b to c F(b,c), and flows from b to a F(b,a). With flows between a=a' and other possible combinations between m and m and c to a,b equal to zero. Then I know the overall flow between a specific node and the other type of nodes, I mean for example, for each node a I know how much the sum of flows to nodes b anc c should be. The same for other nodes. My objective function would be to minimize the sum of the products of distance times flow
  • f= sum(i,j, Flow(i,j)*distance(i,j)) where i=a,b; j=a,b,c;subject to the following constraints
  • sum(j, Flow(i,j))=known total outlet flow from a to b's for each i=a; where j's=all b's
  • sum(j, Flow(i,j))=known total outlet flow from a to c's for each i=a; where j's=all c's
  • sum(i, Flow(i,j))=known total inlet flow from a's to b for each j=b; where i's=all a's
  • sum(j, Flow(i,j))=known total outlet flow from b to a's for each i=b; where j's=all a's
  • sum(j, Flow(i,j))=known total outlet flow from b to c's for each i=b; where j's=all c's
  • sum(i, Flow(i,j))=known total inlet flow from a's and b's to c for each j=c; where i's=all a's and all b's
Any help in how to set up this problem in matricial form to be used by linprog solver would be really appreciated.
Thanks

1 Comment

You can try following the steps from this page to help you get started with setting up your problem to a matrix form that can be fed to linprog :

Sign in to comment.

Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!