2F - LP Solution Techniques
2F - LP Solution Techniques
2F - LP Solution Techniques
40
30
20
10
X1
10 20 30 40 50
For Educational Purposes Only
Graphical Method: Isoprofit/Isocost Line Method
PROCEDURES AND GUIDELINES …
2. Draw the lines representing each constraint in the graph.
X2
Constraints X1 X2
2x1 + x2 < 40 20 0
0 40
40
x1 + 3x2 < 45 45 0
30
0 15
20
x1 < 12 12 0
10
X1
10 20 30 40 50 x1 + 3x2 < 45
3,000 10 0
300x1 + 250x2
3,000 0 12
4,500 15 0
300x1 + 250x2 4,500 0 18
6,000 20 0
300x1 + 250x2
6,000 0 24
7,500 25 0
300x1 + 250x2
7,500 0 30
9,000 30 0
300x1 + 250x2
9,000 0 For36
Educational Purposes Only
Graphical Method: Isoprofit/Isocost Line Method
PROCEDURES AND GUIDELINES …
6. Determine the optimum point of intersection between the isoprofit/isocost
line and the FSA.
Graph the solution for the inequality: 2x1 + x2 < 40 considering only positive values
X2
for x and y.
2x1 + Only
For Educational Purposes x2 < 40
Example 1: Isoprofit Line Method
Graph the solution for the inequality: x1 + 3x2 < 45 considering only
positive values for x and y.
X2
2x1 + x2 < 40 30
x1 + 3x2 < 45 20
(15,0)
10
x1 < 12 (0,45)
X1
Z, x1 , x2 > 0 10 20 30 40 50
x1 + 3x2 < 45
2x1 + x2 < 40
For Educational Purposes Only
Example 1: Isoprofit Line Method
Graph the solution for the inequality: x1 < 12 considering only positive
values for x and y.
X2
2x1 + x2 < 40 30
x1 + 3x2 < 45 20
x1 < 12 10
X1
Z, x1 , x2 > 0 10 20 30 40 50
x1 + 3x2 < 45
2x1 + x2 < 40
For Educational Purposes Only
Example 1: Isoprofit Line Method
Draw the isoprofit line: Z = 300x1 + 250x2. Start at any arbitrary profit,
and adjust until reaching the feasible point that maximizes the value of z.
X2
Model Constraints:
2x1 + 4x2 16 lb (nitrogen constraint)
4x1 + 3x2 24 lb (phosphate constraint)
x1, x2 0 (non-negativity constraint)
For Educational Purposes Only
Example 2: Isocost Line Method
Minimize:
Z = $6x1 + $3x2
Subject to:
2x1 + 4x2 16
4x1 + 3x2 24
x1 , x 2 0
5 x1 > 3
Maximize Z = 3x1 + 2x2
Subject to: 4
6x1 + 4x2 < 24
3
x1 + x 2 < 5 x2 > 2
x1 > 3 2
x2 > 2
1
x 1, x 2 > 0
X1
This LP is infeasible because 1 2 3 4 5 x1 + x 2 < 5
there is no Feasible Solution Area.
6x1 + 4x2 < 24
= + Artificial (A)
A bm
For Educational Purposes Only
Example: Product Mix Problem
s1 2 1 1 0 0 40
s2 1 3 0 1 0 45
s3 1 0 0 0 1 12
For Educational Purposes Only
Step 3. Test for Optimality
In the initial tableau, x1 is identified as the entering variable since it is the most
negative among the entries in the z-row.
Computing for the ratios of variables with positive coefficients in column x1:
S1 = 40/2 = 20 S2 = 45/1 = 45 S3 = 12/1 = 12
The leaving variable is identified as S3, because it has the smallest ratio.
For Educational Purposes Only
Step 5. Generate an Improved Solution
From the chosen entering and leaving variables, define the pivot element. This
is the element in the intersection of the entering (pivot) column and the leaving
(pivot) row.
Build the improved tableau as follows:
For the new pivot row: Divide all the coefficients by the pivot element.
For all the other rows: Compute these rows by subtracting the product of the
new pivot row and the corresponding element in the pivot column from the
old row.
Once you re-compute for the new Z-row, check for optimality (step 3).
Repeat Step 3, 4, 5 (an iteration) until solution is optimal. Then *go to
step 6.
For Educational Purposes Only
Illustration: Product Mix Problem
BV x1 x2 s1 s2 s3 RHS
Z – 300 – 250 0 0 0 0
s1 2 1 1 0 0 40
s2 1 3 0 1 0 45
s3 1 0 0 0 1 12
For the new pivot row: Divide all elements in the S3 row by the pivot element (1).
New Pivot Row: 1 0 0 0 1 12
For all the other rows: Use the following formula:
New Row = Old Row – [(Element in Pivot Col.)(New Pivot Row)
For S1: x1 x2 S1 S2 S3 RHS
Old Row: 2 1 1 0 0 40
- (2* NPR): 2 0 0 0 2 24
New Row: 0 1 1 0 For Educational
-2 16 Purposes Only
Illustration: Product Mix Problem
BV x1 x2 S1 S2 S3 RHS
Z – 300 – 250 0 0 0 0
S1 2 1 1 0 0 40
S2 1 3 0 1 0 45
S3 1 0 0 0 1 12
Z 0 – 250 0 0 300 3600
S1 0 1 1 0 –2 16
S2 0 3 0 1 –1 33
x1 1 0 0 0 1 12
Z 0 0 0 250/ 650/ 6350
3 3
S1 0 0 1 – 1/3 – 5/3 5
x2 0 1 0 1/3 – 1/3 11
x1 1 0 0 0 1 12
Optimal with Z = 6350, x1 = 12, x2 = 11, s1 = 5, s2 = 0, s3 = 0
For Educational Purposes Only
Step 6. Check for Other Optimal Solutions
A1 1 1 –1 0 1 0 300
A2 3 0 0 –1 0 1 250
x1 x2 s1 s2 A1 A2 RHS
Old (Z row): -2 -3 0 0 -M -M 0
M (A1 row): M 3M 0 -M M 0 20M
M (A2 row): M M 0 0 0 M 10M
New (Z row): 2M-2 4M-3 0 -M 0 0 30M
x1 x2 s1 s2 A1 A2 RHS
Old Z-row : 2 4 0 0 M M 0
Const. 2*-M: -4M -2M 0 M -M 0 -20M
Const. 3*-M: -M -M 0 0 0 -M -10M
New Z-row: 2-5M 4-3M 0 M 0 0 -30M
X1 X2 X3 X4 S1 S2 A1 A2 RHS
Old z 3 -2 4 6 0 0 M M 0
*-M -M -2M -M -M M 0 -M 0 -100M
*-M -2M -M -3M -7M 0 M 0 -M -150M
New z 3-3M 2-3M 4-4M 6-8M M M 0 0 -250M
BV X1 X2 X3 X4 S1 S2 A1 A2 RHS
z 3-3M 2-3M 4-4M 6-8M M M 0 0 -250M
A1 1 2 1 1 -1 0 1 0 100
A2 2 1 3 7 0 -1 0 1 150
*choose the variable with the largest negative number as the Entering Variable
*choose the basic variable with the smallest positive ratio as the Leaving Variable
X1 X2 X3 X4 S1 S2 A1 A2 RHS
6+8M* 0 0
X4
New z M 0
X1 X2 X3 X4 S1 S2 A1 A2 RHS
OldA1 1 2 1 1 -1 0 1 0 100
*-1X4 -1 0 0
OldA1 0 -1 1
X1 X2 X3 X4 S1 S2 A1 A2 RHS
z M 0
A1 0 -1 1
A1 0 -1 1
X4 1 0 0
X4 1 0 0
X1 X2 X3 X4 S1 S2 A1 A2 RHS
New X2 0
X1 X2 X3 X4 S1 S2 A1 A2 RHS
Old z 0 M 0
0
0
New z 0
New z 0
X2 1 0
X4 1
*Optimal Solution is reached if there are no more ‘M’ present in the basic variables
Old X4 1 0 0
X4 1
• In the final tableau, if one or more artificial variables (A1, A2, …) is still
basic and has a nonzero value, then the problem has an infeasible
solution.
• If there is a zero under one or more nonbasic variables in the last tableau
(optimal solution tableau), then there is a multiple optimal solution.
• When determining the leaving variable of any tableau, if there is no
positive ratio (all the entries in the pivot column are negative and
zeroes), then the solution is unbounded.
Basis x1 x2 S1 S2 RHS
-Z 0 0 12 11 -6,350
X2 0 1 -1 1/3 650/3
x1 1 0 0 -1/3 250/3
BV x1 x2 s1 s2 a2 a3 RHS
-W’ -2 -4 0 1 0 0 -30
Phase 1:
s1 ½ ¼ 1 0 0 0 4
Since w’=0, Phase I has a2 1 3 0 -1 1 0 20
been concluded. a3 1 1 0 0 0 1 10
We now drop the columns -W’ -2/3 0 0 -1/3 4/3 0 -10/3
for the artificial variables s1 5/12 0 1 1/12 -1/12 0 7/3
a1 and a2 and reintroduce x2 1/3 1 0 -1/3 1/3 0 20/3
the original objective a3 2/3 0 0 1/3 -1/3 1 10/3
function, -W’ 0 0 0 0 1 1 0
min z = 2x1+3x2. s1 0 0 1 -1/8 1/8 -5/8 1/4
x2 0 1 0 -1/2 1/2 -1/2 5
x1 1 0 0 1/2 -1/2 3/2 5
BV x1 x2 S1 S2 RHS
old – Z 2 3 0 0 0
x1 * (-2) -2 0 0 –1 -10
x2* (-3) 0 -3 0 3/2 -15
new –Z 0 0 0 1/2 -25
For Educational Purposes Only
Example: Two Phase Method
Phase 2:
Basis x1 x2 S1 S2 RHS
-Z 0 0 0 1/2 -25
x2 0 1 0 -1/2 5
x1 1 0 0 1/2 5
S1 0 0 1 -1/8 1/4