0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# LP Graphical Solution

2,750

Published on

Tutorial guiding how to formulate linear programing problems

Tutorial guiding how to formulate linear programing problems

2 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
2,750
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
105
0
Likes
2
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. Linear Programming – Graphical Method
• Maximise: Z = 7X 1 + 5X 2
• s.t.
• X 1 + 2X 2  6
• 4X 1 + 3X 2  12
• X 1 ,X 2  0
Equation When X 1 = 0 When X 2 = 0 X 1 + 2 X 2 = 6 0 + 2 X 2 = 6 X 2 = 3 Point is (0,3) X 1 + 0 = 6 X 1 = 6 Point is (6,0) 4X 1 + 3 X 2 = 12 0 + 3 X 2 = 12 X 2 = 4 Point is (0,4) 4X 1 + 0 = 12 X 1 = 3 Point is (3,0) 1 2 3 4 5 6 1 2 3 4 X 1 + 2 X 2 ≤ 6 4X 1 + 3 X 2 ≤ 12 A B C D X 1 X 2 ≤ Shaded area towards the origin To find C X 1 + 2 X 2 = 6 -----  (1) 4X 1 + 3 X 2 = 12 -----  (2) (1)X 4 4X 1 + 8 X 2 = 24 (-) -5X 2 = - 12 X 2 = 12/5 = 2.4 Substitute X 2 value in Eq (1) X 1 + 2 (2.4) = 6 Therefore X 1 = 1.2 Point Co-Ordinate Z max = 7 X 1 + 5 X 2 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: X 1 = 3 and X 2 = 0 will give Z max = 21
• 2. Linear Programming – Graphical Method 2) Maximise: Z=3X 1 + 2X 2 s.t. 2X 1 + X 2  2 3X 1 + 4X 2  12 X 1 , X 2  0 Equation When X 1 = 0 When X 2 = 0 2X 1 + X 2 = 2 0 + X 2 = 2 X 2 = 2 Point is (0,2) 2 X 1 + 0 = 2 X 1 = 1 Point is (1,0) 3X 1 + 4 X 2 = 12 0 + 4 X 2 = 12 X 2 = 3 Point is (0,3) 3X 1 + 0 = 12 X 1 = 4 Point is (4,0) 1 2 1 2 3X 1 + 4 X 2 ≥ 12 2X 1 + X 2 ≤ 2 X 1 X 2 ≤ 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
• 3. 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 X 1 X 2 ≤ Shaded area towards the origin ≥ Shaded area away from the origin 3 3 4
• 4. Identify the common area for the following examples
• 2 X + 3Y  6
• 3 X– 2 Y  4
• X,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 -2Y ≥ 4 X 1 X 2 ≤ Shaded area towards the origin ≥ Shaded area away from the origin 2 3 4 -1 3
• 5. Linear Programming – Graphical Method 3) Maximise: Z=3X 1 + 8X 2 s.t. X 1 + X 2 = 200 X 1  80 X 2  60 X 1 ,X 2  0 Equation When X 1 = 0 When X 2 = 0 X 1 + X 2 = 200 0 + X 2 = 200 X 2 = 200 Point is (0,200) X 1 + 0 = 200 X 1 = 200 Point is (200,0) X 1 = 80 Point is (80,0) 50 100 150 50 100 X 1 + X 2 = 200 X 1 ≤ 80 A B X 1 X 2 ≤ Shaded area towards the origin Point Co-Ordinate Z max = 3 X 1 + 8 X 2 A 0, 200 3 x 0 + 8 x 200 = 1600 B 80, 120 3 x 80 + 8 x 120 = 1200 X 2 = 60 Point is (0, 60) 200 150 200 = Shaded area only on the line ≥ Shaded area away from the origin X 2 ≥ 60 (0, 200) (80, 120) Conclusion: X 1 = 0 and X 2 = 200 will give Z max = 1600
• 6. Linear Programming – Graphical Method 4) Maximise: Z=3X 1 + 2X 2 s.t. -2X 1 + X 2  1 X 1  2 X 1 + X 2  3 X 1 ,X 2  0 1 2 3 1 2 X 1 + X 2 ≤ 3 X 1 ≤ 2 A X 1 X 2 ≤ Shaded area towards the origin Conclusion: X 1 = 2 and X 2 = 1 will give Z max = 8 4 3 4 - 2 X 1 + X 2 ≤ 1 - 1 Equation When X 1 = 0 When X 2 = 0 - 2X 1 + X 2 = 1 0 + X 2 = 1 X 2 = 1 Point is (0,1) - 2 X 1 + 0 = 1 X 1 = - 0.5 Point is (-0.5,0) X 1 = 2 Point is (2,0) X 1 + X 2 = 3 Point is (0, 3) Point is (3, 0) B C D E To find C -2 X 1 + X 2 = 1 -----  (1) X 1 + X 2 = 3 -----  (2) (1)-(2) -3 X 1 = - 2 X 1 = 2/3 Substitute X 1 value in Eq (2) 2/3 + X 2 = 3 Therefore X 2 = 7/3 Point Co-Ordinate Z max = 3 X 1 + 2 X 2 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
• 7. Summary :
• 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.
Step 0: Tabular Presentation Step 1: Variable Definition Let X 1 be the amount invested in Portfolio I Let X 2 be the amount invested in Portfolio II Step 2: Objective Function Maximise return Z = 0.10 X 1 + 0.20 X 2 Step 3: Constraints Amount inherited : X 1 + X 2 ≤ 100000 Maximum investment : X 1 ≤ 75000 ; X 2 ≤ 75000 Risk Factors : 4X 1 + 9 X 2 ≤ 6 (X 1 + X 2 ) (OR) - 2 X 1 + 3 X 2 ≤ 0 Average rate of return not to be below 12 % : 0.10 X 1 + 0.20 X 2 ≥ 0.12 (X 1 + X 2 ) - 0.02 X 1 + 0.08 X 2 ≥ 0
• This linear programming problem is summarised as follows:
• Maximise return Z = 0.10 X 1 + 0.20 X 2
• s.t.
• X 1 + X 2 ≤ 100000
• X1 ≤ 75000 ; X2 ≤ 75000
• - 2 X 1 + 3 X 2 ≤ 0
• 0.02 X 1 + 0.08 X 2 ≥ 0
• X 1 , X 2 ≥ 0
1. Will not accept an average rate of return below 12% Other Information 6 (Max.) 9 4 Risk rating 75000 1 - 75000 - 1 Max investment 100000 1 1 Investment Availability 20% 10% Average rate of return Portfolio II Portfolio I Input
• 8. 25 50 75 25 50 X 1 + X 2 ≤ 100000 X 1 ≤ 75000 A X 1 X 2 ≤ Shaded area towards the origin 100 75 100 Equation When X 1 = 0 When X 2 = 0 X 1 + X 2 = 100000 Point is (0,100000) Point is (100000,0) X 2 = 75000 Point is (0, 75000) -2X 1 + 3X 2 = 0 When X 1 = 75000; -2(75000)+3X 2 = 0 3 X 2 = 150000 (or) X 2 = 50000 Point is (75000, 50000) B C
• Maximise return Z = 0.10 X 1 + 0.20 X 2
• s.t.
• X 1 + X 2 ≤ 100000
• X 1 ≤ 75000 ; X 2 ≤ 75000
• - 2 X 1 + 3 X 2 ≤ 0
• 0.02 X 1 + 0.08 X 2 ≥ 0
• X 1 , X 2 ≥ 0
X 1 = 75000 Point is (75000,0) Point is (75000, 50000) and (0, 0) -0.02X 1 + 0.08X 2 = 0 When X 1 = 75000; -0.02(75000)+0.08X 2 = 0 0.08 X 2 = 1500 (or) X 2 = 18750 Point is (75000, 18750) Point is (75000, 18750) and (0, 0) ≥ Shaded area away frrom the origin ’ 000 ’ 000 D X 2 ≤ 75000 -2 X 1 + 3 X 2 ≤ 0 -0.02 X 1 + 0.08 X 2 ≥ 0 To find B X 1 + X 2 = 100000 -----  (1) -2 X 1 + 3 X 2 = 0 ----  (2) (1) X 2 2 X 1 + 2 X 2 = 200000 (add) 5 X 2 = 200000 X 2 = 40000 Substitute X 2 value in Eq (1) X 1 = 60000 To find C; X 1 = 75000 X 1 + X 2 = 100000 X 2 = 25000 (75000, 25000) To find D; X 1 = 75000 0.08 X 2 -0.02 X 1 = 0 0.08 X 2 = 1500 X 2 = 18750 (75000, 18750) Point Co-Ordinate Z max = 0.1 X 1 + 0.2 X 2 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: X 1 = 60000 and X 2 = 40000 will give Z max = 14000
• 9. Minimise: Z = 4X 1 + 2X 2 s.t. X 1 + 2 X 2 ≥ 2 3 X 1 + 2 X 2 ≥ 3 4 X 1 + 3 X 2 ≥ 6 X 1 , X 2 ≥ 0 Equation When X 1 = 0 When X 2 = 0 X 1 + 2 X 2 = 2 0 + 2 X 2 = 2 X 2 = 1 Point is (0, 1) X 1 + 0 = 2 X 1 = 2 Point is (2, 0) 3X 1 + 2 X 2 = 3 0 + 2 X 2 = 3 X 2 = 1.5 Point is (0, 1.5) 3X 1 + 0 = 3 X 1 = 1 Point is (1,0) 4X 1 + 3 X 2 = 6 0 + 3 X 2 = 6 X 2 = 2 Point is (0, 2) 4X 1 + 0 = 6 X 1 = 1.5 Point is (1.5, 0) 1 1 2 X 2 2 3 X 1 ≥ Shaded area away from the origin 3X 1 + 2 X 2 ≥ 3 4X 1 + 3 X 2 ≥ 6 B A C X 1 + 2 X 2 ≥ 2 To find B X 1 + 2X 2 = 2 -----  (1) 4 X 1 + 3 X 2 = 6 ----  (2) (1) X 4 4 X 1 + 8 X 2 = 8 (Sub) -5 X 2 = - 2 X 2 = 2/5 = 0.4 Substitute X 2 value in Eq (1) X 1 + 2 (0.4) = 2 Therefore X 1 = 1.2 Point Co-Ordinate Z max = 4 X 1 + 2 X 2 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: X 1 = 0 and X 2 = 2 will give Z min = 4
• 10.
• 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.
In planning the trip the following considerations must be taken into account a) atleast 10% of packages must be of the deluxe type b) atleast 35% but not more than 70% must be of the standard type c) atleast 30% must be of the economy type d) the maximum number of deluxe packages available in any aircraft is restricted to 60 e) 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 problem b) 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. 200 1 1 1 No. of Package 120 (Min.) - 1 1 Hotel Constraint 60 - - 1 140 (70% of 200) - 1 - Max. Package 60 (30% of 200) 1 - - 70 (35% of 200) - 1 - 20 (10% of 200) - - 1 Min. Package 2400 2300 2250 Profit 2200 2500 4750 Meals & Other expenses 1900 2200 3000 Hotel Cost 6500 7000 10000 Price Economy Standard Deluxe Summary Max Z = 2250 X 1 + 2300 X 2 + 2400 X 3 – 200000 S.t. (i) X 1 ≥ 20 ; (ii) X 2 ≥ 70 and X2 ≤ 140 (iii) X 3 ≥ 60 ; (iv) X 1 ≤ 60 (v) X 1 + X 2 ≥ 120 (vi) X 1 + X 2 + X 3 = 200 X 1 , X 2 , X 3 ≥ 0 In order to solve this problem by graphical method, reduce the problem to 2 variables. Since X 1 + X 2 + X 3 = 200 or X 3 = 200 – (X 1 +X 2 ). Substitute the value of X 3 in the relations mentioned above. Max Z = -150 X 1 - 100 X 2 + 2800000 S.t. (i) X 1 ≥ 20 ; (ii) X 2 ≥ 70 and X 2 ≤ 140 (iii) X 1 + X 2 ≤ 140 ; (iv) X 1 ≤ 60 (v) X 1 + X 2 ≥ 120 X 1 , X 2 ≥ 0 2,200 1,900 6,500 Economy 2,500 2,200 7,000 Standard 4,750 3,000 10,000 Deluxe Meals & other expenses Hotel Cost Price Rs. Tour Plan PRICES AND COST FOR TOUR PACKAGES / PERSONS
• 11. Equation When X 1 = 0 When X 2 = 0 X 1 = 20 Point is (20, 0) X 2 = 70 Point is (70, 0) X 1 + X 2 = 120 Point is (0, 120) Point is (120, 0) Max Z = -150 X 1 + 100 X 2 + 2800000 S.t. (i) X 1 ≥ 20 ; (ii) X 2 ≥ 70 and X 2 ≤ 140 (iii) X 1 + X 2 ≤ 140 ; (iv) X 1 ≤ 60 (v) X 1 + X 2 ≥ 120 X 1 , X 2 ≥ 0 X 1 = 60 Point is (60, 0) X 2 = 140 Point is (140, 0) X 1 + X 2 = 140 Point is (0, 140) Point is (140, 0) 20 X 1 X 2 40 60 80 100 120 140 20 40 60 80 100 120 140 ≤ Shaded area towards the origin ≥ Shaded area away from the origin X 1 ≥ 20 X 2 ≥ 70 X 1 ≤ 60 X 2 ≤ 140 X 1 + X 2 ≥ 120 X 1 + X 2 ≤ 140 A B C D E Point Co-Ordinate Z max = - 150 X 1 - 100 X 2 +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: X 1 = 20 , X 2 = 100 and X 3 = 80 will give Z max = 267000 X 1 = 20 ; X 2 = 100 ; Therefore X 3 = 200-(X 1 +X 2 ) = 200 – (20+100) = 80
• 12.