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

Part 2 The Simplex Algorithm

The document discusses the Simplex Algorithm, a method used to solve linear programming problems with more than two variables. It outlines the steps to convert a linear program into standard form, develop initial and subsequent tableaus, and determine optimal solutions. Additionally, it introduces the Big M method for handling artificial variables in cases where a basic feasible solution is not readily apparent.

Uploaded by

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

Part 2 The Simplex Algorithm

The document discusses the Simplex Algorithm, a method used to solve linear programming problems with more than two variables. It outlines the steps to convert a linear program into standard form, develop initial and subsequent tableaus, and determine optimal solutions. Additionally, it introduces the Big M method for handling artificial variables in cases where a basic feasible solution is not readily apparent.

Uploaded by

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

THE SIMPLEX ALGORITHM

Zemen Post Graduate College


MBA Program: Regular
January,2021

1
The Simplex Algorithm
We saw how to solve containing two variables of linear programm
problems graphically.

Unfortunately, most real life LPs have many variables, so a simplex meth
s needed to solve LPs with more than two variables.

We devote most of this chapter to 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 follow
teps.
tep 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.
aking the microcomputer problem its standard form is as follows:
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
tep 2: Develop the initial tableau: the initial tableau always represents the
Nothing” strategy, so that the decision variables are initially non-ba
List the variables across the top of the table and write the objective func
coefficient of each variable just above it.
it

There should be one row in the body of the table for each constraint. List t
iables in the basis column, one per row.

In the Cj column, enter the objective function coefficient of zero for each sla
riable. (Cj - coefficient of variable j in the objective functio
Compute values for row Zj

Computer values for Cj - Zj.


4
tep 3: Develop subsequent tableaus:
3.1 Identify the entering variable - a variable that has a largest positive
alue is the Cj - Zj row.
3.2 Identify the leaving variable - using the constraint coefficients or substitution rate
he entering variable column divide each one into the corresponding quantity value.
However, do not divide by a zero or negative value. The smallest non-negative
non ratio
esults indicate which variable will leave the solution.
tep 4: Find unique vectors for the new basic variable using row operations on the pi
lement.
tep 5: Compute the Cj - Zj raw
tep 6: If all Cj - Zj values are zeros and negatives you have reached optimality.
tep 7:: If this is not the case (step 6), rehear step 2 to 5 until you get optimal solution

5
EXERCISE 1
eather limited manufactures two types of belts: the deluxe model and the regular model. Ea
ype requires 1 square yard of leather. A regular belt requires 1 hour of skilled labor, and a
eluxe belt requires 2 hours. Each week, 40 square yard of leather and 60 hours of skilled
abor are available. Each regular belt contributes $3 to profit and each deluxe belt, $4. if w
efine The appropriate LP is
Max z = 4X1 + 3X2
1 = number of deluxe belts produced weekly
S. t. X1 + X2 ≤ 40 (Leather cons
2X1 + X2 ≤ 60 (Labor constr
2 = number of regular belts produced weekly
X1, X2 ≥ 0

equired: change the above LP into standard form.


6
EXAMPLE 1
aking 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
ol/n 60 50 0 0 0
asis CjX1 X2 S1 S2 S3 RHSV Ratio
1 0 4 10 1 0 0 100 25

2 0 2* 1 0 1 0 22 11

3 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 variabl


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

1 60 1 ½ 0 ½ 0 11 22

3 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
ol/n 60 50 0 0 0
asis CjX1 X2 S1 S2 S3 RHSV X1 = 9
X2 = 4
1 0 0 1 6 -16/3 24
S1 =
HOU
1 1 0 0 1 -1/3 9 MAX Z =
0 BIR
2 0 1 0 -11 2/3 4
0
Zj 60 50 0 10 40/3 740
Cj - Zj 0 0 0 -10
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 types o
awn mowers: a push-type
type and a self-propelled
self model. The push-type
equires 9 minutes to assemble and 2 minutes to package; the self-prope
self
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 5
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 maximize
otal profit (use the simplex procedure).
11
… CONT’D
max = 45X1 + 70X2 The standard form:
S. t : 9X1 + 12X2  720 Z max = 45X1 + 70X2 + 0S1 + 0S1 + 0
2X1 + 6X2  300 S. t : 9X1 + 12X2 + S1 = 72
X1 + X2  75 2X1 + 6X2 + S2 = 300
X1, X2 ≥ 0 X1 + X2 + S3 = 75
X1, X2, S1, S2, S3 ≥ o

12
INITIAL TABLEAU
ol/n 45 70 0 0 0
asis CjX1 X2 S1 S2 S3 RHSV Ratio

1 0 9 12 1 0 0 720 60

2 0 2 6 0 1 0 300 50

3 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
ol/n 45 70 0 0 0
asis Cj X1 X2 S1 S2 S3 RHSV
1 0 5 0 1 -2
2 0 120 24

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

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

Zj 70/3 70 0 70/6 0 3500


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

14
THIRD TABLEAU
Sol/n 45 70 0 0 0
asis Cj X1 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

3 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 pu


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

A constraint with a negative right-hand


right side is usually the result
an error in the ratio test or in performing one or more EROs.

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


right side
hen 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 manufacture of
each type of furniture requires lumber and two types of skilled labor: finishing and carp
The amount of each resource needed to make each type of furniture is given in the
below. Currently, 48 board feet of lumber, 20 finishing hours, and 8 carpentry hours
available. A desk sells for $60, a table for $30, and a chair for $20. Dakota believes
demand for desks and chairs is unlimited, but at most five tables can be sold. Becaus
available resources have already been purchased, Dakota wants to maximize total revenue

19
… CONT’D
HINT:

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


S.t. 8X1 + 6X2 + X3 ≤ 48 (Lumber contrai
X1 = number of desks produced
4X1 + 2X2 + 1.5X3 ≤ 20 (Finishing constr
X2 = number of tables produced 2X1 + 1.5X2 + 0.5X3 ≤ 8 (Carpentry constr
X2 ≤ 5 (Limitation on ta
X3 = number of chairs produced
X1, X2, X3 ≥ 0
olve the Dakota LP by Simplex

Method:

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

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


called penalty) is assigned to each artificial variable.

Similarly, if Z is to be maximized, then a very large negative cost (also ca


penalty) is assigned to each of these variables.
21
The Big M Method
Recall that the simplex algorithm requires a starting bfs. In al
problems we have solved so far, we found a starting bfs by using the slac
variables as our basic variables.

f an LP has any ≥ or equality constraints, however, a starting bfs ma


be readily apparent.

When a bfs is not readily apparent, the Big M method may be used to so
he problem.
22
Description of Big M Method
Step 1: Modify the constraints so that the right-hand
right side of each constraint is nonnegative. T
equires that each constraint with a negative right-hand
right side be multiplied through by-1.
emember that if you multiply an inequality by any negative number, the direction of the
nequality is reversed.

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

, 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 i is a ≤
onstraint, we add a slack variable Si,, and if constraint i is a ≥ constraint, we subtract an excess
ariable 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 ai. Als
dd 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 var
Mai to the objective function. If the LP is a max problem, add (for each artificial variable) -Mai to the obje
unction.

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

I) Next we determine the departing variable from the basic solution. The leaving variable is the one with th
mallest non-negative ratio.

If an artificial variable goes out of solution, then we discard it totally and even this variable may not form
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 + 9X2 We introduce both surplus and artificial variabl
S. t. 3X1 + 6X2 ≥ 36 into both constraints as follows.
8X1 + 4X2 ≥ 64
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
asic V. X1 X2 S1 S3 A1 A2

1 M 3 6 -1 0 1 0 36

2 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
asic 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
asic V. X1 X2 S1 S2

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

1 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
he third tableau represents a final tableau since it is the optimal solution

with entirely of zeros and non-negative


negative values in the Cj - Zj row.

herefore, the optimal solution is

X1 = 20/3,

X2 = 8/3, and

he value of objective function is 212/3.


29
EXAMPLE 4
Min Z = 3X1 + 4X2 We introduce both surplus and artificial varia
S. t: 2X1 + 3X2 ≥ 90 into both constraints as follows.
4X1 + 3X2 ≥ 120 Min Z = 3X1 + 4X2 + 0S1 + 0S2 + MA1 + MA
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
asic V. X1 X2 S1 S3 A1 A2

1 M 2 3 -1 0 1 0 90

2 M 4 3 0 -1 0 1 120

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

j - Zj 3-6M 4-6M M M 0 0

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

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

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

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

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

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

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

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

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

j - Zj 0 0 7/6 1/6

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

X1 = 15,

X2 = 20, and

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

35
EXERCISE 5: Solve by Big-M
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
M Method
Min. Z = 2X1 + 3X2

. t: X1 ≥ 125 Demand for product

X1 + X2 ≥ 250

2X1 + X2  600

X1, X2 ≥ 0

37
SOME SPECIAL ISSUES IN LP
. Redundant Constraint

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

. Multiple optimal Solutions /Alternative optimal solutions/

he same maximum value of the objective function might be possible with a number of differe
ombinations of values of the decision variables.

his 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 final
ableau. If a zero appears in the column of a non-basic
non variable (i.e., a variable that is not i
olution), it can be concluded that an alternate solution exists.
38
3. Infeasible Solution

A solution is called feasible if it satisfies all the constraints and n

egativity condition.

However, it is sometimes possible that the constraints may be

nconsistent so that there is no feasible solution to the problem. S

a situation is called infeasibility.


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

he company has made a contract with an automobile manufacturer to provide 24,000 gaso
super 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
A is $1,500 per day and refinery B is $2,400 per day.
EXERCISE 7: Determine the number of days the gasoline company should op
each refinery at a minimum running cost by graphic method.

40
AX. PROBLEMS WITH MIXED CONSTRAINTS

EXAMPLE 5
Standardization
Max Z = 6X1 + 8X2 +0S1 + 0S3 - MA2 - MA
Max Z = 6X1 + 8X2
S. t:
S. t:
X2  4
X2 + S 1 = 4

X1 + X 2 = 9 X1 + X 2 + A 2 = 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
asic V. X1 X2 S1 S3 A2 A3

1 M 0 1 1 0 0 0 4

2 -M 1 1 0 0 1 0 9
3 -M 6 2 0 -1 0 1 24

j -7M -3M 0 +M -M -M -33M

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

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

1 M 0 1 1 0 0 4

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

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

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

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

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

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

45
his above tableau represents the final tableau since it is the optima
olution with entirely of zeros and negative values in the Cj - Zj row.

herefore, the optimal solution is:

X1 = 5,

X2 = 4,

S3 = 14, and

he value of objective function is Birr 62.

46
5. UNBOUNDED SOLUTIONS
solution is unbounded if the objective function can be improved without limit and no
iolating the feasibility condition.. Here, the objective function value can also be increa
nfinitely. The solution is unbounded if there are no positive ratios in determining the
eaving variable.

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

zero ratio means that increasing a basic variable would not use any resources. This
ondition generally arises because the problem is incorrectly formulated.

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

eaving variable must be identified. It is theoretically possible for subsequ

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

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

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

with the computations.


48

You might also like