0% found this document useful (0 votes)
54 views51 pages

Lesson 4 Opreation Reseach

The document describes the simplex method for solving linear programming problems. It begins by discussing the geometric concepts behind the simplex method and how it works iteratively. It then outlines the steps to set up and solve a linear programming problem using the simplex method, including [1] converting the problem to an augmented form, [2] finding an initial basic feasible solution, [3] performing an optimality test, and [4] iterating if necessary by changing basis variables. The example problem of the Wyndor Glass Company is then solved step-by-step using the simplex method.

Uploaded by

Susan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views51 pages

Lesson 4 Opreation Reseach

The document describes the simplex method for solving linear programming problems. It begins by discussing the geometric concepts behind the simplex method and how it works iteratively. It then outlines the steps to set up and solve a linear programming problem using the simplex method, including [1] converting the problem to an augmented form, [2] finding an initial basic feasible solution, [3] performing an optimality test, and [4] iterating if necessary by changing basis variables. The example problem of the Wyndor Glass Company is then solved step-by-step using the simplex method.

Uploaded by

Susan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Operations Research

Lesson 4: Simplex Method


Objectives
After Studying this lesson, you should be able to:

1. Understand the basic and geometric concept of


simplex method
2. Identify the adjacent solutions of a CPF solution
3. Rewrite a LP model into an augmented form
4. Explain the simplex calculations
5. Describe various solutions of Simplex Method
6. Solve LPs with two variables using the simplex
method
The Simplex Method Geometrically
The simplex method is an algebraic procedure.
However, its underlying concepts are geometric.
Therefore, before going into algebraic details, we
focus first on the big picture from a geometric
viewpoint.
Recall the Wyndor Glass Co. problem, we found
that :
• The CPF solutions are: (0, 0), (0, 6), (2, 6),
(4, 3), and (4, 0).
• The optimal solution is (2,6).
The Simplex Method Geometrically
Note here that certain pairs of the CPF solutions share a
constraint boundary, and other pairs do not. Moreover,
some corner-points are feasible, and some are not.
Maximize 𝑍 = 3𝑥1 + 5𝑥2
Adjacent CPF solutions
Definition: For any LP with n decision variables, two
CPF solutions are adjacent to each other if they share n -
1 constraint boundaries. The two adjacent CPF solutions
are connected by a line segment that lies on these same
shared constraint boundaries.
• In this example, since n =2, two of its CPF solutions
are adjacent if they share one constraint boundary.
• For example, (0, 0) and (0, 6) are adjacent because
they share the 𝑥1 = 0 constraint boundary.
Optimality Test

Optimality test: For any linear programming


problem that possesses at least one optimal
solution; If a CPF solution has no adjacent CPF
solutions that are better (as measured by Z), then
it must be an optimal solution.
Solution concept
The simplex method is an iterative algorithm (a
systematic solution procedure that keeps repeating a
fixed series of steps, called an iteration, until a desired
result has been obtained) with the following structure.
Questions

• What are the adjacent CPF solutions to the point


(0,0)?
• Is the point (0,0) optimal?
• From the point (0,0), in which direction should
you move towards optimality? Why?
• What are the adjacent CPF solutions to the point
(0,6)? Is it optimal?
• What are the adjacent CPF solutions to the point
(2,6)? Is it optimal?
The Simplex Method Geometrically
Steps of Setting up the Simplex method I
The first step is to convert the original form of the
model into an augmented form which satisfies:
– All inequality constraints should have a positive right-hand
side (if not multiply by (-1)) (be careful with the signs ≥ , ≤)
– All decision variables are non-negative
– All inequality constraints are converted to equality
constraints (i.e. equations)
• This conversion is accomplished by introducing slack
variables and surplus variables
Slack and Surplus Variables Definition
• To convert a (≤)-inequality constraint to an equation, a non-
negative slack variable is added to the left-hand side of the
constraint; it could be thought of as a variable that measures
the unused or slack amount of the resource. For example, by
introducing the slack variable 𝑥2 ≥ 0, the inequality constraint
𝑥1 ≤ 4 is converted to the equation 𝑥1 + 𝑥2 = 4.

• To convert a (≥)-inequality constraint to an equation, a non-


negative surplus variable is subtracted from the left-hand
side of the constraint; it could be thought of as the amount by
which the left-hand side exceeds the minimum limit. For
example, by introducing the surplus variable 𝑥2 ≥ 0, the
inequality constraint 𝑥1 ≥ 20 is converted to the equation
𝑥1 − 𝑥2 = 20.
Exercise
To the constraints in the Wyndor problem,
introduce slack or surplus variable as needed and
write an equivalent pair of constraints.

𝑥1 ≤4 𝑥1 + 𝑥3 =4 , 𝑥3 ≥0

2𝑥2 ≤12 2𝑥2 + 𝑥4 =12 , 𝑥4 ≥0

3𝑥1 + 2𝑥2 ≤ 18 3𝑥1 + 2𝑥2 + 𝑥5 = 18, 𝑥5 ≥0


Definitions
• An augmented solution is a solution for the decision
variables that has been augmented by the corresponding
values of the slack variables.
E.g. in the Wyndor Glass Co. problem, augmenting (3, 2)
yields (3, 2, 1, 8, 5)
• A basic solution is an augmented corner-point solution.
E.g. augmenting (4,6) yields (4,6,0,0,-6) (infeasible)
• A basic feasible (BF) solution is an augmented CPF
solution.
• E.g. augmenting (0,6) yields (0, 6, 4, 0, 6)
Steps of Setting up the Simplex method II

The second step is to find the initial BF solution.


• Consider a LP problem in the augmented form
that contains n variables and m constraints
(assume n≥m).
Finding the Initial BF solution
A basic solution has the following properties:
1. Each variable is designated as either a basic
variable or a nonbasic variable.
2. The number of basic variables equals m; the
number of functional constraints (now
equations). Therefore, the number of nonbasic
variables equals (n-m); the total number of
variables minus the number of functional
constraints.
3. The nonbasic variables are set equal to zero.
Finding the Initial BF solution (cont..)
4. After setting n-m variables (NBV) to 0, the
values of the basic variables are obtained by
solving for the remaining m variables (BV)
𝑛 𝑛 𝑛!
Number of possible choices
𝑚
= 𝑛−𝑚
=
𝑚! 𝑛−𝑚 !

If the basic variables satisfy the nonnegativity


constraints, the basic solution is a BF solution.
Finding the Initial BF solution (cont..)
Hint: One option is to select the decision variables
to be NBV (i.e. set to 0) to reduce the work required
to solve for the basic variables.

For example, in the Wyndor Glass Co. problem, by


choosing 𝑥1 and 𝑥2 to be the NBVs (i.e. =0) we can
easily find the corresponding BF solution
(0,0,4,12,18) as long as all the BVs are ≥0; this
could be our initial BF.
Steps of Setting up the Simplex method III

The next step is to perform the optimality test to


the initial BF:
If the initial BF is optimal, the algorithm stop
(hence, the initial BF solution is the optimal
solution of the model).
If not, the algorithm keep searching for the optimal
solution via going through a fixed series of steps
(i.e. iteration) and keep repeating them until a
desired result has been obtained.
Example 1
Use the Simplex method to solve Wyndor Co. problem.
1. Conversion to the augmented form:
By introducing slack variables, the augmented form of the Glass
company model represent a system of m=3 equations and n=5 non-
negative variables.
Example 1 (cont..)
2. Initialization step:
• Select the decision variables to be the initial nonbasic variables
(set equal to zero) and the slack variables to be the initial basic
variables.

• This selection yields the initial simplex tableau shown in column


(b) of Table 1, so the initial BF solution is (0, 0, 4, 12, 18).
Example 1 (cont..)
3. Represent the problem in the tabular form:

Table 1. Initial system of equations for the Wyndor Glass Co. problem
Example 1 (cont..)
4. Optimality Test Step:
• The current BF solution is optimal if and only if every
coefficient in row 0 is nonnegative (≥ 0). If it is, stop; otherwise,
go to an iteration to obtain the next BF solution, which involves
changing one nonbasic variable to a basic variable (step 1 below)
and vice versa (step 2 below) and then solving for the new
solution (step 3 below).

Intuitively: The objective function is 𝑧 = 3𝑥1 + 5𝑥2 , so 𝑧 = 0 for the initial


BF solution. The coefficient of each nonbasic variable (𝑥1 , 𝑥2 ) (i.e. 3 and 5
in Z) gives the rate of improvement in Z if that variable were to be increased.
Because these rates of improvement are positive (and we are dealing with a
maximization problem), we conclude that (0, 0, 4, 12, 18) is not optimal
Example 1 (cont..)
5. Iteration 1 Step 1: Determine the entering basic
variable
• Select the variable (a nonbasic variable) with the negative
coefficient having the largest absolute value (i.e., the “most
negative” coefficient) in Eq. (0).
• Put a box around the column below this coefficient and call this
the pivot column.
Here, the most negative coefficient is -5 for 𝑥2 (5 > 3), so 𝑥2 is to
be changed to a basic variable. (This change is indicated in Table 2
by the box around the 𝑥2 column below -5.)
Example 1 (cont..)
5. Iteration 1 Step 1: Determine the entering basic
variable

Table 2.the pivot column


• Increasing this nonbasic variable from zero will convert it to a
basic variable for the next BF solution. Therefore, we call 𝑥2 here
the entering basic variable for the current iteration.
Example 1 (cont..)
6. Iteration 1 Step 2: Determine the leaving basic
variable
• Apply the Minimum Ratio Test as follows:
1. Pick out each coefficient in the pivot column that is strictly
positive (>0).
2. Divide each of these coefficients into the right-side entry for the
same row.
3. Identify the row that has the smallest of these ratios.
4. The basic variable for that row is the leaving basic variable (see
Table 3).
5. Put a box around this row and call it the pivot row. Also call
the number that is in both boxes the pivot number (see Table
4).
Example 1 (cont..)
6. Iteration 1 Step 2: Determine the leaving basic
variable

Table 3. The minimum ratio test to determine the first leaving basic variable
for the Wyndor Glass Co. problem
Example 1 (cont..)
6. Iteration 1 Step 2: Determine the leaving basic
variable

TABLE 4. Pivot row and pivot number


Example 1 (cont..)
6. Iteration 1 Step 2: Determine the leaving basic
variable
• From Table 3, we can conclude that 𝑥2 can be increased just to
6, at which point 𝑥4 has dropped to 0.
• Decreasing this basic variable 𝑥4 to zero will convert it to a
nonbasic variable for the next BF solution (the leaving basic
variable for the current iteration), so replace it by the entering
basic variable from step 1 (𝑥2 in this example) in the basic
variable column of the next simplex tableau (next step).
Example 1 (cont..)
7. Iteration 1 Step 3: Solving for the New BF Solution

1. Divide the pivot row by the pivot number. Use this new pivot
row in steps 2 and 3 below (see Table 5).
2. For each other row (including row 0) that has a negative
coefficient in the pivot column, add to this row the product of
the absolute value of this coefficient and the new pivot row.
3. For each other row that has a positive coefficient in the pivot
column, subtract from this row the product of this coefficient
and the new pivot row (see Table 6).
Example 1 (cont..)
7. Iteration 1 Step 3: Solving for the New BF Solution
by using elementary row operations

Table 5. Simplex tableaux for the Wyndor Glass Co. problem after the first
pivot row is divided by the first pivot number
Example 1 (cont..)
7. Iteration 1 Step 3: Solving for the New BF Solution
by using elementary row operations

Table 6 First two simplex tableaux for the Wyndor Glass Co. problem
Example 1 (cont..)
8. Optimality test:
• Since the new row 0 still has a negative coefficient (-3 for 𝑥1 ),
the solution is not optimal, and so at least one more iteration is
needed.
Example 1 (cont..)
9. Iteration 2

The second iteration starts anew from the second tableau of Table 6
to find the next BF solution. Following the instructions for steps 1
and 2, we find 𝑥1 as the entering basic variable and 𝑥5 as the
leaving basic variable, as shown in Table 7
Example 1 (cont..)
9. Iteration 2

Table 7 Steps 1 and 2 of iteration 2 for the Wyndor Glass Co. problem

• For step 3, we start by dividing the pivot row (row 3) in Table


7 by the pivot number (3). Table 8 results from completing
step 3, the new BF solution is (2, 6, 2, 0, 0), with Z = 36.
Example 1 (cont..)
9. Iteration 2

Table 8 Complete set of simplex tableaux for the Wyndor Glass Co. problem
Example 1 (cont..)

10. Optimality test

• Going to the optimality test, we find that this solution is


optimal because none of the coefficients in row 0 is negative,
so the algorithm is finished..
Questions to think about
• Compare the optimal solution of the Wyndor Glass Co.
problem using the graphical method, the geometric
concept of the simplex method (before slack variables
are introduced), and the algebraic form of the simplex
method.
• What should you do if two or more nonbasic variables
are tied for having the largest negative coefficient (in
absolute terms) (e.g. if the objective function in the last
example were changed to 𝑧 = 3𝑥1 + 3𝑥2 . How should
this tie be broken?
Questions to think about
• What if two or more basic variables tie for being the
leaving basic variable in step 2 of an iteration. Does it
matter which one is chosen?

• What if the objective is to minimize Z?


Example 2
Q1: Convert the following model to the augmented form.
Product
plant Chair (x1) Table(x2) Peak capacity (hours)'
Chopping wood 2h 4h 100h
Wood assembly 3h 2h 90h
Profit per unit 10$ 15$

Augmented Form

Max Z=10x1+15x2 Z - 10x1 - 15x2 =0


S.T.
2x1+4x2<=100 2x1 + 4x2 + x3 =100

3x1+2x2<=90 3x1+2x2 +x4 =90

x1, x2 >=0 x1, x2 >=0


Example 2 (cont..)
Q2: Represent the problem in the tabular form
and determine the initial BF solution.
Z- 10x1 - 15x2 =0
S.t.
2x1 + 4x2 + X3 =100
3x1+ 2x2 +X4 =90

BV Z X1 X2 X3 X4 RHS
Z 1 -10 -15 0 0 0
X3 0 2 4 1 0 100
X4 0 3 2 0 1 90
Here the BV are X3 and X4 and the NBV are X1 and X2 (NBV=0),
thus, the initial BF solution is (0,0,100,90).
Example 2 (cont..)

Q3: Determine the entering basic variables


Entering BV

BV Z X1 X2 X3 X4 RHS ratio
Z 1 -10 -15 0 0 0
X3 0 2 4 1 0 100 𝟏𝟎𝟎
=25
𝟒
X4 0 3 2 0 1 90 𝟗𝟎
=45
𝟐
Example 2 (cont..)

Q4: Apply the minimum ratio test and determine the leaving
basic variable.

Entering BV

BV Z X1 X2 X3 X4 RHS ratio
Z 1 -10 -15 0 0 0 leaving

X3 0 2 4 1 0 100 𝟏𝟎𝟎
=25
𝟒
X4 0 3 2 0 1 90 𝟗𝟎
=45
𝟐
Example 2 (cont..)

Q5: Determine the pivot column, pivot row, and pivot number
pivot Entering

BV Z X1 X2 X3 X4 RHS ratio
Z 1 -10 -15 0 0 0 leaving

X3 0 2 4 1 0 100 𝟏𝟎𝟎
=25
𝟒
X4 0 3 2 0 1 90 𝟗𝟎
=45
𝟐
Iteration 1: Solving for the New BF Solution by using elementary
row operations
Entering
pivot

BV Z X1 X2 X3 X4 RHS ratio
Z 1 -10 -15 0 0 0 leaving

X3 0 2 4 1 0 100 𝟏𝟎𝟎
=25
𝟒
X4 0 3 2 0 1 90 𝟗𝟎
=45
𝟐

old X3 0 2 4 1 0 100
𝑶𝒍𝒅
new X2 0 1/2 1 1/4 0 25 𝒑𝒊𝒗𝒐𝒕
=new

BV Z X1 X2 X3 X4 RHS

X2 0 1/2 1 1/4 0 25

New Table
Iteration 1: Solving for the New BF Solution by using elementary
row operations
BV Z X1 X2 X3 X4 RHS ratio
Z 1 -10 -15 0 0 0
X3 0 2 4 1 0 100 𝟏𝟎𝟎
=25
𝟒
X4 0 3 2 0 1 90 𝟗𝟎
=45
𝟐

old Z 1 -10 -15 0 0 0 old-(new*-15)


-
new X2 0 1/2 1 1/4 0 25 * -15 =

BV Z X1 X2 X3 X4 RHS
Z 1 -2.5 0 15/4 0 375
X2 0 1/2 1 1/4 0 25
New Table
Iteration 1: Solving for the New BF Solution by using elementary
row operations
BV Z X1 X2 X3 X4 RHS ratio
Z 1 -10 -15 0 0 0
X3 0 2 4 1 0 100 𝟏𝟎𝟎
=25
𝟒
X4 0 3 2 0 1 90 𝟗𝟎
=45
𝟐

old X4 0 3 2 0 1 90 old-(new*-15)
-
new X2 0 1/2 1 1/4 0 25 * 2 =

BV Z X1 X2 X3 X4 RHS
First
Z 1 -2.5 0 15/4 0 375 Iteration
Done
X2 0 1/2 1 1/4 0 25
New Table
X4 0 2 0 -1/2 1 40
Example 2 (cont..)

Iteration 2: Determine the Entering, leaving basic variables and the


pivot
pivot Entering BV

BV Z X1 X2 X3 X4 RHS ratio
Z 1 -2.5 0 15/4 0 375
X2 0 1/2 1 1/4 0 25 𝟐𝟓
=50
𝟎.𝟓
leaving
X4 0 2 0 -1/2 1 40 𝟒𝟎
=20
𝟐
Iteration 2: Solving for the New BF Solution by using elementary
row operations
pivot Entering

BV Z X1 X2 X3 X4 RHS ratio
Z 1 -2.5 0 15/4 0 375
X2 0 1/2 1 1/4 0 25 𝟏𝟎𝟎
=25
𝟒 leaving

X4 0 2 0 -1/2 1 40 𝟗𝟎
=45
𝟐

old X4 0 2 0 -1/2 1 40
𝑶𝒍𝒅
new X1 0 1 0 -1/4 1/2 20 𝒑𝒊𝒗𝒐𝒕
=new

BV Z X1 X2 X3 X4 RHS

X1 0 1 0 -1/4 1/2 20
Iteration 2: Solving for the New BF Solution by using elementary
row operations
BV Z X1 X2 X3 X4 RHS ratio
Z 1 -2.5 0 15/4 0 375
X2 0 1/2 1 1/4 0 25 𝟏𝟎𝟎
=25
𝟒
X4 0 2 0 -1/2 1 40 𝟗𝟎
=45
𝟐

old Z 1 -2.5 0 15/4 0 375 old-(new*-2.5)


-
new X1 0 1 0 -1/4 1/2 20 * -2.5 =

BV Z X1 X2 X3 X4 RHS
Z 1 0 0 4.375 1.25 425

New Table
X1 0 1 0 -1/4 1/2 20
Iteration 2: Solving for the New BF Solution by using elementary
row operations
BV Z X1 X2 X3 X4 RHS ratio
Z 1 -2.5 0 15/4 0 375
X2 0 1/2 1 1/4 0 25 𝟏𝟎𝟎
=25
𝟒
X4 0 2 0 -1/2 1 40 𝟗𝟎
=45
𝟐

old X2 0 1/2 1 1/4 0 25 old-(new*0.5)


-
new X1 0 1 0 -1/4 1/2 20 * 0.5 =

BV Z X1 X2 X3 X4 RHS second
Z 1 0 0 4.375 1.25 425 Iteration
Done
X2 0 0 1 3/8 -1/4 15
New Table
X1 0 1 0 -1/4 1/2 20
Before the next lecture

• Refer to Chapter 4 in your textbook.


• Solve the exercises in the worksheet.
• Watch the videos on the blackboard.

You might also like