# 9.2.2 - ampl: solve MINOS 5.5: ignoring integrality of 3...

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

Sheet1 Page 1 data set SITES := 1 2 3 param: buildingcost watercost pollutant1 pollutant2 := 1 100000 20 0.4 0.3 2 6000 30 0.25 0.2 3 40000 40 0.2 0.25 param pollutant1_lim := 80000 param pollutant2_lim := 50000 param M := 400000 model set SITES # pollution control stations param buildingcost {i in SITES} param watercost {i in SITES} param pollutant1 {i in SITES} param pollutant2 {i in SITES} param pollutant1_lim param pollutant2_lim param M var station {i in SITES} binary var water {i in SITES} minimize treatcost: sum {i in SITES} buildingcost[i]*station[i] + sum {i in SITES} watercost[i]*water[i] subject to Pollution1_lim: sum {i in SITES} pollutant1[i]*water[i]>=pollutant1_lim subject to Pollution2_lim: sum {i in SITES} pollutant2[i]*water[i]>=pollutant2_lim subject to if_then {i in SITES}: water[i] - M*station[i] <= 0 subject to nonnegativity {i in SITES}: water[i] >= 0 AMPL sw: ampl ampl: model 9.2.2.mod ampl: data 9.2.2.dat

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ampl: solve MINOS 5.5: ignoring integrality of 3 variables MINOS 5.5: optimal solution found. 0 iterations, objective 4050000 ampl: display station station [*] := 1 0.5 2 3 ampl: display water water [*] := 1 2e+05 2 Sheet1 Page 2 3 Sheet1 Page 3 #the cost of building site i #the cost of treating one ton of water in site i #the amount of pollutant 1 can remove from one ton of water in site i #the amount of pollutant 2 can remove from one ton of water in site i #the minimum amount of pollutant 1 needed to remove #the minimum amount of pollutant 2 needed to remove #the large number M #if site i is chosen = 1 and 0 for otherwise #number of tons of water treated in site i #objective function #minimum amount of pollutant 1 needed to remove #minimum amount of pollutant 2 needed to remove #amount of water removed at site i &gt; 0, station i = 1 #nonegativity Sheet1 Page 4...
View Full Document

## This note was uploaded on 01/25/2010 for the course IEOR 162 taught by Professor Zhang during the Fall '07 term at University of California, Berkeley.

### Page1 / 4

9.2.2 - ampl: solve MINOS 5.5: ignoring integrality of 3...

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

View Full Document
Ask a homework question - tutors are online