Professional Documents
Culture Documents
Graphical Solution
Solution to
to Linear
Linear Programming
Programming Problems
Problems
1
Solution to Linear Programming Problem by graphical method
Solution – any specification of values for the decision variables (X1, X2, ………Xn)
A feasible solution – A solution for which all the constraints are satisfied
An infeasible solution – Is a solution for which at least one constraint is violated
Feasible region – Is a collection of all feasible solutions
Optimal solution - Is a feasible solution that has the most favorable value of the
objective function
Most favorable value is the largest value if the objective function is to be maximized,
• It is the smallest value if the objective function is to be minimized.
A Corner point Feasible Solution (CPF) – Is a solution that lies at a corner of the feasible
region. Also know as extreme points or vertices.
2
Example -1 Develop an LP Model and solve the problem
RESOURCE REQUIREMENTS
Labor Clay Revenue model - 1 Revenue model -II
PRODUCT (hr/unit) (lb/unit) ($/unit ) ($/unit)
Bowl 1 4 40 70
Mug 2 3 50 20
There are 40 hours of labor and 120 pounds of clay available each day
Develop an optimal solution for the product mix in model I and Model II (bowls and Mugs)
to maximize the profit
Objective function
Maximize Z1 = 40 x1 + 50 x2 x1 = number of bowls to produce
Maximize Z 2 = 70 x1 + 20 x2 x2 = number of mugs to produce
if X2 = 0
X1 + 0 = 40
X1 = 40
Graphical solution Constraint 1 : X1 + 2X2 40
X2 if X1 = 0
X2 = 20
50 –
if X2 = 0
40 – X1 = 40
4 x1 + 3 x2 120 lb
30 –
Constraint 2 : 4X1 3X2 + 120
A
20 – if X1 = 0
B X2 = 40
10 – x1 + 2 x2 40 hr
D if X2 = 0
0 –O
C
10 –
20 –
30 –
40 –
50 –
60 –
X1 X1 = 30
Constraint 1 : X1 + 2X2 40
X2 if X1 = 0
X2 = 20
50 –
if X2 = 0
40 – X1 = 40
30 –
Solution space or Constraint 2 : 4X1 3X2 + 120
A
20 – feasible region
if X1 = 0
B X2 = 40
10 –
D if X2 = 0
0 –O
C
10 –
20 –
30 –
40 –
50 –
60 –
X1 X1 = 30
Maximize Z = 40 x1 + 50 x2
X2
50 –
40 –
Maximize Z = 40 *24 + 50 *8 = 1,360
30 –
A x2 = 8
20 –
x1 = 24
10 – B
D
0–
O C
10 –
20 –
30 –
40 –
50 –
60 –
X1
x1 + 2x2 = 40
4x1 + 3x2 = 120
X2
4x1 + 8x2 = 160
50 –
-4x1 - 3x2 = -120
40 – 5x2 = 40
Maximize Z = 40 *24 + 50 *8 = 1,360 x2 = 8
30 –
A
20 – x1 + 2(8) = 40
x1 = 24
10 – B
D
0–
O C
10 –
20 –
30 –
40 –
50 –
60 –
X1
Optimal solution – I, Z = 40 x1 + 50 x2
x1 = 0 bowls
x2 x2 =20 mugs
x1 = 24 bowls
Z = $1,000
x2 =8 mugs x1 = 30 bowls
40 – Z = $1,360 x2 =0 mugs
30 – Z = $1,200
A
20 –
x1 = 0 bowls
x2 x2 = 20 mugs
x1 = 24 bowls
Z = $400
x2 =8 mugs
40 – Z = $1,840 x1 = 30 bowls
x2 =0 mugs
30 –
A
Z = $2,100
20 –
10 – B
C
0– | | | | x1
10 20 30 40
Objective Function Z = 70x1 + 20x2
Optimal solution is 30 bowls and 0 mugs
x2
40 – 4x1 + 3x2 120 lb
30 – Optimal point:
A
x1 = 30 bowls
20 – x2 =0 mugs
Z = $2,100
B
10 –
x1 + 2x2 40 hr
| | | C |
0– 10 20 30 40 x1
Example - 2
subject to x1 < 6
2x1 + 3x2 < 19
x1 + x2 < 8
x1 > 0 and x2 > 0
First Constraint
Maximize Z= 5x1 + 7x2
x2
subject to x1 < 6
8 2x1 + 3x2 < 19
7 x1 = 6 x1 + x2 < 8
6 x1 > 0 and x2 > 0
Shaded region
5 contains all
feasible points
4
for this constraint
3
2
(6, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
Second Constraint
x2
8
x1 + x2 = 8
7
6 x1 = 6
5
4
3
Feasible 2x1 + 3x2 = 19
2
Region
1
x1
1 2 3 4 6 7 8 9 10
Maximize Z= 5x1 + 7x2
Extreme Points Solution
Extrem Coordinates ( X1 , Objective function
x2 e points X2) values
Z = 3X1 + 2X2
8 A (0,6.33) Z= 5(0) + 7(6.33) = 44.31
7 B (5,3) Z= 5(5) + 7(3) = 46
A (0, 6.33)
6 C (6,2) Z= 5(6) + 7(2) = 44
5 D (6,0) Z= 5(6) + 7(0) = 30
4
B (5, 3)
3
Feasible C (6, 2)
2 Region
1 (0, 0) (6, 0)
D x1
0
1 2 3 4 5 6 7 8 9 10
Iso-profit (Iso-cost) Function line method
x2
subject to x1 < 6
8 2x1 + 3x2 < 19
7 x1 + x2 < 8
(0, 5)
6 Objective Function x1 > 0 and x2 > 0
5 5x1 + 7x2 = 35
4
3
2
(7, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
Iso-Profit Lines
x2
8
7 5x1 + 7x2 = 35
6
5 5x1 + 7x2 = 39
4
3 5x1 + 7x2 = 42
2
1
x1
1 2 3 4 5 6 7 8 9 10
Optimal Solution
x2
Maximum
Objective Function Line
8
5x1 + 7x2 = 46
7
6 Optimal Solution
(x1 = 5, x2 = 3)
5
4
3
2
1
x1
1 2 3 4 5 6 7 8 9 10
Example 3 Graphical Solution: Constraint 1 : 5X1 + X2 10
Solve the following LP problem using the graphical method 5X1 + X2 = 10 hrs
Minimize Z = 3X1 + 2X2
if X1 = 0
Subject to constraints
0 + X2 = 10
a). 5X1 + X2 10 if X2 = 0
b). X1 + X2 6
5X1 + 0 = 10
c). X1 + 4X2 12
X1 = 2
x 1, x 2 0
0 + X2 = 6 0+ X2 = 3
X1 = 6
X1 = 12
X2 Minimize Z = 3X1 + 2X2 Constraint 1 - X1= 2, X2 =10
Constraint 2 - X1 = 6, X2 = 6
12 –
Constraint 3 - X1 =12, X2 = 3
10 – (0,10)
a). 5X1 + X2 10
8–
Solution space or b). X1 + X2 6
feasible region c). X1 + 4X2 12
6– (1,5) x1, x 2 0
4–
(4,2)
2–
(12,0
2–
4–
6–
8–
10 –
12 –
14 –
16 –
18–
0– X1
18
X2 Coordinates of extreme points of the feasible region( bounded from below) are
A (12,0), B (4,2), C(1,5), and D(0.10)
8–
C
6– (1,5)
4–
B (4,2)
2–
A (12,0)
2–
4–
6–
8–
10 –
12 –
14 –
16 –
18–
0– X1
18
X2
Coordinates of extreme points of the feasible region( bounded from below) are
A (12,0), B (4,2), C(1,5), and D(0.10) Check - Constraints
Minimize Z = 3X1 + 2X2 should be satisfied
12 – The value of objective function at each of these extreme points is
D
10 – (0,10) Extreme points Coordinates ( X1 , X2) Objective function values
Z = 3X1 + 2X2
4–
6–
8–
10 –
12 –
14 –
16 –
18–
0– X1
18
Example 4 - Special Cases of infeasible solution
Infeasibility
• No solution to the LP problem satisfies all the constraints, including the non-negativity
conditions.
• Graphically, this means a feasible region does not exist.
Causes include:
• A formulation error has been made.
• Management’s expectations are too high.
• Too many restrictions have been placed on the problem (i.e. the problem is over-
constrained).
Example 4: Infeasible Problem
x1
2 4 6 8 10
There are no points that satisfy both constraints, so there is no feasible region (and no feasible solution)
X2
Example 5: Unbounded solution 3.0
2.5 –
Maximize Z = 3X1 +2X2
Subject to constraints 2.0 –
x1 - x2 < 1
x1 + x2 3 1.5 –
x1 and x2 0 1.0 –
0.5 –
X1
0–
0.5 –
1.0 –
1.5 –
2.0 –
2.5 –
3.0 –
- 0.5 –
- 1.0 –
X2
Example 5: Unbounded solution 3.0 x1 + x2 3
2.5 –
Maximize Z = 3X1 +2X2
Subject to constraints 2.0 –
x1 - x2 < 1
x1 + x2 3 1.5 –
x1 and x2 0 1.0 – B
0.5 –
A
0–
0.5 –
1.0 –
1.5 –
2.0 –
2.5 –
3.0 –
X1
0.5 –
1.0 –
x1 - x2 < 1
Example 6 Graphical Solution (multiple optima)
A firm uses lathe, milling machine and grinder to make two machine parts. The table
below represents the machining time required for each part, machine time available and
profit on each part. Find the number of part I and part II to be manufactured per week
in order to maximize the profit
Type of machine Machine time required for the machined Machine time
parts (minutes.) available per week
I II (minutes.)
Lathe 12 6 3,000
Milling 4 10 2,000
grinding 2 3 900
Profit per unit Rs.40 Rs.100
Let the parts I and II be X1 and X2
Objective, maximize profit Z = 40 X1 + 100 X2
Constraints : 12 X1 + 6 X2 3,000
4 X1 + 10 X2 2,000
Constraints : 12 X1 + 6 X2 3,000
2 X1 + 3X2 900
X2 = 500
x1 , x2 0
X1 = 250
4 X1 + 10 X2 2,000
X2 = 200
X1 = 500
2 X1 + 3X2 900
X2 = 300
X1 = 450
Constraints : 12 X1 + 6 X2 3,000
X2 = 500
X1 = 250
600 –
4 X1 + 10 X2 2,000
500 –
X2 = 200
400 – X1 = 500
100 –
0–
100 –
200 –
300 –
400 –
500 –
600 –
Extreme Coordinates Objective function values
points ( X1 , X2) Z = 40 X1 + 100 X2
A (0,200) Z= 40(0) + 100(200) = 20,000
600 – B (187.5,125) Z= 40(187.50) + 100(125) = 20,000
C (250,0) Z= 40(250) + 100(0) = 10,000
500 –
maximize profit Z = 40 X1 + 100 X2
400 –
300 –
200 –
300 –
400 –
500 –
600 –
The maximum value of Z occurs at 2 vertices A
and B of the shaded region OABC
hence the two points A and B give maximum value of Z
600 – Therefore there is no unique optimum solution to the
problem.
500 – Any point between A and B on the line AB can be
taken as an optimal solution with a profit value
400 –
of Rs. 20,000
300 – This is a case of multiple optima
200 –
300 –
400 –
500 –
600 –
Using graphical method solve the following LP Problem
Maximize Z = 2X1 + X2 X2
Subject to constraints 6 –
E
i). X1 + 2X2 <=10 5–
D
ii). X1 + X2 <= 6
4–
iii). X1 - X2 <=2
iv). X1 - 2X2 <=1 3–
X1, X2 >=0
2– C
B
1–
O A
0–
10
8
9
1
6
2
7
- 1.0 –
X1
Extreme Coordinates Objective function values (CPS)
points (X1, X2) Z = 2 X1, + X2
4–
2,4 D E (0,5) 2(0) + 1(5) = 5
3–
2–
C 4,2
1–
3,1 B
A1,0
0–
O
7
10–
C
1
-1
-2
Next topic Simplex Method