This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ORIE 3300/5300 Assignment 6 SOLUTION Fall 2008 Problem 1 In this problem, we have 5 people (supply) and only 4 stroke styles (demand). Thus, we will need to define a new stroke style, called ”bench” that everyone can swim in 0 seconds and the person swimming it will stay at the bench. After this, we have five styles, five sportsmen and the problem is clearly an assignment problem of assigning sportsmen to different strokes. To fit it into a transportation model file, we have to make sure all demands and supplies are equal to one, while the costs are clearly the times of swimmers in different strokes. Thus, the data file is (there are more ways how to do this): set ORIG := Andrew Brian Charles Darren Emil ; set DEST := breaststroke butterfly backstroke freestyle bench ; param supply default 1 ; param demand default 1 ; param cost(tr): Andrew Brian Charles Darren Emil:= breaststroke 43.4 41.8 33.1 42.2 34.7 butterfly 33.3 33.6 28.5 38.9 30.4 backstroke 37.7 35.4 32.9 33.8 37.0 freestyle 29.2 31.1 26.4 29.6 28.5 bench 0; The output is: ampl: reset; ampl: model transp.mod; ampl: data hw6.dat; ampl: solve; CPLEX 11.0.1: optimal solution; objective 126.2 7 dual simplex iterations (0 in phase I) To get a nicer output, we can type ampl: option omit_zero_rows 1; ampl: display Trans; Trans := Andrew freestyle 1 Brian bench 1 Charles butterfly 1 Darren backstroke 1 Emil breaststroke 1 ; 1 The output shows that the optimal objective function is 126.2 seconds. Andrew is chosen to do the freestyle, Charles will swim butterfly, Darren will do the backstroke, Emil will do the breaststroke, while Brian will stay at the bench. Grading: Few people lost points because they did not use the required model file. Also, 2 points were taken off for not explaining how to make the problem balanced (why you need to introduce new swimming style)....
View
Full Document
 Fall '08
 TODD
 Operations Research, Linear Programming, Optimization, optimal solution, feasible solution, Andrew Brian Charles Darren Emil

Click to edit the document details