0% found this document useful (0 votes)
6 views

Part 2 The Simplex Algorithm

The document discusses the Simplex Algorithm, a method for solving linear programming problems with multiple variables. It outlines the steps to convert a linear program into standard form, develop initial and subsequent tableaus, and identify entering and leaving variables to reach an optimal solution. Additionally, it introduces the Big M method for handling artificial variables in minimization problems.

Uploaded by

tesfamariam035
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Part 2 The Simplex Algorithm

The document discusses the Simplex Algorithm, a method for solving linear programming problems with multiple variables. It outlines the steps to convert a linear program into standard form, develop initial and subsequent tableaus, and identify entering and leaving variables to reach an optimal solution. Additionally, it introduces the Big M method for handling artificial variables in minimization problems.

Uploaded by

tesfamariam035
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 48

THE SIMPLEX ALGORITHM

Zemen Post Graduate


College
MBA Program: REGULAR
MAY,2022

1
The Simplex Algorithm
We saw how to solve containing two variables of linear
programming
problems graphically.
Unfortunately, most real life LPs have many variables, so a simp
method
sWe
needed tomost
devote solveofLPs with
this moreto
chapter than two variables.
a discussion of the simplex algorithm
which is used to solve even very large LPs.

2
How to Solve an LP to Standard Form
he simplex procedure for a maximization problem with all  constraints consists of the follo
teps.
Step 1: Write the LPM in a standard form: when all of the constraints are written as equalitie
he linear program is said to be in standard form.
An LP in this form is said to be in standard form.
Taking the microcomputer problem its standard form is as follows:
Z max = 60X1 + 50X2 Z max = 60X1 + 50X2 + 0S1 + S2 + 0S3
S. t : 4X1 + 10X2 100 S. t: 4X1 + 10X2 + S1 = 100
2X1 + X2  22 2X1 + X2 + S2 = 22
3X1 + 3X2 39 3X1 + 3X2 + S3 = 39

X1, X2 ≥ 0 X1, X2, S1, S2, S3 ≥ 0


3
Step 2: Develop the initial tableau: the initial tableau always
represents the “Do
Nothing” strategy, so that the decision variables are initially non-
basic.
List the
There variables
should be oneacross the
row in top
the of the
body table
of the andfor
table write the
each objective List
constraint.
function
the slack

 Incoefficient
variables
the Cj theofbasis
each
in column, variable
column,
enter justper
the one above
objectiverow.it.
function coefficient of zero for
each slack
variable. (Cj - coefficient of variable j in the objective function)
 Compute values for row Zj
 Computer values for Cj - Zj.
4
Step 3: Develop subsequent tableaus:
3.1 Identify the entering variable - a variable that has a largest positi
value is the Cj - Zj row.
.2 Identify the leaving variable - using the constraint coefficients or substitution
he entering variable column divide each one into the corresponding quantity valu
owever, do not divide by a zero or negative value. The smallest non-negative ra
esults indicate which variable will leave the solution.
tep 4: Find unique vectors for the new basic variable using row operations on th
lement.
Step 5: Compute the Cj - Zj raw
Step 6: If all Cj - Zj values are zeros and negatives you have reached optimali
Step 7: If this is not the case (step 6), rehear step 2 to 5 until you get optimal so
5
EXERCISE 1
Leather limited manufactures two types of belts: the deluxe model and the regular model.

type requires 1 square yard of leather. A regular belt requires 1 hour of skilled labor, and a
deluxe belt requires 2 hours. Each week, 40 square yard of leather and 60 hours of skill
labor are available. Each regular belt contributes $3 to profit and each deluxe belt, $4. if
define The appropriate LP is
Max z = 4X1 + 3X2
X1 = number of deluxe belts produced weekly
S. t. X1 + X2 ≤ 40 (Leather constrain
2X1 + X2 ≤ 60 (Labor constraint)
X2 = number of regular belts produced weekly
X1, X2 ≥ 0

equired: change the above LP into standard form.


6
EXAMPLE 1
Taking the microcomputer problem its standard form is as follows:
Z max = 60X1 + 50X2 Z max = 60X1 + 50X2 + 0S1 + S2 + 0S3
S. t :4X1 + 10X2  100 S. t.:4X1 + 10X2 + S1 = 100
2X1 + X2  22 2X1 + X2 + S2 = 22
3X1 + 3X2  39 3X1 + 3X2 + S3 = 39
X1, X2 ≥ 0 X1, X2, S1, S2, S3 ≥ 0

7
Sol/n 60 50 0 0 0
basis CjX1 X2 S1 S2 S3 RHSV Ratio
S1 0 4 10 1 0 0 100 25

S2 0 2* 1 0 1 0 22 11

S3 0 3 3 0 0 1 39 13

Zj 0 0 0 0 0 0
Cj - Zj 60 50 0 0 0

X1 Entering variable 2* Pivot element S2 Leaving variable


8
SECOND TABLEAU
Sol/n 60 50 0 0 0
basis CjX1 X2 S1 S2 S3 RHSV Ratio
S1 0 0 8 1 -2 0 56 7

X1 60 1 ½ 0 ½ 0 11 22

S3 0 0 3/2 0 -3/2 1 6 4

Zj 60 30 0 30 0 660
Cj - Zj 0 20 0 -30 0

9
THIRD TABLEAU
Sol/n 60 50 0 0 0
basis CjX1 X2 S1 S2 S3 RHSV X1 = 9 UNITS
X2 = 4 UNITS
S1 0 0 1 6 -16/3 24
S1 = 24
0 HOURS
X1 1 0 0 1 -1/3 9 MAX Z = 740
60 BIRR
X2 0 1 0 -1 2/3 4
50
Zj 60 50 0 10 40/3 740
Cj - Zj 0 0 0 -10 -40/3

“A simplex solution in a max. problem is optimal if the Cj - Zj row consists


entirely of zeros and negative numbers”.
10
EXAMPLE 2
A manufacturer of lawn and garden equipment makes two basic type
lawn mowers: a push-type and a self-propelled model. The push-typ
equires 9 minutes to assemble and 2 minutes to package; the self-prop
mower requires 12 minutes to assemble and 6 minutes to package. Each
has an engine.
The company has 12 hours of assembly time available, 75 engines, and
hours of packing time. Profits are Birr 70 for the self-propelled models a
Birr 45 for the push-type mower per unit.
Required:
Determine how many mower of each type to make in order to maximiz
total profit (use the simplex procedure).
11
… CONT’D
Z max = 45X1 + 70X2 The standard form:
S. t : 9X1 + 12X2  720 Z max = 45X1 + 70X2 + 0S1 + 0S1 + 0S3

2X1 + 6X2  300 S. t : 9X1 + 12X2 + S1 = 720

X1 + X2  75 2X1 + 6X2 + S2 = 300


X1, X2 ≥ 0 X1 + X2 + S3 = 75
X1, X2, S1, S2, S3 ≥ o

12
INITIAL TABLEAU
Sol/n 45 70 0 0 0
basis CjX1 X2 S1 S2 S3 RHSV Ratio

S1 0 9 12 1 0 0 720 60

S2 0 2 6 0 1 0 300 50

S3 0 1 1 0 0 1 75 75

Zj 0 0 0 0 0 0

Cj - Zj 45 70 0 0 0
13
SECOND TABLEAU
Sol/n 45 70 0 0 0
basis Cj X1 X2 S1 S2 S3 RHSV
S1 0 5 0 1 -2 0 120 24

X2 70 1/3 1 0 1/6 0 50 150

S3 0 2/3 1 0 -1/6 1 25 75

Zj 70/3 70 0 70/6 0 3500


Cj - Zj 65/3 0 0 -70/6 0

14
THIRD TABLEAU
Sol/n 45 70 0 0 0
basis CjX1 X2 S1 S2 S3 RHSV
X1 45 1 0 1/5 -2/5 0 24

X2 70 0 1 -1/15 3/10 0 42

S3 0 0 0 -2/15 1/10 1 9

Zj 45 70 13/3 3 0 4020

Cj - Zj 0 0 -13/3 -3 0

15
Optimal solutions: X1 = 24 units

X2 = 42 units

S3 = 9 engines
Max Z = Birr 4020

nterpretation: The Company is advised to produce 24 units of


ype mowers and 42 units of self-propelled mowers so as to realiz
profit of Birr 4020. In doing so, the company would be left with un
esource of 9 engines which can be used for other purposes.
16
When using the simplex algorithm to solve problems, there sh
never be a constraint with a negative right-hand side.

A constraint with a negative right-hand side is usually the res


an error in the ratio test or in performing one or more ERO

f one (or more) of the constraints has a negative right-hand


side,
then there is no longer a bfs, and the rules of the simp
algorithm may not lead to a better bfs. 17
EXERCISE 2
Max z = 4X1 + 3X2

S. t. X1 + X2  40

2X1 + X2  60

X1, X2 ≥ 0

Required:

Solve by simplex method.


18
EXERCISE 3
The Dakota Furniture Company manufactures desks, tables, and chairs. The manufactur

each type of furniture requires lumber and two types of skilled labor: finishing
and carpentry.
The amount of each resource needed to make each type of furniture is given in
the table
below. Currently, 48 board feet of lumber, 20 finishing hours, and 8 carpentry
hours are
available. A desk sells for $60, a table for $30, and a chair for $20. Dakota
believes that
demand for desks and chairs is unlimited, but at most five tables can be sold.
Because the
available resources have already been purchased, Dakota wants to maximize
19
… CONT’D
HINT:

Defining the decision variables as Max z 60X1 + 30X2 + 20X3


S.t. 8X1 + 6X2 + X3 ≤ 48 (Lumber contraint)
X1 = number of desks produced
4X1 + 2X2 + 1.5X3 ≤ 20 (Finishing constrain
X2 = number of tables produced 2X1 + 1.5X2 + 0.5X3 ≤ 8 (Carpentry constrain
X2 ≤ 5 (Limitation on table dd
X3 = number of chairs produced X1, X2, X3 ≥ 0

Solve the Dakota LP by Simplex

Method:

20
MINIMIZATION LINEAR PROGRAMMING PROBLEM
THE BIG M-METHOD (CHARNES PENALTY METHO
The Big-M method is a technique, which is used in removing artificia
variables from the basis. In this method; we assign coefficients to artifi
variables, undesirable from the objective function point of view.

If objective function Z is to be minimized, then a very large positive


price
(called penalty
Similarly, if Z is to)be
is assigned to each
maximized, artificial
then a variable.
very large negative cost (also c
penalty) is assigned to each of these variables.
21
The Big M Method
Recall that the simplex algorithm requires a starting bfs. In a
the
problems we have solved so far, we found a starting bfs by using the sl
variables as our basic variables.
an LP has any ≥ or equality constraints, however, a starting bfs ma
ot
eWhen
readily
a bfsapparent.
is not readily apparent, the Big M method may be used to s
the problem.
22
Description of Big M Method
Step 1: Modify the constraints so that the right-hand side of each constraint is nonnegativ
requires that each constraint with a negative right-hand side be multiplied through by-1.
Remember that if you multiply an inequality by any negative number, the direction of t
inequality is reversed.

Step 1: Identify each constraint that is now (after step 1) an = or ≥ constraint. In ste

3, we will add an artificial variable to each of these constraints.

Step 2: Convert each inequality constraint to standard form. This means that if constraint
constraint, we add a slack variable Si, and if constraint i is a ≥ constraint, we subtract an ex
variable ei.
23
Description of Big M Method
Step 3: If (after step 1 has been completed) constraint i is a ≥ or = constraint, add an artificial variable a
add the sign restriction ai ≥ 0.

Step 4: Let M denote a very large positive number. If the LP is a min. problem, add (for each artificial va
Mai to the objective function. If the LP is a max problem, add (for each artificial variable) -Mai to the objec
function.

Step 5: (I) Determine the variable to enter the basic solution. We identify the column with the largest ne
value in the Cj - Zj row of the table.

(II) Next we determine the departing variable from the basic solution. The leaving variable is the one wit
smallest non-negative ratio.

 If an artificial variable goes out of solution, then we discard it totally and even this variable may not form
of further iterations.

 The optimal solution for MIN. is obtained when the Cj - Zj row contains entirely of ZEROS AND POSITIVE v
24
EXAMPLE 3
Min Z = 7X1 + 9XWe2 introduce both surplus and artificial
S. t. 3X1 + 6X2 ≥ 36
variables
8X1 + 4X2 ≥ 64into both constraints as follows.
Min Z = 7X1 + 9X2 + 0S1 + 0S2 + MA1 + MA2
X1, X2 ≥ 0
Subject to: 3X1+6X2 - S1+A1 = 36

8X1+4X2 - S2+A2 =

64

X1, X2 S1, S2, A1, A2 ≥ 0 25


INITIAL SIMPLEX TABLEAU
Cj 7 9 0 0 M M Quantity
Basic V. X1 X2 S1 S3 A1 A2

A1 M 3 6 -1 0 1 0 36

A2 M 8 4 0 -1 0 1 64

Zj 11M 10M -M -M M M 100M

Cj -Zj 7-11M 9-10M M M 0 0

26
SECOND SIMPLEX TABLEAU
Cj 7 9 0 0 M Quantity
Basic V. X1 X2 S1 S2 A1

A1 M 0 9/2 -1 3/8 1 12

X1 7 1 ½ 0 -1/8 0 8

Zj 7 7/2+9/2M -M 3/8M-7/8 M 56+12M

Cj - Zj 0 11/2-9/2M M 7/8-3/8M 0

27
THIRD SIMPLEX TABLEAU
Cj 7 9 0 0 Quantity
Basic V. X1 X2 S1 S2

X2 9 0 1 -2/9 ½ 8/3

X1 7 1 0 1/9 -1/6 20/3

Zj 7 9 -11/9 -5/12 212/3

Cj - Zj 0 0 11/9 5/12

28
The third tableau represents a final tableau since it is the optimal solu

with entirely of zeros and non-negative values in the Cj - Zj row.

Therefore, the optimal solution is

X1 = 20/3,

X2 = 8/3, and

The value of objective function is 212/3.


29
EXAMPLE 4
Min Z = 3X1 + 4X
We2 introduce both surplus and artificial variabl

S. t: 2X1 + 3X2 ≥ 90 into both constraints as follows.


4X1 + 3X2 ≥ 120Min Z = 3X1 + 4X2 + 0S1 + 0S2 + MA1 + MA2
X1, X2 ≥ 0
S. t. 2X1+ 3X2 - S1+ A1 = 90

4X1+ 3X2 - S2 + A2 = 120

X1, X2, S1, S2, A1, A2 ≥ 0


30
INITIAL SIMPLEX TABLEAU
Cj 3 4 0 0 M M Quantity
Basic V. X1 X2 S1 S3 A1 A2

A1 M 2 3 -1 0 1 0 90

A2 M 4 3 0 -1 0 1 120

Zj 6M 6M -M -M M M 210M

Cj - Zj 3-6M 4-6M M M 0 0

31
SECOND SIMPLEX TABLEAU
Cj 3 4 0 0 M Quantity
Basic V. X1 X2 S1 S2 A1

A1 M 0 3/2 -1 1/2 1 30

X1 3 1 3/4 0 -1/4 0 30

Zj 3 9/4+3/2M -M -3/4+1/2M M 90+30M

Cj - Zj 0 7/4-3/2M M 3/4-1/2M 0

32
THIRD SIMPLEX TABLEAU
Cj 3 4 0 0 Quantity
Basic V. X1 X2 S1 S2

X2 4 0 1 -2/3 1/3 20

X1 3 1 0 1/2 -1/2 15

Zj 3 4 -7/6 -1/6 $125

Cj - Zj 0 0 7/6 1/6

33
Therefore, as the values in Cj - Zj are entirely o
zeros and negatives, then the minimization proble
optimal.

X1 = 15,

X2 = 20, and

Min Z = $125.
34
EXERCISE 4: Solve by Big-M Method

35
EXERCISE 5: Solve by Big-M Method
Min Z = 4X1 + 6X2 Solution
S. t. X1 + 2X2 ≥ 80 X1 = 14,

3X1 + X2 ≥ 75 X2 = 33,
X1, X2 ≥ 0 Min. Z = $254.

36
EXERCISE 6: Solve by Big-M Method
Min. Z = 2X1 + 3X2

S. t: X1 ≥ 125 Demand for product

X1 + X2 ≥

250

2X1 + X2  600

X1, X2 ≥ 0
37
SOME SPECIAL ISSUES IN LP
1. Redundant Constraint

f a constraint when plotted on a graph doesn’t form part of the boundary making the feasib
region of the problem that constraint is said to be redundant.

2. Multiple optimal Solutions /Alternative optimal solutions/

The same maximum value of the objective function might be possible with a number of diff
combinations of values of the decision variables.

This occurs because the objective function is parallel to a binding constraint.

With simplex method this condition can be detected by examining the Cj - Zj row of the fi
tableau. If a zero appears in the column of a non-basic variable (i.e., a variable that is not in
solution), it can be concluded that an alternate solution exists.
38
3. Infeasible Solution

solution is called feasible if it satisfies all the constraints and

negativity condition.

However, it is sometimes possible that the constraints may

consistent so that there is no feasible solution to the problem

a situation is called infeasibility.


39
4. MIXED CONSTRAINTS
ABC Gasoline Company has two refineries with different production capacities. Refinery A
produce 4,000 gallons per day of super unleaded gasoline, 2,000 gallons per day of re
unleaded gasoline and 1,000 gallons per day of leaded gasoline. On the other hand,
refinery B can produce 1,000 gallons per day of super unleaded, 3,000 gallons per day o
regular unleaded and 4,000 gallons per day of leaded.

he company has made a contract with an automobile manufacturer to provide 24,000 gasoli
uper unleaded, 42,000 gallons of regular unleaded and 36,000 gallons of leaded.
he automobile manufacturer wants delivery in not more than 14 days. The cost of running re
is $1,500 per day and refinery B is $2,400 per day.
EXERCISE 7: Determine the number of days the gasoline company
should operate each refinery at a minimum running cost by graphic
method.

40
MAX. PROBLEMS WITH MIXED
CONSTRAINTS
EXAMPLE 5
Standardization
Max Z = 6X1 + 8X2 +0S1 + 0S3 - MA2 - MA3
Max Z = 6X1 + 8X2
S. t:
S. t:
X2  4 X2 + S1 = 4

X1 + X2 = 9 X1 + X2 + A2 = 9

6X1 + 2X2 > 24 6X1 + 2X2 - S3 + A3 = 24


X1, X2 > 0 All variables are > 0.
41
INITIAL SIMPLEX TABLEAU
Cj 6 8 0 0 -M -M Quantity
Basic V. X1 X2 S1 S3 A2 A3

S1 M 0 1 1 0 0 0 4

A2 -M 1 1 0 0 1 0 9
A3 -M 6 2 0 -1 0 1 24

Zj -7M -3M 0 +M -M -M -33M

Cj - Zj -6+7M 8+3M 0 -M 0 0

42
SECOND SIMPLEX TABLEAU
Cj 6 8 0 0 -M Quantity
Basic V. X1 X2 S1 S3 A2

S1 M 0 1 1 0 0 4

A2 -M 0 2/3 0 1/6 1 5
X1 6 1 1/3 0 -1/6 0 4

Zj 6 2-2/3M 0 -1-M/6 -M 24-5M

Cj - Zj 0 6+2/3M 0 11+M/6 0

43
THIRD SIMPLEX TABLEAU
Cj 6 8 0 0 -M Quantity
Basic V. X1 X2 S1 S3 A2
X2 8 0 1 1 0 0 4
A2 -M 0 0 -2/3 1/6 1 7/3
X1 6 1 0 -1/3 -1/6 0 8/3
Zj 6 8 6+2/3M -1-M/6 -M 48-7/3M

Cj - Zj 0 0 -6-2/3M 11+M/6 0

44
FOURTH SIMPLEX TABLEAU
Cj 6 8 0 0 Quantity
Basic V. X1 X2 S1 S3
X2 8 0 1 1 0 4
S3 0 0 0 -4 1 14
X1 6 1 0 -1 0 5
Zj 6 8 2 0 62
Cj - Zj 0 0 -2 0

45
This above tableau represents the final tableau since it is the opt
solution with entirely of zeros and negative values in the Cj - Zj

Therefore, the optimal solution is:

X1 = 5,

X2 = 4,

S3 = 14, and

The value of objective function is Birr 62.

46
5. UNBOUNDED SOLUTIONS
olution is unbounded if the objective function can be improved without limit and
ating the feasibility condition. Here, the objective function value can also be incr
nitely. The solution is unbounded if there are no positive ratios in determining th
ving variable.

negative ratio means that increasing a basic variable would increase resources!

ero ratio means that increasing a basic variable would not use any resources. Th
ndition generally arises because the problem is incorrectly formulated.

47
6. DEGENERACY
In the process of developing the next simplex tableau of not optimal,

aving variable must be identified. It is theoretically possible for subseq

solutions to cycle (i.e., to return to previous solutions).

There are ways of dealing with ties in a specific fashion; however, it will

usually suffice to simply select one row (variable) arbitrarily and proceed

with the computations.


48

You might also like