Sie sind auf Seite 1von 18

Algebraic Simplex Method - Introduction Previous Next

To demonstrate the simplex method, consider the


following linear programming model:

This is the model for Leo Coco's problem presented


in the demo, Graphical Method. That demo
describes how to find the optimal solution
graphically, as displayed on the right.
Thus the optimal solution is
,
, and
.
We will now describe how the simplex method (an
algebraic procedure) obtains this solution
algebraically.

Algebraic Simplex Method - Formulation Previous Next

The Simplex Formulation


To solve this model, the simplex method needs a system of equations
instead of inequalities for the functional constraints. The demo,
Interpretation of Slack Variables, describes how this system of equations
is obtained by introducing nonnegative slack variables, and . The
resulting equivalent form of the model is

The simplex method begins by focusing on equations (1) and (2) above.

Algebraic Simplex Method - Initial


Solution

Previous

Next

The Initial Solution


Consider the initial system of equations exhibited above. Equations (1)
and (2) include two more variables than equations. Therefore, two of the
variables (the nonbasic variables) can be arbitrarily assigned a value of
zero in order to obtain a specific solution (the basic solution) for the
other two variables (the basic variables). This basic solution will be
feasible if the value of each basic variable is nonnegative. The best of the
basic feasible solutions is known to be an optimal solution, so the
simplex method finds a sequence of better and better basic feasible
solutions until it finds the best one.
To begin the simplex method, choose the slack variables to be the basic
variables, so and are the nonbasic variables to set equal to zero. The
values of and now can be obtained from the system of equations.
The resulting basic feasible solution is
,
,
, and
. Is
this solution optimal?

Algebraic Simplex Method - Checking


Optimality

Checking for Optimality


To test whether the solution
rewrite equation (0) as

, and

Previous

Next

is optimal, we

Since both and have positive coefficients, can be increased by


increasing either one of these variables. Therefore, the current basic
feasible solution is not optimal, so we need to perform an iteration of the
simplex method to obtain a better basic feasible solution.
This begins by choosing the entering basic variable (the nonbasic
variable chosen to become a basic variable for the next basic feasible
solution).

Algebraic Simplex Method - Entering


Basic Variable

Previous

Next

Selecting an Entering Basic Variable


The entering basic variable is:
Why? Again rewrite equation (0) as
.
The value of the entering basic variable will be increased from 0. Since
has the largest positive coefficient, increasing will increase at the
fastest rate. So select .
This selection rule tends to minimize the number of iterations
needed to reach an optimal solution. You'll see later that this
particular problem is an exception where this rule does not
minimize the number of iterations.

Algebraic Simplex Method - Leaving


Basic Variable

Selecting a Leaving Basic Variable


The entering basic variable is:
The leaving basic variable is:
Why? Choose the basic variable that reaches zero
first as the entering basic variable ( ) is increased
(watch increase).
when
.
What if we increase until
?

Previous

Next

Algebraic Simplex Method - Entering


Basic Variable

Previous

Next

Selecting an Entering Basic Variable


The entering basic variable is:
Why? Again rewrite equation (0) as
.
The value of the entering basic variable will be increased from 0. Since
has the largest positive coefficient, increasing will increase at the
fastest rate. So select .
This selection rule tends to minimize the number of iterations
needed to reach an optimal solution. You'll see later that this
particular problem is an exception where this rule does not
minimize the number of iterations.

Algebraic Simplex Method - Leaving


Basic Variable

Selecting a Leaving Basic Variable


The entering basic variable is:
The leaving basic variable is:
Why? Choose the basic variable that reaches zero
first as the entering basic variable ( ) is increased
(watch increase).
when
.
What if we increase until
?

Previous

Next

Algebraic Simplex Method - Leaving


Basic Variable

Selecting a Leaving Basic Variable


The entering basic variable is:
The leaving basic variable is:
Why? Choose the basic variable that reaches zero
first as the entering basic variable ( ) is increased.
when
.
What if we increase until
(watch
increase)?
when
.
However is now negative, resulting in an
infeasible solution. Therefore, cannot be the
leaving basic variable.

10

Previous

Next

Algebraic Simplex Method - Gaussian


Elimination

Previous

Next

Scaling the Pivot Row


In order to determine the new basic feasible solution, we need to convert
the system of equations into proper form from Gaussian elimination.
The coefficient of the entering basic variable ( ) in the equation of the
leaving basic variable (equation (1)) must be 1.
The current value of this coefficient is: 1
Therefore, nothing needs to be done to this equation.

Algebraic Simplex Method - Gaussian


Elimination

Previous

Eliminating from the Other Equations


Next, we need to obtain a coefficient of zero for the entering basic
variable ( ) in every other equation (equations (0) and (2)).
The coefficient of in equation (0) is: -20
To obtain a coefficient of 0 we need to:
Add 20 times equation (1) to equation (0).
The coefficient of in equation (2) is: 3
Therefore, to obtain a coefficient of 0 we need to:
Subtract 3 times equation (1) from equation (2).

11

Next

Algebraic Simplex Method - Gaussian


Elimination

Previous

Next

Scaling the Pivot Row


In order to determine the new basic feasible solution, we need to convert
the system of equations into proper form from Gaussian elimination.
The coefficient of the entering basic variable ( ) in the equation of the
leaving basic variable (equation (1)) must be 1.
The current value of this coefficient is: 1
Therefore, nothing needs to be done to this equation.

Algebraic Simplex Method - Gaussian


Elimination

Previous

Eliminating from the Other Equations


Next, we need to obtain a coefficient of zero for the entering basic
variable ( ) in every other equation (equations (0) and (2)).
The coefficient of in equation (0) is: -20
To obtain a coefficient of 0 we need to:
Add 20 times equation (1) to equation (0).
The coefficient of in equation (2) is: 3
Therefore, to obtain a coefficient of 0 we need to:
Subtract 3 times equation (1) from equation (2).

11

Next

Algebraic Simplex Method - Checking


Optimality

Checking for Optimality


The new basic feasible solution is
yields
.
This ends iteration 1.

Previous

, and

Next

, which

Is the current solution optimal? No.


Why? Rewrite equation (0) as
.
Since has a positive coefficient, increasing from zero will increase
. So the current basic feasible solution is not optimal.
So have x2 enter as the new variable and x3 leave.

2.4

Proof that it works

If there is an optimal point, there is an optimzl basic feasbile solution.


There are a finite number of basic feasible solutions.
Each iteration of the simplex method moves from one basic feasible solution to a better basic feasible
solution.
Here is the same process using a Simplex tableau:

12

Tabular Simplex Method - Introduction

Previous

Next

To demonstrate the simplex method in tabular form,


consider the following linear programming model:

This is the same problem used to demonstrate the


simplex method in algebraic form (see the demo
The Simplex Method - Algebraic Form), which
yielded the optimal solution ( , ) = (0, 7), as
shown to the right.

Tabular Simplex Method - Initial Tableau Previous Next

Using the Tableau


After introducing slack variables ( , ), etc., the initial tableau is as
shown above.
Choose the slack variables to be basic variables, so and are the
nonbasic variables to be set to zero. The values of and can now be
obtained from the right-hand side column of the simplex tableau.
The resulting basic feasible solution is
,
,
, and
.

13

Tabular Simplex Method - Introduction

Previous

Next

To demonstrate the simplex method in tabular form,


consider the following linear programming model:

This is the same problem used to demonstrate the


simplex method in algebraic form (see the demo
The Simplex Method - Algebraic Form), which
yielded the optimal solution ( , ) = (0, 7), as
shown to the right.

Tabular Simplex Method - Initial Tableau Previous Next

Using the Tableau


After introducing slack variables ( , ), etc., the initial tableau is as
shown above.
Choose the slack variables to be basic variables, so and are the
nonbasic variables to be set to zero. The values of and can now be
obtained from the right-hand side column of the simplex tableau.
The resulting basic feasible solution is
,
,
, and
.

13

Tabular Simplex Method - Entering Basic Previous Next


Variable

Selecting an Entering Basic Variable


Ahe entering basic variable is:
Why? This is the variable that has the largest (in absolute value) negative
coefficient in row 0 (the equation (0) row).

Tabular Simplex Method - Leaving Basic Previous Next


Variable

Selecting a Leaving Basic Variable


The entering basic variable is:
The leaving basic variable is:
Why? Apply the minimum ratio test as shown above.

14

Tabular Simplex Method - Entering Basic Previous Next


Variable

Selecting an Entering Basic Variable


Ahe entering basic variable is:
Why? This is the variable that has the largest (in absolute value) negative
coefficient in row 0 (the equation (0) row).

Tabular Simplex Method - Leaving Basic Previous Next


Variable

Selecting a Leaving Basic Variable


The entering basic variable is:
The leaving basic variable is:
Why? Apply the minimum ratio test as shown above.

14

Tabular Simplex Method - Gaussian


Elimination

Previous

Next

Scaling the Pivot Row


Although it is not needed in this case, the pivot row is normally divided
by the pivot number.

Tabular Simplex Method - Gaussian


Elimination

Previous

Next

Eliminating from the Other Rows


Add 20 times row 1 to row 0.
Subtract 3 times row 1 from row 2.
Why? To obtain a new value of zero for the coefficient of the entering
basic variable in every other row of the simplex tableau.

15

Tabular Simplex Method - Gaussian


Elimination

Previous

Next

Scaling the Pivot Row


Although it is not needed in this case, the pivot row is normally divided
by the pivot number.

Tabular Simplex Method - Gaussian


Elimination

Previous

Next

Eliminating from the Other Rows


Add 20 times row 1 to row 0.
Subtract 3 times row 1 from row 2.
Why? To obtain a new value of zero for the coefficient of the entering
basic variable in every other row of the simplex tableau.

15

Tabular Simplex Method - Gaussian


Elimination

Previous

Next

Eliminating from the Other Rows


Add 20 times row 1 to row 0.
Subtract 3 times row 1 from row 2.
Why? To obtain a new value of zero for the coefficient of the entering
basic variable in every other row of the simplex tableau.

Tabular Simplex Method - Checking


Optimality

Previous

Checking for Optimality


This ends iteration 1.
Is the current basic feasible solution optimal? No.
Why? Because row 0 includes at least one negative coefficient.
2.5

Getting a Basic Feasible Solution

Given a linear program where B is the basis of A:


Maximize c0 x
s.t. Ax = b
x 0

To get a basic solution rewrite the linear program in terms of the basis:
16

Next

Tabular Simplex Method - Gaussian


Elimination

Previous

Next

Eliminating from the Other Rows


Add 20 times row 1 to row 0.
Subtract 3 times row 1 from row 2.
Why? To obtain a new value of zero for the coefficient of the entering
basic variable in every other row of the simplex tableau.

Tabular Simplex Method - Checking


Optimality

Previous

Checking for Optimality


This ends iteration 1.
Is the current basic feasible solution optimal? No.
Why? Because row 0 includes at least one negative coefficient.
2.5

Getting a Basic Feasible Solution

Given a linear program where B is the basis of A:


Maximize c0 x
s.t. Ax = b
x 0

To get a basic solution rewrite the linear program in terms of the basis:
16

Next

Das könnte Ihnen auch gefallen