Simplex Method (Chapter 4) : MSCI 603 Section 1 Instructor: Mehrdad Pirnia
Simplex Method (Chapter 4) : MSCI 603 Section 1 Instructor: Mehrdad Pirnia
(Chapter 4)
MSCI 603 Section 1
Instructor: Mehrdad Pirnia
Introduction
Last class, we solved a two-variable problem graphically
It had a unique (one) solution
What if there is more than one solution? No solution?
MSCI 603 2
How Simplex Works
Recall: extreme point (corner-point feasible) solutions
MSCI 603 3
How Simplex Works
9
Example:
max z 3 x1 5 x2 8
s.t. x1 4 7
3 x1 2 x2 18 6
2 x2 12 5
x1 , x2 0 4
1 2 3 4 5 6
MSCI 603 4
Simplex Solution Concepts
1. Focus solely on corner-point feasible (CPF) solutions
2. Simplex is iterative
Stop
Yes
Is Current
No
Initialization Solution Iteration
Optimal?
Example:
Find the solution to the following system of equations
x1 2 x2 5 Note: We are assuming that all
2 x1 x2 0 variables must be non-negative
MSCI 603 6
Note: We are assuming that all
More examples variables must be non-negative
Unique Solution: x1 2 x2 x3 4
2 x1 x2 3x3 3
x1 x2 x3 3
Infeasible: x1 2 x2 x3 4
2 x1 x2 2 x3 1
2 x1 3x2 3x3 2
MSCI 603 7
Standard Form of an LP
Constraints must be written as equalities
Add slack variable for each ≤ constraint
MSCI 603 8
Example 1: Simplex Method
Solve using the simplex method.
First, introduce the variable, z, and re-write the objective
function
max z
s.t. z 3 x1 5 x2 0 Row 0
x1 s1 4 Row 1
3 x1 2 x2 s2 18 Row 2
2 x2 s3 12 Row 3
x1 , x2 , s1 , s2 , s3 0
MSCI 603 9
Basic and non-basic variables
When we find a solution to a system of equations, we are
defining a basis
E.g. (x1, x2, x3) = (1, 0, 4)
2. Optimality Test
Current basic feasible solution is optimal if and only if each
reduced cost (coefficient in row 0) is non-negative.
Otherwise, go to Step 3.
3. Iteration
Swap a basic variable for a non-basic variable and calculate
the new basic feasible solution (see next slide for details)
MSCI 603 11
Simplex Method (continued)
3. Iteration (detailed)
a) Determine the entering variable
The non-basic variable with the most negative reduced cost (objective
function coefficient) is the pivot column
b) Determine the leaving variable
Perform the minimum ratio test using only the positive, non-zero
coefficients in the pivot column
The row with the minimum ratio is the leaving variable
c) Calculate the new basic feasible solution
The pivot column is now an “identity” column
Perform EROs to update the simplex tableau
MSCI 603 13
Min Problems
Method 1(Recommended):
transform to max problem
multiply objective function by -1
MSCI 603 14
Min Problem
Method 2:
Choose the variable with the
most positive coefficient in row zero
MSCI 603 15
Alternate Solutions
Happens when a non-basic variable has a coefficient of zero in
row zero.
Consider that non-basic variable as an entering basic variable and go through
iterations
MSCI 603 16
Unbounded LP
Example:
17
Unbounded LP
18
Degeneracy
Nondegenerate LP
Each basic feasible solution has basic variables that are all > 0
Optimal solution will be found in a finite number of iterations
Objective function will improve with each iteration
max z 2 x1 3 x2 x3 12 x4
s.t. 2 x1 9 x2 x3 9 x4 0
1 x x 1 x 2x 0
3 1 2 3 3 4
x1 , x2 , x3 , x4 0
20
Unrestricted (urs) variables
For each urs variable 𝑥𝑖 define two new variables 𝑥𝑖′ and 𝑥𝑖′′
21
Example: URS variables
22
≥ and = constraints
min z 0.4 x1 0.5 x2
s.t. 0.3 x1 0.1x2 2.7
No initial basis because
0.5 x1 0.5 x2 6 of coefficient on e3
0.6 x1 0.4 x2 6
x1 , x2 0
max - z 0.4 x1 - 0.5 x2
Convert to
standard form s.t. 0.3 x1 0.1x2 s1 2 .7
0.5 x1 0.5 x2 6
10 x2 e3 6
x1 , x2 , s1 , e3 0
23
Add artificial variables
Find an initial bfs by introducing artificial variables, ai, to
the “problematic” constraints
24
Big M Method
1. Modify constraints so that all RHS are non-negative
a) Identify all ≥ and = constraints
25
Infeasibility
Detected when artificial variables gain value in optimal
solution.
26
Next Class
Sensitivity analysis
Graphical Method
Simplex
MSCI 603 27