2F - LP Solution Techniques

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 109

Linear Programming

Models and Solution


Techniques
Linear Programming
• Linear programming (LP) is the most common type of
mathematical programming.
• LP seeks to maximize or minimize a linear objective
function subject to a set of linear constraints.
• LP assumes all relevant input data and parameters are
known with certainty (deterministic models).

For Educational Purposes Only


LP Solution Techniques: Graphical Method

For Educational Purposes Only


Graphical Method
For LP problems with 2 decision variables, the graphical solution is the
easiest solution method.
Two methods under the graphical procedure can be used to search for
the optimal solution:
1. Enumeration of all Corner-Point Feasible (CPF) Solutions and
comparison of their z-values. A corner-point feasible solution is a
solution that lies at a corner of the feasible region.
2. Using isoprofit (or isocost) lines. An isoprofit line is a line where all
the points in it have the same objective function (Z) value.
Isocost line is the term used if the objective function is being
minimized. For Educational Purposes Only
Graphical Method: Feasible Solution Area
• The shaded area is the area where all the constraint arrows intersect.
The points within this area satisfy all the constraints of the problem.
These points are called feasible points, and the shaded area is called the
feasible area or feasible region.
• Any point outside this area is called an infeasible point (i.e., these
infeasible points will violate one or more of the constraints).
• The intersections of the constraints are called corner (or extreme)
points. There are feasible corner points and infeasible corner points.
• Corner point solutions are adjacent to each other when they
are connected by a single line segment on the boundary of the
feasible region. For Educational Purposes Only
Graphical Method: Isoprofit/Isocost Line Method
PROCEDURES AND GUIDELINES
Example: Graph the solution for the inequality: 2x1 + x2 < 40 considering
only positive values for x and y.

Maximize Z = 300x1 + 250x2


Subject to:
2x1 + x2 < 40
x1 + 3x2 < 45
x1 < 12
Z, x1 , x2 > 0
For Educational Purposes Only
Graphical Method: Isoprofit/Isocost Line Method
PROCEDURES AND GUIDELINES …
1. Prepare a graph using the decision variables as axes. Indicate
which variable will be in each axis.
X2

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

x1 < 12 2x1 + x2 < 40


For Educational Purposes Only
Graphical Method: Isoprofit/Isocost Line Method
PROCEDURES AND GUIDELINES …
3. Show the appropriate directional arrows in the constraint line to indicate
whether the constraint is >, < or =.
Note: For inequalities, a symbol “>” denotes
an upward directional arrow, and “<“ denotes
a downward directional arrow

For Educational Purposes Only


Graphical Method: Isoprofit/Isocost Line Method
PROCEDURES AND GUIDELINES …
4. Using the directional arrows, determine the FSA (feasible solution area). This
is the area where all the constraints are satisfied and, hence, where feasible
solutions are located.

For Educational Purposes Only


Graphical Method: Isoprofit/Isocost Line Method
PROCEDURES AND GUIDELINES …
5. Draw the isoprofit/isocost lines (lines parallel to each other which represent the
objective function).
Computed
Objective Z (Assumed Values for
Func. Values) X1 X2

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.

The highest value of Z lies in the intersection of


constraints #2 (x1 + 3x2 < 45) and #3 (x1 < 12).
This intersection is computed as: (12, 11) and
gives the optimal solution.
Therefore z = 300(12) + 250(11) = 6350.
(12,11)

For Educational Purposes Only


Example 1: Isoprofit Line Method
The Product-Mix Problem (Maximization)
Maximize Z = 300x1 + 250x2
Subject to: 2x1 + x2 < 40 (labor constraint)
x1 + 3x2 < 45 (machine time constraint)
x1 < 12 (marketing constraint)
Z, x1 , x2 > 0 (non-negativity constraints)
Where: x1 = no. of units of Product 1
x2 = no. of units of Product 2
Z = profit derived from production and sale of Products 1 and 2

For Educational Purposes Only


Example 1: Isoprofit Line Method

Graph the solution for the inequality: 2x1 + x2 < 40 considering only positive values
X2
for x and y.

Maximize Z = 300x1 + 250x2


40 (40,0)
Subject to:
30
2x1 + x2 < 40
20
x1 + 3x2 < 45
10
x1 < 12 (0,20) X1
Z, x1 , x2 > 0
10 20 30 40 50

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

Maximize Z = 300x1 + 250x2


Subject to: 40

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

Maximize Z = 300x1 + 250x2 x1 < 12


Subject to: 40

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

The highest value of Z lies in the intersection of


x1 < 12
constraints #2 (x1 + 3x2 < 45) and #3 (x1 < 12).
The dashed lines in 40
the graph denote the This intersection is computed as: (12, 11) and gives
30 the optimal solution.
isoprofit lines. The z-
value of each line 20 Therefore z = 300(12) + 250(11) = 6350.
(12,11)
increases as the line 10
moves away from the X1
origin.
10 20 30 40 50
x1 + 3x2 < 45
2x1 + x2 < 40 Purposes Only
For Educational Z = 6350
Computing for Intersections of Constraints
Intersection of the constraint lines can be computed through the Substitution
Method or the Elimination Method.
Substitution Method
Take for example the intersection of constraints #2 (x1 + 3x2 < 45) and #3 (x1 <
12).
Express as equalities:
x1 + 3x2 = 45 - constraint #2
x1 = 12 - constraint #3
Substituting constraint #3 to constraint #2,
12 + 3x2 = 45
3x2 = 33
x2 = 11 Therefore, the intersection is (12, 11).
For Educational Purposes Only
Computing for Intersections of Constraints
Elimination Method
Example:
Express constraints as equalities:
2x1 + x2 < 40  2x1 + x2 = 40
x1 + 3x2 < 45  x1 + 3x2 = 45
Multiply one equation by a constant such that one variable can be eliminated:
2x1 + x2 = 40  2x1 + x2 = 40
-2(x1 + 3x2) = -2(45)  + -2x1 – 6x2 = -90
-5x2 = -50
x2 = 10
Substitute x2 to any equation:
2x1 + 10 = 40  2x1 = 30  x1 = 15
For Educational Purposes Only
Therefore, the intersection is (15, 10).
Example 2: Isocost Line Method
Fertilizer Mix (Minimization)
Two brands of fertilizer available - Super-Gro, Crop-Quick. The field
requires at least 16 pounds of nitrogen and 24 pounds of phosphate.
Super-Gro costs $6 per bag, Crop-Quick $3 per bag. How much of each
brand to purchase to minimize total cost of fertilizer given the following
data? Chemical Contribution
Nitrogen Phosphate
Brand
(lb/ bag) (lb/ bag)
Super-gro 2 4
Crop-quick 4 3
For Educational Purposes Only
Example 2: Isocost Line Method
Decision Variables:
x1 = bags of Super-Gro
x2 = bags of Crop-Quick

The Objective Function:


Minimize Z = $6x1 + 3x2

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

For Educational Purposes Only


Example 2: Isocost Line Method
The dashed lines in the graph denote
Minimize: the isocost lines. The z-value of each line
Z = $6x1 + $3x2 decreases as the line moves towards the
origin.
Subject to: The lowest value of Z lies in the
2x1 + 4x2  16 intersection of constraint #2 (4x1 + 3x2 >
24) with the x2 axis.
4x1 + 3x2  24
x1 , x 2  0 This intersection is: (0,8) and gives the
optimal solution.
Therefore z = 6 (0) + 3 (8) = $24.

For Educational Purposes Only


Graphical Method: Corner-Point
Feasible (CPF) Solution
1. Prepare a graph using the decision variables as axes. Indicate which variable will
be in each axis.
2. Draw the lines representing each constraint in the graph.
3. Show the appropriate directional arrows in the constraint line to indicate
whether the constraint is >, < or =.
4. Using the directional arrows, determine the FSA (feasible solution area). This is
the area where all the constraints are satisfied and, hence, where feasible
solutions are located.
5. Enumerate all the corner points, and get their z-values. Identify the optimal
solution as a corner point with highest profit (maximization),
or lowest cost (minimization). 

For Educational Purposes Only


Example 1: Corner-Point Feasible Solution
Problem: y
Therefore, the optimal solution is (48, 84)
Max Z = x1 + 1.2x2 and z = 148.8.
Subject to:
2x1 + x2 < 180 B (90,0)
C (48,84)
x1 + 3x2 < 300
x1 , x 2 > 0 FSA
Corner Point Z = x1 + 1.2x2 D (0,100)
x
A (0, 0) 0 A (0,0) 100 200 300 x1 + 3x2 < 300

B (90, 0) 90 2x1 + x2 < 180


C (48, 84) 148.8
D (0, 100) 120
For Educational Purposes Only
Example 2: Corner-Point Feasible Solution
Obj. Func. Max Z = 6X1 + 4X2
Subject to:
X1 – X2 < 1
3X1 + X2 > 3
5X1 + 3X2 < 15
X1 + 2X2 > 2
X1 + X2 < 4
X1, X2 > 0

For Educational Purposes Only


Example 2: Corner-Point Feasible Solution

For Educational Purposes Only


Example 3: Corner-Point Feasible Solution
Problem:
y
Min Z = 6x1 + 8x2 40x1+10x2>2400
A(0, 240)
Subject to:
40x1 + 10x2 > 2400
10x1+15x2>2100
10x1 + 15x2 > 2100 200 S
B(30, 120)
5x1+15x2>1500
5x1 + 15x2 > 1500
C(120, 60)
x1 , x 2 > 0 100
D(300, 0)
Corner Point Z = 6x1 + 8x2 x
A (0, 240) 1920
B (30, 12*0) 1140
100 200 300
C (120, 60) 1200
D (300, 0) 1800 Therefore, the optimal solution is (30, 120) and z = 1140.
For Educational Purposes Only
Example 4: Corner-Point Feasible Solution
Objective function: Min. Z = 5A + 5B
Subject to:
2A + B > 2
2A + 2B > 3
A - 3B > -2
2A + 4B > 5
Z, A, B > 0

For Educational Purposes Only


Example 4: Corner-Point Feasible Solution

For Educational Purposes Only


Graphing an Equality Constraint

• If (at least) one constraint appears as an equality, then


the feasible region of solutions is not an area anymore,
but a line segment, directly on the line describing the
equality constraint.
• Generally speaking, the use of equations should be
minimized in LP because it introduces inflexibility.

For Educational Purposes Only


Slack and Surplus Variables
• Unused supply or resource is called slack, si, where i = constraint
i. The slack must take only nonnegative values (si > 0). For
minimization problems, excesses are called surplus.
• When there is zero slack, this means that the constraint is being
exactly met.
- When slack = 0, you have what is called a binding constraint.
- When slack > 0, you have a non-binding constraint.
• The optimal solution lies on the intersection of binding
constraints; and a non-binding constraint does not intersect the
point of the optimal solution.
For Educational Purposes Only
Slack and Surplus Variables
In the previous example, the optimal solution was (30, 120). Substituting this to
each of the constraints,
40x1 + 10x2 > 2400  40(30) + 10(120) = 2400 (binding constraint)
10x1 + 15x2 > 2100  10(30) + 15(120) = 2100 (binding constraint)
5x1 + 15x2 > 1500  5(30) + 15(120) = 1950 (non-binding constraint, with a
surplus of 1950 – 1500 = 450.)
(30, 120) lies on the intersection of constraints 40x 1 + 10x2 > 2400 and 10x1 + 15x2
> 2100, thus making these binding constraints. Meanwhile, the remaining
constraint (5x1 + 15x2 > 1500 does not intersect with (30, 120), hence it is non-
binding.

For Educational Purposes Only


Special Cases of LP Problems:
Graphical
• Alternative or Multiple Optimal
Solutions
• Infeasible LP
• Unbounded LP

For Educational Purposes Only


Alternative or Multiple Optimal Solutions
X2

Multiple optimal solutions occur when the 5


objective function has the same slope as
4
at least one of the binding constraints. A
3
Maximize Z = 3x1 + 2x2
Subject to: 2
6x1 + 4x2 < 24 1
x1 + x 2 < 5 B
X1
x1, x2 > 0 1 2 3 4 5 x1 + x2 < 5
Multiple optimal solutions lie along line
6x1 + 4x2 < 24
segment AB.
For Educational Purposes Only
Infeasible LP
X2

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

For Educational Purposes Only


Unbounded LP
X2
6
Maximize Z = 2x1 – x2
5
Subject to:
4 x1 – x2 < 1
x1 – x2 < 1
3
2x1 + x2 > 6
2
x 1 , x2 > 0
1

The feasible region is unbounded and 0 X1

the objective function line can be moved–1 1 2 3 4 5

parallel to itself without bound so that 2x1 + x2 > 6

z can be increased infinitely.


For Educational Purposes Only
LP Solution Techniques: The Simplex Method

For Educational Purposes Only


The Simplex Method
• Developed by George Dantzig in 1947
• Proven to be remarkably efficient in solving huge
problems.
• Except for small problems, this method is always
executed on a computer.

For Educational Purposes Only


The Simplex Process
1. Standardize the problem into a linear programming tableau.
2. Generate an initial solution, called a basis.
3. Test the solution for optimality. If the solution is not optimal, improve
it (by going to step 4); otherwise go to step 6.
The improvement of a non-optimal solution is done in two steps:
4. Generate an improved solution by identifying one variable that will
leave the basis and one variable that will enter the basis.
5. The improved solution is checked (see step 3) for optimality. If it is not
optimal, then steps 4 and 5 are repeated. If it is optimal, step 6 is
undertaken.
6. Find if more than one optimal solution exists.
For Educational Purposes Only
Step 1. Standardize the Problem

Transform all the constraints to equality by introducing


slack, surplus, and artificial variables as follows:

Constraint type Variable to be added


≤ + slack (s)

≥ - Surplus (s) + artificial (A)

= + Artificial (A)

For Educational Purposes Only


Step 2. Generate an initial solution (basis)
• Basic variables are those variables that are nonzero. Only these
variables form the basis
• The size of the basis is equal to the number of constraints,
excluding the non-negativity constraints.
• Develop the initial simplex tableau which contains the basis.
Basic X1 Xn S1 Sn A1 An
… …... …. RHS
variable
Z Objective function coefficient in different signs Z value
S b1
Coefficient of the constraints

A bm
For Educational Purposes Only
Example: Product Mix Problem

In the product mix problem, the basis has 3 variables (3 constraints).


The LP Model in standard form:
Maximize Z = 300x1 + 250x2 Max Z = 300x1 + 250x2 + 0S1 + 0S2 + 0s3
s.t. 2x1 + x2 < 40 (labor) Z - 300x1 - 250x2 - 0S1 - 0S2 - 0s3 = 0
x1 + 3x2 < 45 (machine time) s.t. 2x1 + x2 + S1 = 40
x1 < 12 (marketing) x1 + 3x2 + S2 = 45
x1 > 0, x2 > 0 x1 + S3 = 12
x1, x2, s1, s2, s3 > 0

For Educational Purposes Only


The Initial Simplex Tableau
Max Z = 300x1 + 250x2 + 0S1 + 0S2 + 0s3 Initial solution: (x1 = x2 = 0), s1 = 40,
Z - 300x1 - 250x2 - 0S1 - 0S2 - 0s3 = 0 s2 = 45, s3 = 12. Initial Z = 0.
s.t. 2x1 + x2 + S1 = 40
x1 + 3x2 + S2 = 45
x1 + S3 = 12
Basis x1 x2 s1 s2 s3 RHS (Quantity)
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 Educational Purposes Only
Step 3. Test for Optimality

• If all the coefficients of the Z-row are


nonnegative (zero or positive), then the
solution given by the tableau is optimal.
• If the tableau is not optimal, go to Step 4.

For Educational Purposes Only


Step 4. Identify entering and leaving
variable
• Entering variable
• In choosing the entering variable, the OPTIMALITY CRITERION is
used. This guarantees that no iteration is inferior to the previous
iteration.
• Choose the non-basic variable (variable not yet in the solution) that will
improve the solution the most.
• Leaving variable
• To identify the leaving variable, the FEASIBILITY CRITERION is used.
This guarantees that if the initial solution is feasible, then all the other
iterations will remain in the feasible region.
• If the initial solution is not feasible, then the algorithm will
attempt to enter the feasible region in the fewest iterations possible.
For Educational Purposes Only
Procedure for choosing the entering and
leaving variables
1.For maximization problem, the entering variable is the decision variable
with the most negative value in the Z row. If two or more variables in
the Z-row have the same most negative coefficient, then either may be
arbitrarily chosen as the entering variable.
2.In choosing the leaving variable, look down the column of the entering
variable and consider only the positive elements (coefficients). Then,
divide the RHS constraint by the corresponding coefficient in the
column (j) of the entering variable (bi/aij). The current basic variable
(xi) with the smallest ratio (may be zero) is selected as the
leaving variable. If two or more variables tie for smallest
ratio, then arbitrarily choose one as the
For Educational leaving
Purposes Only variable.
Example: Product Mix Problem
Entering variable
BV x1 x2 s1 s2 s3 RHS
Pivot column Z – 300 – 250 0 0 0 0
s1 2 1 1 0 0 40
Pivot element s2 1 3 0 1 0 45
Leaving variable s3 1 0 0 0 1 12 Pivot row

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

• It is important to know if only one optimal solution exists or if


there are more than one. Multiple optimal solutions allow the
management greater flexibility in implementing a solution.
• Checking is simple. If the coefficient of a non-basic variable in
the Z-row is zero, then multiple optimal solutions exist. A
coefficient of zero in the z-row means that this variable can
enter the basis, creating another feasible solution, but with the
same value of the objective function.

For Educational Purposes Only


Illustration: Multiple Optimal
Solution
BV x x s s RHS
Maximize Z = 3x1 + 2x2 Z –3
1
–2
2
0
1 2
0 0
s.t. 6x1 + 4x2 < 24 s 1 6 4 1 0 24
s 1 1 0 1 5
x 1 + x2 < 5 Z
2
0 0 1/2 0 12
x 1 2/3 1/6 0 4
x 1 , x2 > 0 s
1
0 1/3 – 1/6 1 1
2
Optimal with Z = 12, x1 = 4, x2 = 0, s1 = 0, s2 = 1.
But look at the x2 column. x2 is non-basic, but it has a zero
coefficient in the z-row. This indicates a multiple optimal solution.
x2 then becomes the new entering variable, and steps 4, 5 and 6 are
repeated.

For Educational Purposes Only


Illustration: Multiple Optimal Solution
BV x1 x2 s1 s2 RHS
Maximize Z = 3x1 + 2x2 Z 0 0 1/2 0 12
s.t. 6x1 + 4x2 < 24 x1 1 2/3 1/6 0 4
x1 + x2 < 5 s2 0 1/3 – 1/6 1 1
x 1 , x2 > 0 Z 0 0 1/2 0 12
x1 1 0 1/2 –2 2
x2 0 1 – 1/2 3 3

Optimal with Z = 12, x1 = 2, x2 = 3, s1 = 0, s2 = 0.


Different x1 and x2, but same Z*
For Educational Purposes Only
Example 1: Simplex Standard Maximization
Standard form:
Maximize Z = 3X1+ 5X2 Maximize Z = 3X1 + 5X2 +0S1 +0S2 +0S3
Subject to: Z - 3X1 - 5X2 – 0S1 - 0S2 - 0S3 = 0
X1  4
Subject to:
2 X2  12
X1 + S1 = 4
3X1 +2X2  18 2X2 + S2 = 12
X1 , X2  0 3X1 + 2X2 + S3 = 18
X1 , X2, S1, S2, S3  0

For Educational Purposes Only


Example 1: Simplex Standard Maximization
BV X1 X2 S1 S2 S3 RHS Ratio
Z -3 -5 0 0 0 0
S1 1 0 1 0 0 4 none
S2 0 2 0 1 0 12 6
S3 3 2 0 0 1 18 9
Z -3 0 0 2.5 0 30
S1 1 0 1 0 0 4 4
X2 0 1 0 0.5 0 6 none
S3 3 0 0 -1 1 6 2
Z 0 0 0 1.5 1 36
S1 0 0 1 1/3 -1/3 2
X2 0 1 0 0.5 0 6
X1 1 0 0 -1/3 1/3 2

This solution is optimal; since there is no negative solution in the


z-row. Basic variables are X1 = 2, X2 = 6 and S1 = 2. Optimal Z =
36. The nonbasic variables are
For S 2 = S3 = 0.
Educational Purposes Only
Example 2: Simplex Standard Maximization
Standard form:
Maximize Z = 13X1+ 11X2 Maximize Z = 13X1 +11X2 +0S1 +0S2 +0S3
Subject to: Z - 13X1 - 11X2 – 0S1 - 0S2 - 0S3 = 0
4X1 + 5X2  1500
5X1 + 3X2  1575 Subject to:
X1 + 2X2  420 4X1 + 5X2 + S1 = 1500
X1 , X2  0 5X1 + 3X2 + S2 = 1575
X1 + 2X2 + S3 = 420
X1 , X2, S1, S2, S3  0

For Educational Purposes Only


Example 2: Simplex Standard Maximization
BV X1 X2 S1 S2 S3 RHS Ratio
Z -13 -11 0 0 0 0
S1 4 5 1 0 0 1500 375
` S2 5 3 0 1 0 1575 315
S3 1 2 0 0 1 420 420
Z 0 -3.2 0 2.6 0 4095
S1 0 2.6 1 -0.8 0 240 92.3
X1 1 0.6 0 0.2 0 315 525
S3 0 1.4 0 -0.2 1 105 75
Z 0 0 0 15/7 16/7 4335
S1 0 0 1 -3/7 -13/7 45
X1 1 0 0 2/7 -3/7 270
X2 0 1 0 -1/7 5/7 75
This solution is optimal; since there is no negative solution in the z-row. Basic
variables are X1 = 270, X2 = 75 and S1 = 45. Optimal Z = 4335. The non-basic variables
are S2 = S3 = 0. For Educational Purposes Only
Example 3: Simplex Standard Maximization
Objective function: Max Z = 120x1 + 80x2 + 100x3 + 60x4
Subject to:
Fluor: 2.5x1 + 9x2 + 1.3x3 + 2.5x4 < 74
Sugar: 2x1 + 0.25x2 + x3 + x4 < 24
Eggs: 2x1 + 5x3 + 2x4 < 36
Baking time: 45x1 + 35x2 + 50x3 + 16x4 < 480
Non-negativity: x1, x2, x3,x4 > 0
Standard form:
Objective function: Max Z = 120x1 + 80x2 + 100x3 + 60x4 + 0S1 + 0S2 + 0S3 + 0S4
Z - 120x1 - 80x2 - 100x3 - 60x4 - 0S1 - 0S2 - 0S3 - 0S4 = 0
Subject to:
Fluor: 2.5x1 + 9x2 + 1.3x3 + 2.5x4 + S1 = 74
Sugar: 2x1 + 0.25x2 + x3 + x4 + S2 = 24
Eggs: 2x1 + 5x3 + 2x4 + S3 = 36
Baking time: 45x1 + 35x2 + 50x3 + 16x4 + S4 = 480

For Educational Purposes Only


Example 3: Simplex Standard Maximization

This solution is optimal; since there is no negative solution in the z-row.


Therefore, x1 = 2.732 X2 = 3.222 X3 = 0 X4 = 15.268 Z = 1,501.686
For Educational Purposes Only
Special Cases of LP Problems: Simplex
• Multiple Optimal Solutions
• No Feasible Solution
• Unbounded Solution
• Two Entering Variables
• Two Leaving Variables
• Unrestricted Decision Variables
• Non-Positive Variables
• Negative RHS
• Redundant ConstraintsFor Educational Purposes Only
Multiple Optimal Solutions
• This has been shown graphically. It occurs when the objective
function is parallel to at least one of the binding constraints.
This is indicated in the tableau when a non-basic variable has
zero coefficient in the Z-row.
• Note that the simplex algorithm automatically stops after
finding one optimal solution. However, for many applications
of LP, there are intangible factors not incorporated into the
model that can be used to make meaningful choices between
solutions that are alternative optimal solutions.
For Educational Purposes Only
No Feasible Solution
In the simplex tableau, this occurs when the “optimal” solution will still contain an
artificial variable and there will no longer be any negative numbers in the Z-row.
Example: Given the “optimal” tableau below
BV x1 x2 s1 s2 s3 s4 A3 A4 RHS
Z 0 0 1/2+M/6 0 M 2/3M 0 M/3 12–M/3
x2 0 1 0 0 0 –1 0 1 2
S2 0 0 –1/6 1 0 1/3 0 –1/3 1/3
x1 1 0 1/6 0 0 2/3 0 –2/3 8/3
A3 0 0 –1/6 0 –1 –2/3 1 2/3 1/3

No leaving variable – tableau is “optimal”.


Z = 12 – M/3, x1 = 8/3, x2 = 2, S1 = 0, S2 = 1/3, S3 = 0, S4 = 0, A3 =
1/3, A4 = 0.
An artificial variable is > 0 at optimality, which means that the
model is infeasible. For Educational Purposes Only
Unbounded Solution
In the simplex tableau, this occurs when there is no outgoing basic
variable (i.e., the outgoing column contains only 0’s and negative numbers
 ratios are infinite or negative). This outcome occurs if the entering BV
could be increased indefinitely without giving negative values to any
current BV. BV x1 x 2 s s 1 a 2RHS 2
Z –2 – 2M 1 – M 0 M 0 – 6M
s1 1 –1 1 0 0 1
Example: a2 2 1 0 –1 1 6
Z 0 –1–3M 2 + 2M M 0 2 – 4M
x1 1 –1 1 0 0 1
a2 0 3 –2 –1 1 4
No leaving variable, Z 0 0 4/3 – 1/3 1/3 + M 10/3
signifying an unbounded x1
x2
1
0
0
1
1/3
– 2/3
– 1/3
– 1/3
1/3
1/3
7/3
4/3
solution
For Educational Purposes Only
Two Entering Variables

If two or more variables in the Z-row have the same most


negative coefficient, then either may be arbitrarily chosen as the
entering variable. This will not affect the final solution.

For Educational Purposes Only


Two Leaving Variables
If two or more variables can leave the basis, i.e., when the two bi/aij tie
for smallest ratio, then arbitrarily choose one as the leaving variable.
The next iteration will have a zero bi for the variable not chosen. This
situation occurs (graphically) when three or more constraints
intersect at the same point.
If the number of positive basic variables is less than the number of
constraints, i.e., one or more bi’s are = 0, then the solution is
degenerate. You should realize, however, that it is possible for a
degenerate iteration to be followed by a non-degenerate solution.

For Educational Purposes Only


For Educational Purposes Only
Non-Positive Variables
Sometimes, a problem arises when some of the decision variables are constrained to
be non-positive. In this case, the problem statement is modified slightly before
employing the simplex. The modification is to replace the non-positive variable, say
x1, throughout the whole problem by its negative value, say x1’ = – x1 where x1’ > 0.
The optimal solution will then either have x1’ = 0 or x1’ = k (therefore x1 = -k).
Example: Maximize Z = x1 + 5x2
s.t. 2x1 + 3x2 < 24
x1 - 2x2 < 5
x1 < 0, x2 > 0
The model becomes: Maximize Z = -x1’ + 5x2
s.t. -2x1’ + 3x2 < 24
-x1’ - 2x2 < 5
For Educational Purposes Only
x1’, x2 > 0
Negative RHS

Recall that the regular simplex algorithm cannot handle


negative right-hand sides. Therefore if one of the bi’s is
negative, then multiply the entire constraint by –1, and
the constraint will be in proper form.
x1 – x2 < –10  –x1 + x2 > 10.
Note the change in direction of < to >.

For Educational Purposes Only


Redundant Constraints
A constraint that does not intersect the feasible area of solutions is called
redundant. It can be removed from the problem without affecting the
optimal solution. Note that a redundant constraint will not affect the
simplex process.
A redundant constraint is easy to detect graphically, but if a problem
cannot be graphed, then only the obviously redundant constraints are
seen.
Example: For 2x1 + x2 < 8 and 2x1 + x2 < 10, depending on whether the
problem is maximization or minimization, one of the inequalities will be
redundant. Note that even redundant constraints are important
when sensitivity analysis is discussed.
For Educational Purposes Only
Solving a Minimization Problem
using Simplex
A minimization problem can easily be transformed into a
maximization problem and converting all its constraints to the
form <. This will not require the use of any artificial variable.
The solution approach is called the dual simplex method.
Example:
Minimize Z = 45x1 + 12x2 => Maximize –Z = –45x1 – 12x2

In standard form, this becomes:


Maximize –Z + 45xFor1 +Educational
12x2 = Purposes
0 Only
The Simplex Method: Minimization

• Big M Method - called the “method of penalty”


because artificial variables in the objective function
are penalized by assigning them very large weights.
• Two-Phase Method – dividing the minimization
problem into two problems and solving each problem
independently.

For Educational Purposes Only


Big M Method: Procedure
1. Modify the constraints so that the RHS of each constraint is nonnegative. This
requires that each constraint with a negative RHS be multiplied through by –1.
2.Convert each constraint to the standard form.
3.Let M denote a very large positive number. If the LP is a minimization problem,
add (for each artificial variable) MAi to the objective function. If the LP is a
maximization problem, add (for each artificial variable) – MAi to the objective
function.
4.Since each artificial variable will be in the starting basis, all artificial variables
must be eliminated from the Z-row before beginning the simplex.
5.Solve the transformed problem by the simplex method.
6.If all artificial variables are equal to zero in a tableau, the solution is
optimal. If any artificial variables are positive in the optimal tableau, the
problem has no feasible solution.
For Educational Purposes Only
Example: Blending Problem
Minimize Z = 45x1 + 12x2
Subject to: x1 + x2 > 300 (brightness specification)
3x1 > 250 (hue specification)
Z, x1, x2 > 0

Transform to Maximization Problem:


Maximize –Z = - 45x1 - 12x2
Subject to: x1 + x2 > 300 (brightness specification)
3x1 > 250 (hue specification)
Z, x1, x2 > 0 For Educational Purposes Only
Blending Problem in Standard Form
Maximize –Z = –45x1 – 12x2 – 0S1 – 0S2 – MA1 – MA2
Subject to: x1 + x2 – S1 + A1 = 300
3x1 - S2 + A2 = 250
Z, x1, x2 > 0
This implies z-row in tableau is: -Z + 45x 1 + 12x2 + 0S1 + 0S2 +
MA1 + MA2.
For the basis, the coefficients of the A’s in the Z-row must be
transformed to 0.
For Educational Purposes Only
Transforming the Z-row
To make the coefficients of the artificial variables in the Z-row equal to zero,
multiply all the constraints containing an artificial variable by -M and then add
these to the original Z-row.
x1 x2 s1 s2 a1 a2
Old z-row 45 12 0 0 M M Z=0
constraint1 *-M –1M –1M +1M 0 –1M 0 –300M

constraint2 *-M –3M 0 0 +1M 0 –1M –250M

New z-row 45–4M 12–M M M 0 0 –550M

For Educational Purposes Only


Initial Simplex Tableau using the
Transformed Z-row (Basis)
The resulting initial tableau is solved using the simplex method procedure
outlined in the maximization example.
BV x1 x2 S1 S2 A1 A2 RHS

–Z 45–4M 12–M M M 0 0 –550M

A1 1 1 –1 0 1 0 300

A2 3 0 0 –1 0 1 250

To determine the entering and leaving variable, simply


substitute M with a very large number.

For Educational Purposes Only


Simplex Solution to Blending Problem
BV x1 x2 S1 S2 A1 A2 RHS
–Z 45–4M 12–M M M 0 0 –550M
a1 1 1 –1 0 1 0 300
a2 3 0 0 –1 0 1 250
–Z 0 12–M M 15–M/3 0 –15+ 4/3M –3750 –650/3M
a1 0 1 –1 1/3 1 – 1/3 650/3
x1 1 0 0 – 1/3 0 1/3 250/3
–Z 0 0 12 11 –12+M –11+M –6350
x2 0 1 –1 1/3 1 – 1/3 650/3
x1 1 0 0 – 1/3 0 1/3 250/3

Optimal with z = 6350, x1 = 250/3, x2 = 650/3, s1 = 0, s2 = 0


For Educational Purposes Only
Example 1: Big M Method
Min Z = 2 X1 + 3 X2 Standard form:
s.t. Min Z = 2X1+ 3X2+ 0S1+ 0S2+ MA1+ MA2
½ X 1 + ¼ X2 ≤ 4 Max –Z = -2X1-3X2-0S1 -0S2 -MA1-MA2
X1 + 3X2  20 -Z + 2X1 + 3X2 + 0S1+ 0S2 + MA1 + MA2=0
X1 + X2 = 10 s.t.
X1 , X 2  0 ½ X 1 + ¼ X 2 + S1 =4
X1 + 3X2 - S2 + A1 = 20
X 1 + X2 + A2 = 10
X1, X2 ,S1, S2, A1, A2  0

Where: M is a very large number


For Educational Purposes Only
Example 1: Big M Method

Transforming the z-row:

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

For Educational Purposes Only


Example 1: Big M Method
BV x1 x2 S1 S2 A1 A2 RHS
–Z 2M-2 4M-3 0 -M 0 0 30M
s1 1/2 1/4 1 0 0 0 4
This solution is optimal, a1 1 3 0 -1 1 0 20
since there is no a2 1 1 0 0 0 1 10
positive value in the –Z 2/3M-1 0 0 1/3M-1 1-4/3M 0 20+10/3M
last row. The optimal s1 5/12 0 1 1/12 -1/12 0 7/3
solution is: x2 1/3 1 0 -1/3 1/3 0 20/3
a2 2/3 0 0 1/3 -1/3 1 10/3
X1 = 5, X2 = 5, S1 = ¼
–Z 0 0 0 -1/2 ½-M 3/2-M -25
A1 = A2 = 0 and Z = 25 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

For Educational Purposes Only


Example 2: Big M Method
Standard Form:
Objective: Minimize Z = 2x1 + 4x2 Min Z = 2X1+ 4X2+ 0S1+ 0S2+ MA1+ MA2
Subject to: Max –Z = -2X1-4X2-0S1 -0S2 -MA1-MA2
x1 + 5x2 < 80 -Z + 2X1 + 4X2 + 0S1+ 0S2 + MA1 + MA2 =0
4x1 + 2x2 > 20 Subject to:
x1 + x2 = 10 x1 + 5x2 + S1 = 80
Z, x1, x2 > 0 4x1 + 2x2 – S2 + A1 = 20
x1 + x2 + A2 = 10
Z, x1, x2 > 0

For Educational Purposes Only


Example 2: Big M Method
Transforming the z-row:

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

For Educational Purposes Only


Example 2: Big M Method
BV X1 X2 S1 S2 A1 A2 RHS
This solution is optimal,
-Z 2-5M 4-3M 0 M 0 0 -30M
since there is no S1 1 5 1 0 0 0 80
positive value in the A1 4 2 0 -1 1 0 20
last row. The optimal A2 1 1 0 0 0 1 10
solution is:
-Z 0 3-0.5M 0 0.5-0.25M -0.5+1.25M 0 -10-5M
X1 = 0, X2 = 10, S1 = 30 S1 0 4.5 1 0.25 -0.25 0 75
A1 = A2 = S2 = 0 and X1 1 0.5 0 -0.25 0.25 0 5
A2 0 0.5 0 0.25 -0.25 1 5
Z = 40
-Z 0 0 0 -1 1+1.25M -6+M -40
S1 0 0 1 -2 2 -9 30
X1 1 0 0 -0.5 0.5 -1 0
X2 0 1 0 0.5 -0.5 2 10
For Educational Purposes Only
Example 3: Big M Method
Standard Form:
•  
Minimize: Max –Z = -3X1-2X2-4X3-6X4-0S1 -0S2 -MA1-MA2
Subject to: -Z+3X1+2X2+4X3+6X4+0S1+0S2+MA1+MA2 =0
Subject to:
where: x1 + 2x2 + x3+ S1 = 80
4x1 + 2x2 – S2 + A1 = 20
Transform to Maximization Problem x1 + x2 + A2 = 10
Maximize: Z, x1, x2 > 0
Subject to:

For Educational Purposes Only


Example 3: Big M Method
• Where M is a very large integer

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

For Educational Purposes Only


Example 3: Big M Method
• Initial Tableau

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

For Educational Purposes Only


Example 3: Big M Method
• Initial Tableau

X1 X2 X3 X4 S1 S2 A1 A2 RHS

Old z 3-3M 2-3M 4-4M 6-8M M M 0 0 -250M

6+8M* 0 0
X4
New z M 0

For Educational Purposes Only


Example 3: Big M Method
• Initial Tableau

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

For Educational Purposes Only


Example 3: Big M Method
• Second Tableau

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

For Educational Purposes Only


Example 3: Big M Method
• Second Tableau

X1 X2 X3 X4 S1 S2 A1 A2 RHS
New X2 0

For Educational Purposes Only


Example 3: Big M Method
• Second Tableau

X1 X2 X3 X4 S1 S2 A1 A2 RHS
Old z 0 M 0
0
0
New z 0
New z 0

For Educational Purposes Only


Example 3: Big M Method
• Third Tableau
X1 X2 X3 X4 S1 S2 A1 A2 RHS
-z 0

X2 1 0

X4 1

*Optimal Solution is reached if there are no more ‘M’ present in the basic variables

For Educational Purposes Only


Example 3: Big M Method
• Third Tableau
X1 X2 X3 X4 S1 S2 A1 A2 RHS

Old X4 1 0 0

X4 1

For Educational Purposes Only


Example 2: Optimal solution
•  X1 = 0
• X2 =
• X3 = 0
• X4 =
• z=

For Educational Purposes Only


Special Cases of LP Problems: Big M Method

• 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.

For Educational Purposes Only


Two Phase Method: Procedure
1.Modify the constraints so that the RHS of each constraint is
nonnegative. This requires that each constraint with a
negative RHS be multiplied through by –1.
2.Convert each inequality constraint to the standard form.
3.For the time being, ignore the original LP’s objective
function. Instead solve an LP whose objective function is
min w’ = (sum of all artificial variables). This is called the
Phase I LP. The act of solving the Phase I LP will force the
artificial variables to be zero.
For Educational Purposes Only
Two Phase Method: Procedure
• If the optimal value of w’ is greater than zero. In this case, the original LP has
no feasible solution.
• If the optimal value of w’ is equal to zero, and no artificial variables are in the
optimal Phase I basis, drop all columns in the optimal Phase I tableau that
correspond to the artificial variables. Combine the original objective function
with the constraints from the optimal Phase I tableau. This yields the Phase II
LP. The optimal solution to the Phase II LP is the optimal solution to the
original LP.
• If the optimal value of w’ is equal to zero and at least one artificial variable is
in the optimal Phase I basis, find the optimal solution to the original LP by
dropping from the optimal Phase I tableau all nonbasic artificial variables
and any variable from the original problem which has a negative
coefficient in the z-row of the optimal Phase I tableau.
For Educational Purposes Only
Blending Problem: Two Phase Method
Maximize –Z = –45x1 – 12x2 – 0S1 – 0S2 – MA1 – MA2
Subject to: x1 + x2 – S1 + A1 = 300
3x1 - S2 + A2 = 250
Z, x1, x2 > 0

Two Phase Method:


Min w’ = A1 + A2  Max –w’ = – A1 – A2
• –w’ + A1+ A2 = 0

As in the Big M method, the coefficients of the A’s in the Z-row


must be transformed to 0. For Educational Purposes Only
Blending Problem: Two Phase Method
Transforming the w’ Row
To change the coefficients of the A’s to zero, multiply all the constraints
with an artificial variable by -1 and add these to the w’ row. This revise
w’ row is used for the simplex method for Phase 1.

Old –w’ row 0x1 0x2 0s1 0s2 1A1 1A2 0


Constraint 1 * (– 1) –1 –1 1 0 –1 0 –300
Constraint 2 * (– 1) –3 0 0 1 0 –1 –250
New –w’-row –4 –1 1 1 0 0 –550

For Educational Purposes Only


Blending Problem: Two Phase Method
Simplex Solution
BV x1 x2 S1 S2 A1 A2 RHS
–w’ –4 –1 1 1 0 0 –550
A1 1 1 –1 0 1 0 300
A2 3 0 0 –1 0 1 250
–w’ 0 –1 1 –1/3 0 4/3 –650/3
A1 0 1 – 1 1/3 1 – 1/3 650/3
X1 1 0 0 – 1/3 0 1/3 250/3
–w’ 0 0 0 0 1 1 0
x2 0 1 – 1 1/3 1 – 1/3 650/3
x1 1 0 0 – 1/3 0 1/3 250/3

For Educational Purposes Only


Blending Problem: Two Phase Method
Phase 2
1. Using the optimal Phase 1 tableau, remove the artificial variables.
2.Replace the w’ row with the transformed Z-row, derived as follows, to form
the Phase 2 basis.
• Multiply the respective rows of the basic variables by the negative value of
their coefficient in the Z-row,
• Add these revised rows to the original Z-row.
• The result is the new Z row.
BV x1 x2 S1 S2 RHS
old – Z 45 12 0 0 0
x2 * (–12) 0 –12 12 –4 –2600
x1* (–45) –45 0 0 +15 –3750
new –Z 0 0 12 11 –6350

3. If the resulting Phase 2 basis is optimal, then the problem is solved.


For Educational Purposes Only
Blending Problem: Two Phase Method
Phase 2 Initial Tableau: Optimal with x1 = 250/3, x2 = 650/3, and z = 6350.

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

For Educational Purposes Only


Example: Two Phase Method
Minimize z = 2x1 + 3x2
Subject to: 1/2x1 + 1/4x2 ≤ 4
x1 + 3x2 ≥ 20
x1 + x2 = 10
x1, x2 ≥ 0
Standard form:
Max –z = -2x1 – 3x2  -z + 2x1 + 3x2 = 0
Subject to: 1/2 x1 + 1/4x2 + s1 =4
x1 + 3x2 -s2 + a1 = 20
x1 + x2 For Educational Purposes
+a2 =Only10
Example: Two Phase Method
Phase 1:
Min w’ = a1 + a2  -w’ + a1 + a2 = 0
Subject to: 1/2 x1 + 1/4x2 + s1 =4
x1 + 3x2 -s2 + a1 = 20
x1 + x 2 +a2 = 10
To eliminate a1 and a2 from w’ row,
x1 x2 s1 s2 a1 a2 RHS
-w’ row: 0 0 0 0 1 1 0
(-1*Constraint #2: ) -1 -3 0 1 -1 0 -20
+(-1*Constraint #3: ) -1 -1 0 0 0 -1 -10
New -w’ row : -2 -4 0 1 0 0 -30

For Educational Purposes Only


Example: Two Phase Method

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

For Educational Purposes Only


Example: Two Phase Method
Since x1 and x2 are both in the optimal Phase I basis, they must be
eliminated from the Phase 2 z row.

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

This is optimal. Therefore, the optimal solution is


z = 25, x1 = 5, x2 = 5, s1 = 1/4, and s2 = 0.
For Educational Purposes Only
Reference
Hillier, F. & Lieberman, G. (2005). Introduction to operations research. New
York, NY: McGraw-Hill Higher Education.

Taha, H. (2007). Operations research: An introduction. Upper Saddle River, NJ:


Pearson Prentice Hall.

For Educational Purposes Only

You might also like