! University of Illinois at Urbana-Champaign ! MATH-484 - Fall 2013 ! Instructor Bernard Lidicky ! ! First try version ! Paste this file to http://apmonitor.com/online/view_pass.php ! ! pipes problem ! 400pcs of 50cm pipes ! 100pcs of 65cm pipes ! ! How to cut the pipes if two 15 cm and one 20cm pipe is needed for ! manufacturing a final product? Maximize the number of final products. ! ! A ... # 15cm after cutting ! B ... # 30cm after cutting ! ! x[1] 15+15+20 2A+B ! x[2] 20+20 2B ! x[3] 15+15+15 3A ! ! y[1] 20+20+20 3B ! y[2] 15+15+15+15 4A ! y[3] 20+15+15+15 B+3A ! y[4] 20+20+15 2B+A ! Model pipes Variables x[1] = 0 x[2] = 0 x[3] = 0 y[1] = 0 y[2] = 0 y[3] = 0 y[4] = 0 a = 0 b = 0 c = 0 End Variables Equations x[1]+x[2]+x[3] <= 400 y[1]+y[2]+y[3]+y[4] <= 100 a = 2*x[1]+3*x[2]+4*y[2]+3*y[3]+y[4] b = 2*x[1]+2*x[2]+3*y[1]+y[3]+2*y[4] c <= 0.5*a c <= b a >= 0 b >= 0 x[1] >= 0 x[2] >= 0 x[3] >= 0 y[1] >= 0 y[2] >= 0 y[3] >= 0 y[4] >= 0 maximize c End Equations End Model