SHARE
TWEET

Untitled

a guest Sep 16th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #shortest part
  2. param numNodes;
  3. set Nodes := 1..numNodes;
  4.  
  5. param cost{i in Nodes,j in Nodes};
  6. param demand{i in Nodes};
  7.  
  8. var flow{i in Nodes,j in Nodes} >= 0;
  9. minimize tripcost: sum{i in Nodes,j in Nodes} flow[i,j] * cost[i,j];
  10.  
  11. s.t. conservation{i in Nodes}:sum{h in Nodes} flow[h,i]-sum{j in Nodes} flow[i,j] >= demand[i];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top