LP Practice

advertisement
LP Formulation
Practice Set 1
Problem 1. Optimal Product Mix
Management is considering devoting some excess capacity to one
or more of three products. The hours required from each
resource for each unit of product, the available capacity (hours
per week) of the three resources, as well as the profit of each unit
of product are given below.
Hours used per unit
Total hours avialable
Product1 Product2 Product3
9
3
5
500
5
4
0
350
3
0
2
150
$50
$20
$25
Profit
R1
R2
R3
M
Z
9
5
3
3
4
50
20
26.19048 54.7619
5
2
1
25
20
500
350
118.5714
20
2904.762
≤
≤
≤
≤
500
350
150
20
Sales department indicates that the sales potentials for products
1 and 2 exceeds maximum production rate, but the sales
potential for product 3 is 20 units per week.
Formulate the problem and solve it using excel
LP-Formulation
Ardavan Asef-Vaziri
June-2013
2
Problem 1. Formulation
Decision Variables
x1 : volume of product 1
x2 : volume of product 2
x3 : volume of product 3
Objective Function
Max Z = 50 x1 +20 x2 +25 x3
Constraints
Resources
9 x1 +3 x2 +5 x3  500
5 x1 +4 x2 +
 350
3 x1 +
+2 x3  150
Market
x3  20
Nonnegativity
x1  0, x2  0 , x3 0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
3
Problem 2
The Apex Television Company has to decide on the number of 27”
and 20” sets to be produced at one of its factories. Market research
indicates that at most 40 of the 27” sets and 10 of the 20” sets can be
sold per month. The maximum number of work-hours available is 500
per month. A 27” set requires 20 work-hours and a 20” set requires 10
work-hours. Each 27” set sold produces a profit of $120 and each 20”
set produces a profit of $80. A wholesaler has agreed to purchase all
the television sets produced if the numbers do not exceed the
maximum indicated by the market research.
a)
b)
c)
d)
Formulate the problem as a Linear Programming problem.
Solve it using excel.
What are the final values?
What is the optimal value of the objective function?
LP-Formulation
Ardavan Asef-Vaziri
June-2013
4
Problem 2. Formulation
Decision Variables
x1 : number of 27’ TVs
x2 : number of 20’ TVs
Objective Function
Max Z = 120 x1 +80 x2
Constraints
Resources
20 x1 +10 x2  500
Market
x1
 40
x2  10
Nonnegativity
x1  0, x2  0
LP-Formulation
R
M1
M2
X1
20
1
120
20
Ardavan Asef-Vaziri
X2
10
1
80
10
June-2013
LHS
500
20
10
3200
≤
≤
≤
RHS
500
40
10
5
Problem 3
A farmer has 10 acres to plant in wheat and rye. He has to plant
at least 7 acres. However, he has only $1200 to spend and each
acre of wheat costs $200 to plant and each acre of rye costs $100
to plant. Moreover, the farmer has to get the planting done in
12 hours and it takes an hour to plant an acre of wheat and 2
hours to plant an acre of rye. If the profit is $500 per acre of
wheat and $300 per acre of rye, how many acres of each should
be planted to maximize profits?
State the decision variables.
x = the number of acres of wheat to plant
y = the number of acres of rye to plant
Write the objective function.
maximize 500x +300y
LP-Formulation
Ardavan Asef-Vaziri
June-2013
6
Problem 3. Formulation
Write the constraints.
x+y ≤ 10
x+y ≥ 7
200x + 100y ≤ 1200
x + 2y ≤ 12
x ≥ 0, y ≥ 0
(max acreage)
(min acreage)
(cost)
(time)
(non-negativity)
MaxAcr
MinAcr
Bud
Time
Profit
LP-Formulation
Ardavan Asef-Vaziri
x
1
1
200
1
500
4
y
1
1
100
2
300
4
June-2013
8
8
1200
12
3200
≤
≥
≤
≤
RHS
10
7
1200
12
7
Problem 4. Marketing : narrative
A department store want to maximize exposure.
There are 3 media; TV, Radio, Newspaper
each ad will have the following impact
Media
Exposure (people / ad)
Cost
TV
20000
15000
Radio
12000
6000
News paper
9000
4000
Additional information
1-Total budget is $100,000.
2-The maximum number of ads in T, R, and N are limited to
4, 10, 7 ads respectively.
3-The total number of ads is limited to 15.
LP-Formulation
Ardavan Asef-Vaziri
June-2013
8
Problem 4. Marketing : formulation
Decision variables
x1 = Number of ads in TV
x2 = Number of ads in R
x3 = Number of ads in N
Max Z = 20 x1 + 12x2 +9x3
15x1 + 6x2 + 4x3 
x1

x2

x3 
x1 + x2 + x3 
100
4
10
7
15
x1, x2, x3  0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
9
Problem 5. ( From Hillier and Hillier)
Men, women, and children gloves.
Material and labor requirements for each type and the
corresponding profit are given below.
Glove
Material (sq-feet) Labor (hrs) Profit
Men
2
0.5
8
Women
1.5
0.75
10
Children
1
0.67
6
Total available material is 5000 sq-feet.
We can have full time and part time workers.
Full time workers work 40 hrs/w and are paid $13/hr
Part time workers work 20 hrs/w and are paid $10/hr
We should have at least 20 full time workers.
The number of full time workers must be at least twice of that of
part times.
LP-Formulation
Ardavan Asef-Vaziri
June-2013
10
Problem 5. Decision variables
X1 : Volume of production of Men’s gloves
X2 : Volume of production of Women’s gloves
X3 : Volume of production of Children’s gloves
Y1 : Number of full time employees
Y2 : Number of part time employees
LP-Formulation
Ardavan Asef-Vaziri
June-2013
11
Problem 5. Constraints
Row material constraint
2X1 + 1.5X2 + X3  5000
Full time employees
Y1  20
Relationship between the number of Full and Part time employees
Y1  2 Y2
Labor Required
.5X1 + .75X2 + .67X3  40 Y1 + 20Y2
Objective Function
Max Z = 8X1 + 10X2 + 6X3 - 520 Y1 - 200 Y2
Non-negativity
X1 , X2 , X3 , Y1 , Y2  0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
12
Problem 5. Excel Solution
2
1.5
1
0.5
8
0.75
10
0.67
6
1
1
-40
-520
X1
X2
X3
Y1
2
1.5
1
0.5
8
2500
X1
LP-Formulation
0.75
10
0
X2
0.67
6
0
X3
1
1
-40
-520
25
Y1
-2
-20
-200
Y2
-2
-20
-200
12.5
Y2
Ardavan Asef-Vaziri
0
0
0
0
0
<=
>=
>=
<=
5000
20
0
0
5000
25
0
0
4500
<=
>=
>=
<=
5000
20
0
0
June-2013
13
Problem 6. From Hillier and Hillier
Strawberry shake production
Several ingredients can be used in this product.
Ingredient
calories from fat Total calories Vitamin
( per tbsp)
(per tbsp) (mg/tbsp)
Strawberry flavoring
1
50
20
Cream
75
100
0
Vitamin supplement
0
0
50
Artificial sweetener
0
120
0
Thickening agent
30
80
2
Thickener Cost
(mg/tbsp) ( c/tbsp)
3
10
8
8
1
25
2
15
25
6
This beverage has the following requirements
Total calories between 380 and 420.
No more than 20% of total calories from fat.
At least 50 mg vitamin.
At least 2 tbsp of strawberry flavoring for each 1 tbsp of artificial
sweetener.
Exactly 15 mg thickeners.
Formulate the problem to minimize costs.
LP-Formulation
Ardavan Asef-Vaziri
June-2013
14
Decision variables
Decision Variables
X1 : tbsp of strawberry
X2 : tbsp of cream
X3 : tbsp of vitamin
X4 : tbsp of Artificial sweetener
X5 : tbsp of thickening
LP-Formulation
Ardavan Asef-Vaziri
June-2013
15
Constraints
Objective Function
Min Z = 10X1 + 8X2 + 25 X3 + 15 X4 + 6 X5
Calories
50X1 + 100 X2 + 120 X4 + 80 X5  380
50X1 + 100 X2 + 120 X4 + 80 X5  420
Calories from fat
X1 + 75 X2 + 30 X5  0.2(50X1 + 100 X2 + 120 X4 + 80 X5)
Vitamin
20X1 + 50 X3 + 2 X5  50
Strawberry and sweetener
X1  2 X4
Thickeners
3X1 + 8X2 + X3 + 2 X4 + 2.5 X5 = 15
Non-negativity
X1 , X2 , X3 , X4 , X5  0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
16
Problem 7. Make / buy decision : Narrative representation
Electro-Poly is a leading maker of slip-rings.
A new order has just been received.
Model 1
Model 2
Model 3
3,000
2,000
900
Hours of wiring/unit
2
1.5
3
Hours of harnessing/unit
1
2
1
Cost to Make
$50
$83
$130
Cost to Buy
$61
$97
$145
Number ordered
The company has 10,000 hours of wiring capacity and 5,000
hours of harnessing capacity.
LP-Formulation
Ardavan Asef-Vaziri
June-2013
17
Problem 7. Make / buy decision : decision variables
x1 = Number of model 1 slip rings to make
x2 = Number of model 2 slip rings to make
x3 = Number of model 3 slip rings to make
y1 = Number of model 1 slip rings to buy
y2 = Number of model 2 slip rings to buy
y3 = Number of model 3 slip rings to buy
The Objective Function
Minimize the total cost of filling the order.
MIN: 50x1 + 83x2 + 130x3 + 61y1 + 97y2 + 145y3
LP-Formulation
Ardavan Asef-Vaziri
June-2013
18
Problem 7. Make / buy decision : Constraints
Demand Constraints
x1 + y1 = 3,000
} model 1
x2 + y2 = 2,000
} model 2
x3 + y3 = 900 } model 3
Resource Constraints
2x1 + 1.5x2 + 3x3 <= 10,000 } wiring
1x1 + 2.0x2 + 1x3 <= 5,000 } harnessing
Nonnegativity Conditions
x1, x2, x3, y1, y2, y3 >= 0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
19
Problem 8. Make / buy decision : Excel
Make
Buy
Make
Buy
Produced
Required
Capacity
Wiring
Harnessing
LP-Formulation
Model 1 Model 2 Model 3
50
83
130
61
97
145
Model 1 Model 2 Model 3
3000
550
900
0
1450
0
3000
2000
900
3000
2000
900
2
1
1.5
2
3
1
453300
Required Available
9525
10000
5000
5000
Ardavan Asef-Vaziri
June-2013
20
Problem 8. Make / buy decision : Constraints
Do we really need 6 variables?
x1 + y1 = 3,000 ===> y1 = 3,000 - x1
x2 + y2 = 2,000 ===> y2 = 2,000 - x2
x3 + y3 = 900 ===> y3 = 900 - x3
The objective function was
MIN: 50x1 + 83x2 + 130x3 + 61y1 + 97y2 + 145y3
Just replace the values
MIN: 50x1 + 83x2 + 130x3 + 61 (3,000 - x1 ) + 97 ( 2,000 - x2) +
145 (900 - x3 )
MIN: 507500 - 11x1 -14x2 -15x3
We can even forget 507500, and change the the O.F. into
MIN - 11x1 -14x2 -15x3 or
MAX + 11x1 +14x2 +15x3
LP-Formulation
Ardavan Asef-Vaziri
June-2013
21
Problem 8. Make / buy decision : Constraints
MAX + 11x1 +14x2 +15x3
Resource Constraints
2x1 + 1.5x2 + 3x3 <= 10,000 } wiring
1x1 + 2.0x2 + 1x3 <= 5,000 } harnessing
Demand Constraints
x1 <= 3,000
} model 1
x2 <= 2,000
} model 2
x3 <= 900
} model 3
Nonnegativity Conditions
x1, x2, x3 >= 0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
22
Problem 8. Make / buy decision : Constraints
y1 = 3,000- x1
MIN: 50x1 + 83x2 + 130x3
y2 = 2,000-x2
+ 61y1 + 97y2 + 145y3
y3 =
Demand Constraints
x1 + y1 = 3,000
} model 1
x2 + y2 = 2,000
} model 2
MIN: 50x1 + 83x2 + 130x3
+ 61(3,000- x1)
+ 97(2,000-x2)
+ 145(900-x3)
x3 + y3 = 900 } model 3
Resource Constraints
2x1 + 1.5x2 + 3x3 <= 10,000 } wiring
1x1 + 2.0x2 + 1x3 <= 5,000 } harnessing
Nonnegativity Conditions
y1 = 3,000- x1>=0
y2 = 2,000-x2>=0
y3 = 900-x3>=0
x1 <= 3,000
x2 <= 2,000
x3 <= 900
x1, x2, x3, y1, y2, y3 >= 0
LP-Formulation
900-x3
Ardavan Asef-Vaziri
June-2013
23
Problem 8. Make / buy decision : Constraints
Model1
Wiring
2
Harnessing
1
Marginal Profit
11
Demand
3000
3000
LP-Formulation
Model2
1.5
2
14
2000
550
Model3
3
1
15
900
900
Ardavan Asef-Vaziri
9525
5000
54200
10000
5000
453300
June-2013
24
Problem 9
You are given the following linear programming model in
algebraic form, where, X1 and X2 are the decision variables
and Z is the value of the overall measure of performance.
Maximize Z = X1 +2 X2
Subject to
Constraints on resource 1: X1 + X2 ≤ 5 (amount available)
Constraints on resource 2: X1 + 3X2 ≤ 9 (amount available)
And
X1 , X2 ≥ 0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
25
Problem 9
Identify the objective function, the functional constraints, and
the non-negativity constraints in this model.
Objective Function  Maximize Z = X1 +2 X2
Functional constraints  X1 + X2 ≤ 5, X1 + 3X2 ≤ 9
Is (X1 ,X2) = (3,1) a feasible solution?
3 + 1 ≤ 5, 3 + 3(1) ≤ 9  yes; it satisfies both constraints.
Is (X1 ,X2) = (1,3) a feasible solution?
1 + 3 ≤ 5, 1 + 3(9) > 9  no; it violates the second constraint.
LP-Formulation
Ardavan Asef-Vaziri
June-2013
26
Problem 10
You are given the following linear programming model in
algebraic form, where, X1 and X2 are the decision variables
and Z is the value of the overall measure of performance.
Maximize Z = 3X1 +2 X2
Subject to
Constraints on resource 1: 3X1 + X2 ≤ 9 (amount available)
Constraints on resource 2: X1 + 2X2 ≤ 8 (amount available)
And
X1 , X2 ≥ 0
LP-Formulation
Ardavan Asef-Vaziri
June-2013
27
Problem 10
Identify the objective function,
Maximize Z = 3X1 +2 X2
the functional constraints,
3X1 + X2 ≤ 9 and X1 + 2X2 ≤ 8
the non-negativity constraints
X1 , X2 ≥ 0
Is (X1 ,X2) = (2,1) a feasible solution?
3(2) + 1 ≤ 9 and 2 + 2(1) ≤ 8 yes; it satisfies both constraints
Is (X1 ,X2) = (2,3) a feasible solution?
3(2) + 3 ≤ 9 and 2 + 2(3) ≤ 8 yes; it satisfies both constraints
Is (X1 ,X2) = (0,5) a feasible solution?
3(0) + 5 ≤ 9 and 0 + 2(5) > 8 no; it violates the second constraint
LP-Formulation
Ardavan Asef-Vaziri
June-2013
28
Problem . Excel Solution
Steak
Potatoe
LHS
5
15
50
≥
50
Protein
20
5
40
≥
40
Fat
15
2
24.9
≤
60
Cost per serving
$4
$2
10.9
1.27
2.91
Carbohydrates
LP-Formulation
Ardavan Asef-Vaziri
RHS
June-2013
29
Download