lp graphical solution
DESCRIPTION
Tutorial guiding how to formulate linear programing problemsTRANSCRIPT
Linear Programming – Graphical Method
1. Maximise: Z = 7X1 + 5X2
s.t. X1 + 2X2 6
4X1 + 3X2 12
X1,X2 0
Equation When X1 = 0 When X2 = 0
X1 + 2 X2 = 6 0 + 2 X2 = 6
X2 = 3
Point is (0,3)
X1 + 0 = 6
X1 = 6
Point is (6,0)
4X1 + 3 X2 = 12 0 + 3 X2 = 12
X2 = 4
Point is (0,4)
4X1 + 0 = 12
X1 = 3
Point is (3,0)
1 2 3 4 5 6
1
2
3
4
X1 + 2 X
2 ≤ 6
4X1 + 3 X
2 ≤ 12
A
BC
D
X1
X2 ≤ Shaded area towards the origin
To find C X1 + 2 X2 = 6 ----- (1)
4X1 + 3 X2 = 12 ----- (2)
(1)X 4 4X1 + 8 X2 = 24
(-) -5X2 = - 12
X2 = 12/5 = 2.4
Substitute X2 value in Eq (1)
X1 + 2 (2.4) = 6
Therefore X1 = 1.2
Point Co-Ordinate Zmax = 7 X1 + 5 X2
A 0, 0 7 x 0 + 5 x 0 = 0
B 0, 3 7 x 0 + 5 x 3 = 15
C 1.2, 2.4 7 x 1.2 + 5 x 2.4 = 20.4
D 3, 0 7 x 3 + 5 x 0 = 21
Conclusion: X1 = 3 and X2 = 0 will give Zmax = 21
Linear Programming – Graphical Method
2) Maximise: Z=3X1 + 2X2
s.t. 2X1 + X2 2
3X1 + 4X2 12
X1, X2 0
Equation When X1 = 0 When X2 = 0
2X1 + X2 = 2 0 + X2 = 2
X2 = 2
Point is (0,2)
2 X1 + 0 = 2
X1 = 1
Point is (1,0)
3X1 + 4 X2 = 12 0 + 4 X2 = 12
X2 = 3
Point is (0,3)
3X1 + 0 = 12
X1 = 4
Point is (4,0)
1 2
1
2
3X1 + 4 X
2 ≥ 12
2X1 + X
2 ≤ 2
X1
X2
≤ Shaded area towards the origin
Conclusion: Since there is no common area, there is feasible solution for the given problem
≥ Shaded area away from the origin
3
3 4
Identify the common area for the following examples
a) 2 X + Y 3 Y – 3 X 1 X, Y 0
Equation When X = 0 When Y = 0
2X + Y = 3 0 + Y = 3
Y = 3
Point is (0, 3)
2 X + 0 = 3
X = 1.5
Point is (1.5, 0)
Y - 3 X = 1 Y - 3 (0) = 1
Y = 1
Point is (0, 1)
0 – 3 X = 1
X = -1/3
Point is (-1/3, 0)
1 2
1
2
2X + Y
≥ 3
Y -
3X ≤
1
X1
X2
≤ Shaded area towards the origin≥ Shaded area away from the origin3
3 4
Identify the common area for the following examples
b) 2 X + 3Y 6 3 X– 2 Y 4X,Y 0
Equation When X = 0 When Y = 0
2X + 3Y = 6 0 + 3Y = 6
Y = 2
Point is (0, 2)
2 X + 0 = 6
X = 3
Point is (3, 0)
3 X – 2 Y = 4 0 - 2 Y = 4
Y = - 2
Point is (0, -2)
3 X – 0 = 4
X = 4/3
Point is (4/3, 0)
1 2
-2
1
2X + 3Y ≤ 3
3X -2
Y ≥
4
X1
X2
≤ Shaded area towards the origin≥ Shaded area away from the origin2
3 4
-1
3
Linear Programming – Graphical Method
3) Maximise: Z=3X1 + 8X2
s.t.X1 + X2 = 200
X1 80
X2 60
X1,X2 0
Equation When X1 = 0 When X2 = 0
X1 + X2 = 200 0 + X2 = 200
X2 = 200
Point is (0,200)
X1 + 0 = 200
X1 = 200
Point is (200,0)
X1 = 80 Point is (80,0)
50 100 150
50
100
X1 + X
2 = 200
X1 ≤ 80
A
B
X1
X2
≤ Shaded area towards the origin
Point Co-Ordinate Zmax = 3 X1 + 8 X2
A 0, 200 3 x 0 + 8 x 200 = 1600
B 80, 120 3 x 80 + 8 x 120 = 1200
X2 = 60 Point is (0, 60)
200
150
200
= Shaded area only on the line≥ Shaded area away from the origin
X2 ≥ 60
(0, 200)
(80, 120)
Conclusion: X1 = 0 and X2 = 200 will give Zmax = 1600
Linear Programming – Graphical Method
4) Maximise: Z=3X1 + 2X2
s.t.-2X1 + X2 1
X1 2
X1 + X2 3
X1,X2 0
1 2 3
1
2
X1 + X
2 ≤ 3X
1 ≤ 2
AX1
X2
≤ Shaded area towards the origin
Conclusion: X1 = 2 and X2 = 1 will give Zmax = 8
4
3
4- 2
X1 +
X2 ≤
1
- 1
Equation When X1 = 0 When X2 = 0
- 2X1 + X2 = 1 0 + X2 = 1
X2 = 1
Point is (0,1)
- 2 X1 + 0 = 1
X1 = - 0.5
Point is (-0.5,0)
X1 = 2 Point is (2,0)
X1 + X2 = 3 Point is (0, 3) Point is (3, 0)
B
C
D
E
To find C -2 X1 + X2 = 1 ----- (1)
X1 + X2 = 3 ----- (2)
(1)-(2) -3 X1 = - 2
X1 = 2/3
Substitute X1 value in Eq (2)
2/3 + X2 = 3
Therefore X2 = 7/3
Point Co-Ordinate Zmax = 3 X1 + 2 X2
A 0, 0 3 x 0 + 2 x 0 = 0
B 0, 1 3 x 0 + 2 x 1 = 2
C 2/3, 7/3 3 x 2/3 + 2 x 7/3 = 20/3
D 2, 1 3 x 2 + 2 x 1 = 8
E 2, 0 3 x 2 + 2 x 0 = 6
Summary :
8. Let us assume that you have inherited Rs.1,00,000 from your father-in-law that can be invested in a combination of two stock portfolios, with the maximum investment allowed in either portfolio set at Rs.75,000. The first portfolio set has an average rate of return of 10% whereas the second has 20%. In terms of risk factors associated with these, the first has a risk rating of 4 (on a scale from 0 to 10) and the second has 9. Since you wish to maximize your return, you will not accept an average rate of return below 12% or risk factor above 6. Hence, you then face an important question. How much should you invest in each portfolio. Formulate this as a linear programming problem and solve it by the graphical method.
Input Portfolio I Portfolio II
Average rate of return
10% 20% Availability
Investment 1 1 100000
Max investment 1 - 75000
- 1 75000
Risk rating 4 9 6 (Max.)
Other Information 1. Will not accept an average rate of return below 12%
Step 0: Tabular Presentation
Step 1: Variable Definition
Let X1 be the amount invested in Portfolio I
Let X2 be the amount invested in Portfolio II
Step 2: Objective Function
Maximise return Z = 0.10 X1+ 0.20 X2
Step 3: Constraints
Amount inherited : X1 + X2 ≤ 100000
Maximum investment : X1 ≤ 75000 ; X2 ≤ 75000
Risk Factors : 4X1 + 9 X2 ≤ 6 (X1 + X2)
(OR) - 2 X1 + 3 X2 ≤ 0
Average rate of return not to be below 12 % :
0.10 X1 + 0.20 X2 ≥ 0.12 (X1 + X2)
- 0.02 X1 + 0.08 X2 ≥ 0
This linear programming problem is summarised as follows: Maximise return Z = 0.10 X1+ 0.20 X2
s.t.X1 + X2 ≤ 100000
X1 ≤ 75000 ; X2 ≤ 75000 - 2 X1 + 3 X2 ≤ 0
-0.02 X1 + 0.08 X2 ≥ 0
X1, X2 ≥ 0
25 50 75
25
50
X1 + X
2 ≤ 100000
X1 ≤ 75000
AX1
X2
≤ Shaded area towards the origin
100
75
100
Equation When X1 = 0 When X2 = 0
X1 + X2 = 100000 Point is (0,100000) Point is (100000,0)
X2 = 75000 Point is (0, 75000)
-2X1 + 3X2 = 0 When X1 = 75000;
-2(75000)+3X2 = 0
3 X2 = 150000 (or) X2 = 50000
Point is (75000, 50000)
B
C
Maximise return Z = 0.10 X1+ 0.20 X2
s.t.X1 + X2 ≤ 100000
X1 ≤ 75000 ; X2 ≤ 75000
- 2 X1 + 3 X2 ≤ 0
-0.02 X1 + 0.08 X2 ≥ 0
X1, X2 ≥ 0
X1 = 75000 Point is (75000,0)
Point is (75000, 50000) and (0, 0)
-0.02X1 + 0.08X2 = 0 When X1 = 75000;
-0.02(75000)+0.08X2 = 0
0.08 X2 = 1500 (or) X2 = 18750
Point is (75000, 18750)
Point is (75000, 18750) and (0, 0)
≥ Shaded area away frrom the origin
’000
’000
D
X2 ≤ 75000
-2 X 1 + 3 X 2
≤ 0
-0.02 X1 + 0.08 X2
≥ 0
To find B X1 + X2 = 100000 ----- (1)
-2 X1 + 3 X2 = 0 ---- (2)
(1) X 2 2 X1 + 2 X2 = 200000
(add) 5 X2 = 200000
X2 = 40000
Substitute X2 value in Eq (1)
X1 = 60000
To find C; X1 = 75000
X1 + X2 = 100000
X2 = 25000
(75000, 25000)
To find D; X1 = 75000
0.08 X2 -0.02 X1 = 0
0.08 X2 = 1500
X2 = 18750
(75000, 18750)
Point Co-Ordinate Zmax = 0.1 X1 + 0.2 X2
A 0, 0 0.1 x 0 + 0.2 x 0 = 0
B 60000, 40000 0.1 x 60000 + 0.2 x 40000 = 14000
C 75000, 25000 0.1 x 75000 + 0.2 x 25000 = 12500
D 75000, 18750 0.1 x 75000 + 0.2 x 18750 = 11250
Conclusion: X1 = 60000 and X2 = 40000 will give Zmax = 14000
Minimise: Z = 4X1 + 2X2
s.t.X1 + 2 X2 ≥ 2
3 X1 + 2 X2 ≥ 3
4 X1 + 3 X2 ≥ 6
X1, X2 ≥ 0
Equation When X1 = 0 When X2 = 0
X1 + 2 X2 = 2 0 + 2 X2 = 2
X2 = 1
Point is (0, 1)
X1 + 0 = 2
X1 = 2
Point is (2, 0)
3X1 + 2 X2 = 3 0 + 2 X2 = 3
X2 = 1.5
Point is (0, 1.5)
3X1 + 0 = 3
X1 = 1
Point is (1,0)
4X1 + 3 X2 = 6 0 + 3 X2 = 6
X2 = 2
Point is (0, 2)
4X1 + 0 = 6
X1 = 1.5
Point is (1.5, 0)
1
1
2
X2
2 3X1
≥ Shaded area away from the origin
3X1 + 2 X
2 ≥ 3
4X1 + 3 X
2 ≥ 6
B
A
C
X1 + 2 X
2 ≥ 2
To find B X1 + 2X2 = 2 ----- (1)
4 X1 + 3 X2= 6 ---- (2)
(1) X 4 4 X1 + 8 X2 = 8
(Sub) -5 X2 = - 2
X2 = 2/5 = 0.4
Substitute X2 value in Eq (1)
X1 + 2 (0.4) = 2
Therefore X1 = 1.2
Point Co-Ordinate Zmax = 4 X1 + 2 X2
A 2, 0 4 x 2 + 2 x 0 = 8
B 1.2, 0.4 4 x 1.2 + 2 x 0.4 = 5.6
C 0, 2 4 x 0 + 2 x 2 = 4
Conclusion: X1 = 0 and X2 = 2 will give Zmin = 4
9. A local travel agent is planning a chartered trip to a major sea resort. The eight day/seven night package includes the fare for round trip, surface transportation, board and lodging and selected tour options. The chartered trip is restricted to 200 persons and past experience indicates that there will not be any problem for getting 200 persons. The problem for the travel agent is to determine the number of Deluxe, Standard and Economy tour packages to offer for this charter. These three plans each differ according to seating and service for the flight, quality of accommodation , meal plans and tour options. The following table summarises the estimated prices for the 3 packages and the corresponding expenses for the travel agent. The travel agent has hired an aircraft for the flat fee of Rs.2,00,000 for the entire trip.
PRICES AND COST FOR TOUR PACKAGES / PERSONS
Tour Plan Price Rs. Hotel Cost Meals & other expenses
Deluxe 10,000 3,000 4,750
Standard 7,000 2,200 2,500
Economy 6,500 1,900 2,200
In planning the trip the following considerations must be taken into account
a) atleast 10% of packages must be of the deluxe typeb) atleast 35% but not more than 70% must be of the standard typec) atleast 30% must be of the economy typed) the maximum number of deluxe packages available in any aircraft is restricted to 60e) the hotel desires that atleast 120 of the tourists should be on the deluxe and the standard packages together.
The travelling agent wishes to determine the number of packages to offer in each type so as to maximise the total profit. a)Formulate the above as a linear programming problemb) Restate the above linear programming problem in terms of two decision variables taking advantage of the fact that 200 packages will be sold.c) Find the optimal solution using graphical method for the restated linear programming problem and interpret your results.
200111No. of Package
120 (Min.)-11Hotel Constraint
60--1
140 (70% of 200)-1-Max. Package
60 (30% of 200)1--
70 (35% of 200)-1-
20 (10% of 200)--1Min. Package
240023002250Profit
220025004750Meals & Other expenses
190022003000Hotel Cost
6500700010000Price
EconomyStandardDeluxe
Summary
Max Z = 2250 X1 + 2300 X2 + 2400 X3 – 200000
S.t.
(i) X1 ≥ 20 ; (ii) X2 ≥ 70 and X2 ≤ 140
(iii) X3 ≥ 60 ; (iv) X1 ≤ 60
(v) X1 + X2 ≥ 120
(vi) X1 + X2 + X3 = 200
X1, X2, X3 ≥ 0 In order to solve this problem by graphical method, reduce the problem to 2 variables. Since X1 + X2 + X3 = 200 or X3 = 200 – (X1 +X2).
Substitute the value of X3 in the relations
mentioned above.
Max Z = -150 X1 - 100 X2 + 2800000
S.t.(i) X1 ≥ 20 ; (ii) X2 ≥ 70 and X2 ≤ 140
(iii) X1+ X2 ≤ 140 ; (iv) X1 ≤ 60
(v) X1 + X2 ≥ 120
X1, X2 ≥ 0
Equation When X1 = 0 When X2 = 0
X1 = 20 Point is (20, 0)
X2 = 70 Point is (70, 0)
X1 + X2 = 120 Point is (0, 120) Point is (120, 0)
Max Z = -150 X1 + 100 X2 + 2800000
S.t.(i) X1 ≥ 20 ; (ii) X2 ≥ 70 and X2 ≤ 140
(iii) X1+ X2 ≤ 140 ; (iv) X1 ≤ 60
(v) X1 + X2 ≥ 120
X1, X2 ≥ 0 X1 = 60 Point is (60, 0)
X2 = 140 Point is (140, 0)
X1 + X2 = 140 Point is (0, 140) Point is (140, 0)
20 X1
X2
40 60 80 100 120 140
20
40
60
80
100
120
140
≤ Shaded area towards the origin
≥ Shaded area away from the origin
X1 ≥
20
X2 ≥ 70
X1
≤ 6
0
X2 ≤ 140
X1 + X
2 ≥ 120
X1 + X
2 ≤ 140
A
B
C
DE
Point Co-Ordinate Zmax= - 150 X1 - 100 X2+280000
A 20, 100 -150 x 20 - 100 x 100+ 280000 = 267000
B 20, 120 -150 x 20 - 100 x 120 + 280000 = 265000
C 60, 80 -150 x 60 - 100 x 80 + 280000 = 263000
D 60, 70 -150 x 60 - 100 x 70 + 280000 = 264000
E 50, 70 -150 x 50 - 100 x 70 + 280000 = 265500
Conclusion: X1 = 20 , X2 = 100 and X3 = 80 will give Zmax = 267000
X1 = 20 ; X2 = 100 ; Therefore X3 = 200-(X1+X2) = 200 – (20+100) = 80