{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw3_solution (1)

# hw3_solution (1) - Question 1 a,b MOD FILE set Products set...

This preview shows pages 1–3. Sign up to view the full content.

Sheet1 Page 1 Question 1: a,b) MOD FILE set Products set Parts param profit{Products} param inventory{Parts} param used_parts{Parts,Products} param demand{Products} var x{i in Products}>=demand[i] maximize Tprofit: sum{j in Products}profit[j]*x[j] subject to inv_con {i in Parts}: sum{j in Products} x[j]*used_parts[i,j]<=inventory[i] DATA FILE set Products:=DRG1 DRG2 DRG3 DRG4 set Parts:=DiagS Bed Nurse Drug param profit:= DRG1 2000 DRG2 1500 DRG3 500 DRG4 300 param inventory:=DiagS 570 Bed 1000 Nurse 50000 Drug 50000 param demand:=DRG1 10 DRG2 15 DRG3 40 DRG4 160 param used_parts: DRG1 DRG2 DRG3 DRG4 := DiagS 7 4 2 1 Bed 5 2 1 0 Nurse 30 10 5 1 Drug 800 500 150 50 c) ampl: option solver cplex ampl: option cplex_options 'sensitivity' ampl: solve CPLEX 8.0.0: sensitivity CPLEX 8.0.0: optimal solution 0 simplex iterations (0 in phase I) suffix up OUT suffix down OUT suffix current OUT d) ampl: display x.lb, x.lb2, x.val, x.ub,x.ub2 : x.lb x.lb2 x.val x.ub x.ub2 := DRG1 10 10 10 Infinity 35.625 DRG2 15 15 50 Infinity 56 DRG3 40 40 40 Infinity 140 DRG4 160 160 220 Infinity 360

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Sheet1 Page 2 e) ampl: display x.rc
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 6

hw3_solution (1) - Question 1 a,b MOD FILE set Products set...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online