homework-4-solutions

homework-4-solutions - MthSc810 – Mathematical...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MthSc810 – Mathematical Programming Fall 2011, Homework #4. Due Thursday, September 22, 2011, 6PM EDT. Exercise 1 Implement, in AMPL, the solution you provided for Exercise 3 of Homework 2. Solution. Model and data are here shown in the same chunk. param n; set P := 1..n; # projects param r {P}; # return of each project param s {P}; # initial investment per project param q {P}; # number of employees per project param B; # budget param W; # maximum number of employees var x {P} binary; # x[i]=1 means we choose project i, 0 means we don’t maximize total_return: sum {i in P} r [i] * x [i]; budget_cap: sum {i in P} s [i] * x [i] <= B; employee_cap: sum {i in P} q [i] * x [i] <= W; data; param n := 5; param B := 28; param W := 50; param r := 1 19 2 41 3 15 4 22 5 30; param s := 1 12 2 29 3 9 4 14 5 18; param q := 1 25 2 22 3 31 4 25 5 30; Exercise 2 Write an AMPL model for the following problem: A large company is mixing a set of k ingredients I = { 1 , 2 ...,k } to produce a new type of paint. Each such ingredient has a unitary cost c i , i ∈ I . A subset H ⊂ I of the ingredients are toxic chemicals. Find the percentage x i of each ingredient in the paint such that – the percentage of each component does not exceed α ; – the total percentage of toxic components does not exceed β ; – there are at most γ ingredients in total (toxic and non-toxic); – the total cost is minimum. Then solve it for the following input: – k = 10; – c = (12 , 6 , 9 , 10 , 7 , 4 , 7 , 8 , 11 , 4); – H = { 2 , 6 , 7 , 10 } ; – α = 0 . 3 (i.e., 30%); – β = 0 . 1; – γ = 5....
View Full Document

This note was uploaded on 03/14/2012 for the course MTHSC 810 taught by Professor Staff during the Fall '08 term at Clemson.

Page1 / 4

homework-4-solutions - MthSc810 – Mathematical...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online