LPP graphical solution - AMJAD ALI KHAN...

40
LPP graphical solution

Transcript of LPP graphical solution - AMJAD ALI KHAN...

Page 1: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

LPP graphical solution

Page 2: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Graphical solution to LPP

https://www.youtube.com/watch?v=8IRrgDoV8Eo

Page 3: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Graphical Solution Method

1. Plot model constraint on a set of coordinates

in a plane

2. Identify the feasible solution space on the

graph where all constraints are satisfied

simultaneously

3. Plot objective function to find the point on

boundary of this space that maximizes (or

minimizes) value of objective function

Page 4: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Maximize Z = 50x1 + 50x2

Subject to the constraints

4 x1 + 3 x2 120 lb

Convert the constraints into

equalities

4 x1 + 3 x2 =120

x1 + 2 x2 =40

Find two coordinates for each

equality; if x1 = 0 then x2 = ?; if x2 = 0

then x1 = ?;

For 4 x1 + 3 x2 =120 – (0, 40) and

(30,0)

For x1 + 2 x2 =40 – (0, 20) and

(40,0)

x1 + 2 x2 40 hr

x1, x2 0

Page 5: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Graphical Solution: Example

4 x1 + 3 x2 120 lb

x1 + 2 x2 40 hr

Area common toboth constraints

50 –

40 –

30 –

20 –

10 –

0 – |

10

|

60

|

50

|

20

|

30

|

40 x1

x2

Page 6: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Computing Optimal Values x1 + 2x2 = 40

4x1 + 3x2 = 120

4x1 + 8x2 = 160

-4x1 - 3x2 = -120

5x2 = 40

x2 = 8

x1 + 2(8) = 40

x1 = 24

4 x1 + 3 x2 120 lb

x1 + 2 x2 40 hr

40 –

30 –

20 –

10 –

0 – |

10

|

20

|

30

|

40

x1

x2

24

8

Page 7: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Extreme Corner Points

x1 = 24

x2 =8

Z = 1600 x1 = 30

x2 =0

Z = 1,500

x1 = 0

x2 =20

Z = 1,000

A

B

C|

20

|

30

|

40

|

10 x1

x2

40 –

30 –

20 –

10 –

0 –

Page 8: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Substituting the coordinates at points A, B, C

in the objective function Z = 50x1 + 50x2

At point A (0,20) Z = 50(0) + 50(20) = 1000

At point B (24,8) z = 50(24) + 50(8) = 1600

At point C (30,0) z = 50(30) + 50(0) = 1500

Maximum value is 1600 and corresponds to point B;

Therefore, optimal solution is Z = 1600; x1 = 24 and x2 = 8;

Page 9: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

4x1 + 3x2 120 lb

x1 + 2x2 40 hr

40 –

30 –

20 –

10 –

0 –

B

|

10

|

20

|

30

|

40

x1

x2

C

A

Optimal point:

x1 = 24

x2 =8

Z = 1600

Objective Function

Page 10: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 11: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 12: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 13: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 14: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Minimization Problem

Two brands of fertilizer available - Super-gro,

Crop-quick.

Field requires at least 16 pounds of nitrogen and 24

pounds of phosphate.

Super-gro costs $6 per bag, Crop-quick $3 per bag.

Problem : How much of each brand to purchase to

minimize total cost of fertilizer given following data ?

Page 15: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Minimize Z = $6x1 + $3x2

subject to

2x1 + 4x2 16 lb of nitrogen

4x1 + 3x2 24 lb of phosphate

x1, x2 0

CHEMICAL CONTRIBUTION

Brand Nitrogen (lb/bag) Phosphate (lb/bag)

Gro-plus 2 4

Crop-fast 4 3

Page 16: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Graphical method

Complete model formulation:

minimize Z = $6x1 + 3x2

subject to

2x1 + 4x2 16 lb of

nitrogen

4x1 + 3x2 24 lb of

phosphate

x1, x2 0

Page 17: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

A Minimization Model Example

Feasible Solution Area

minimize Z = $6x1 + 3x2

subject to

2x1 + 4x2 16 lb of nitrogen

4x1 + 3x2 24 lb of phosphate

x1, x2 0

Page 18: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

A Minimization Model Example

Optimal Solution Point

minimize Z = $6x1 + 3x2

subject to

2x1 + 4x2 16 lb of nitrogen

4x1 + 3x2 24 lb of phosphate

x1, x2 0

Page 19: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 20: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 21: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Irregular Types of Linear Programming Problems

For some linear programming models, the general

rules do not apply.

Special types of problems include those with:

1. Multiple optimal solutions

2. Infeasible solutions

3. Unbounded solutions

Page 22: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Multiple Optimal Solutions

Objective function is parallel to a

constraint line:

maximize Z=$40x1 + 30x2

subject to

1x1 + 2x2 40 hours of labor

4x2 + 3x2 120 pounds of clay

x1, x2 0

where x1 = number of bowls

x2 = number of mugs

Page 23: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

An Infeasible Problem

Every possible solution violates

at least one constraint:

maximize Z = 5x1 + 3x2

subject to

4x1 + 2x2 8

x1 4

x2 6

x1, x2 0

Page 24: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 25: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 26: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

An Unbounded Problem

Value of objective function

increases indefinitely:

maximize Z = 4x1 + 2x2

subject to

x1 4

x2 2

x1, x2 0

Page 27: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 28: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 29: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 30: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 31: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Degeneracy in LPP

LP is degenerate if in a basic feasible solution, one of the basic variables takes on a zero value

Degeneracy is caused by redundant constraint(s)

Page 32: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 33: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Degeneracy

(0,2) Max Z = 3x1+9x2 = 3*0 + 9 *2 = 18

(4,0) 3*4 + 9*0 = 12

Optimum solution is Z = 18 for x1 = 0 & x2 = 2

Since one of the variables is zero in the optimum solution, the given LPP has

degenerate solution

Page 34: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 35: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Dual LPP

The dual of a given linear program (LP) is another LP that is derived from the original (the primal) LP

Duality in Linear Programming states that every linear programming problem has another linear programming problem related to it and thus can be derived from it.

The original linear programming problem is called “Primal,” while the derived linear problem is called “Dual”

Page 36: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Formulating Dual

Page 37: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a
Page 38: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Dual of LPP

Primal

Maximisation form

No of variables

No of constraints

Lesser than or equal to

Equality constraint

Coefficient of variables in

objective function

RHS of constraint

Dual

Minimisation form

No of constraints

No of variables

Greater than or equal to

Unrestricted variable

RHS of constraint

Coefficient of variables in

objective function

Page 39: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Dual LPP

Page 40: LPP graphical solution - AMJAD ALI KHAN COLLEGEamjadalikhancollege.edu.in/.../uploads/2020/07/LPP-gr.pdf · 2020. 7. 6. · Graphical Solution Method 1. Plot model constraint on a

Formulating Dual LPP