The Simplex Method in a Nutshell

advertisement
The Simplex Method
Introduction
What is the Simplex Method?
The Simplex Method is an algorithm used to solve maximization or minimization linear
programming problems. The method is called the Simplex Method because a shape
called a “simplex” can represent the possible solutions to any linear programming
problem where the method is applied physically.
History


Simplex method was developed by Dr.George Dantzig in 1947.
Has many applications in fields such as kinetics, transportation, and several
others.
The Simplex Method in a Nutshell
Each of the constraint equations and the objective function create a region in space. This
region, called the simplex, is a polygonal shape with vertices. The number of vertices is
equal to m+1 where m is the total number of equations. First, a feasible solution is found
that corresponds to one of the vertices of the simplex. As the simplex method is
performed, you are actually moving from the vertex you are on to an adjacent vertex.
This process of moving from vertex to vertex is repeated until you reach the maximum or
minimum that satisfies the constraint equations.
Solution to a Linear Programming Problem using Simplex Method
Steps:
1. Organize the linear programming problem into a set of linear equations. The
linear programming problem should contain an objective function and a group of
constraint equations. One thing to note is that the solution of the variables in the
equation being maximized or minimized must be positive.
2. Turn the inequality constraints into equalities by adding either a slack variable or
a surplus variable.
3. Arrange the equations into a special matrix called a tableau. The arrangement is
done as follows:
1. Write the constraint equations, as you would in a regular matrix set up.
2. Draw a horizontal line underneath the bottom row in the matrix.
3. Add another row to the matrix, which is your objective function.
1
4. Find the most negative number in the row containing the objective function. The
column containing the most negative number is called the pivot column that will
be used in the pivot operation.
5. Find the pivot row. This is done using a method called the smallest quotient rule.
First, divide the rightmost number in the first row by the number in the pivot
column in the first row. You end up with a quotient.
6. Repeat step 5 for the second row, third row, and so on for every constraint
equation row only.
7. Examine the quotients and find the smallest non-negative quotient. The row that
you obtained that quotient from is the pivot row.
8. Find the pivot number. This is the number in the tableau where the pivot row and
pivot column intersect.
9. Perform the pivot operation. The pivot operation is done as follows:
1. Divide all numbers in the pivot row by the pivot number.
2. Obtain zeroes in the remaining numbers in the pivot column. This is done
by adding the appropriate multiple of the pivot row to the row you are
working with.
10. Repeat steps 4-9 until the last row (originally containing the objective function)
does not contain any negative indicator numbers. Remember that the solution to
this last row (the rightmost number in the row) is not an indicator.
11. Determine the solution to the linear programming problem. The final tableau will
contain two types of columns: some columns will have a single 1 and the rest of
the numbers zero and some columns will be numbers. Recall that each column
corresponds to a variable in the linear programming problem, whether it is a
slack/surplus variable or a variable in the objective and constraint equations.


The columns containing numbers correspond to variables that are nonbasic variables whose value equals zero.
The columns containing a single 1 and the rest zero are the basic
solutions that have a value.
12. Write out the equations containing variables that are basic.
13. Solve this set of equations and you have the solution to the linear programming
problem. Note that the number in the bottom right hand corner of the final
tableau contains the max/min of the objective.
Physical Interpretation of Simplex Method


The feasible region of solutions to the linear programming problem can be
sketched graphically. This region is a shape called a simplex.
Each vertex of the simplex corresponds to a column within the matrix or tableau.
If there are m equations then there are m+1 vertices on the simplex.
2

Because m number of equations is finite and n number of unknowns is finite then
the shape has a finite size and if we move along the edges of the shape we have to
reach the min/max eventually.
Approach (Follow on attached sheet):
1. Identify a basic feasible solution, which is one of the vertices.
2. Write the equations of the tableau in canonical form. This is done, for example,
by forcing variables x1,….,xm to be basic (not equal to 0) solutions and all other
variables to be non-basic (equal to 0).
3. The coefficients of the objective tell you which way to move to go to another
extreme point on the simplex. The extreme point you move to is always adjacent
to the one you were on.
4. Take one of the non-basic variables and assign it a positive value. This changes
the objective function value as well as the basic variable values to satisfy
constraint equations.
5. Rearrange the objective function so that the objective function value depends on
the original value and the non-basic variable value. The sign of the objective
coefficient tells us what will happen to z if the non-basic variable is manipulated.
As the non-basic variable is changed, we move along the edge of the simplex to
another extrema.
6. Rearrange the equations in canonical form now that one non-basic variable has a
value.
7. Examine what the basic solutions now depend on. Notice as the non-basic value
changes, then one of the original basic variables will be reduced to zero. So now
the old non-basic variable becomes basic and the old basic variable becomes nonbasic. The ratio of the solution to a constraint over the coefficient of the original
non-basic variable for the corresponding equation tells you the maximum the
original non-basic variable can be. A new canonical form can then be written.
8. Repeat the process until extreme point is found. This occurs when all coefficients
of the objective are greater than/equal to 0.
Notes:
 If objective coefficients equal 0 for some non-basic variables, then
alternate optima exist.
 This process finds the global min/max and not local min/max. Values
given to non-basic variables do not increase the objective result higher for
a max or lower for a min.
 If all constraint coefficients are negative we have an unbounded solution
in theory. However, in practical situations a reasonable min or max is
reached.
Advantages
 Does not require taking derivatives or analyzing for continuous/differentiable
functions
 Efficient with a small number of equations.
3
4
Download