This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ORIE 321/521/522 RECITATION 3 Spring 2007 Consider the following AMPL model file maxflow.mod for the maximum flow problem, which can be found in the MODELS folder within the amplcml folder. set nodes; param orig symbolic in nodes; param dest symbolic in nodes, <> orig; set arcs within (nodes diff {dest}) cross (nodes diff {orig}); param cap {arcs} >= 0; var Flow {(i,j) in arcs} >= 0, <= cap[i,j]; maximize Total_Flow: sum {(orig,j) in arcs} Flow[orig,j]; subject to Balance {k in nodes diff {orig,dest}}: sum {(i,k) in arcs} Flow[i,k] = sum {(k,j) in arcs} Flow[k,j]; Change this model so that the capacity constraints are explicit constraints of the model, rather than just upper bounds on the variable Flow . And also consider the corresponding data file, maxflow.dat : set nodes := s a b c d e t ; param orig := s ; param dest := t ; param: arcs: cap := s a 1 s b 4 s c 6 a b 3 a d 4 b a 2 b d 3 b e 1 c e 4 d t 9 e t 4 ; Draw the graph for this input. 1 Write out the linear programming formulation of the maximum flow problem for this input. There are 11 variables, 5 equality constraints, and 11 inequal ity constraints. Write the flow conservation constraints in the form “flow out  flow in” equals 0. For each variable, try to be very careful to keep allout  flow in” equals 0....
View
Full
Document
This lab report was uploaded on 04/06/2008 for the course ORIE 321 taught by Professor Shmoys/lewis during the Spring '07 term at Cornell.
 Spring '07
 SHMOYS/LEWIS

Click to edit the document details