Vous êtes sur la page 1sur 32

SOLVING LP MODELS:

The Simplex Method


LINEAR PROGRAMMING
 Linear programming is a method for solving
a large number of maximization /
minimization problems.

 For linear programming problems involving


two variables, the graphical solution method
is convenient.
LINEAR PROGRAMMING
 However, for problems involving more than
two variables or problems involving a large
number of constraints, it is better to use
solution methods that are adaptable to
computers.

 One such method is called the simplex


method, developed by George Dantzig in
1946.
THE SIMPLEX METHOD
The simplex method, is a general
mathematical solution technique for solving
linear programming problems. In the simplex
method, the model is put into the form of a
table, and then a number of mathematical
steps are performed on the table. These
mathematical steps in effect replicate the
process in graphical analysis of moving from
one extreme point on the solution boundary to
another.
THE SIMPLEX METHOD

Set up to start If no Perform an


iterations, including Is the current
iteration to find a
finding an initial solution optimal?
better solution
solution

Initialization Optimality Test Iteration

If yes

STOP
THE SIMPLEX METHOD
However, unlike the graphical method, in
which we could simply search through all the
solution points to find the best one, the
simplex method moves from one better
solution to another until the best one is found,
and then it stops.
Example:
A bond portfolio manager has $100,000 to allocate to two
different bonds; one corporate and one government bond.
The corporate bond has a yield of 4%, a maturity of 3 years
and an A rating from a rating agency that is translated into a
numerical rating of 2 for computational purposes. In
contrast, the government bond has a yield of 3%, a maturity
of 4 years and rating of Aaa with the corresponding numerical
rating of 1 (lower numerical ratings correspond to higher
quality bonds). The portfolio manager would like to allocate
her funds so that the average rating for the portfolio is no
worse than Aa (numerical equivalent 1.5) and average
maturity of the portfolio is at most 3.6 years. Any amount not
invested in the two bonds will be kept in a cash account that
is assumed to earn no interest for simplicity and does not
contribute to the average rating or maturity computations.
How should the manager allocate her funds between these
two bonds to achieve her objective of maximizing the yield
from the investment?
Example:
𝑀𝑎𝑥 𝑍 = 0.04𝑥1 + 0.03𝑥2

Subject to

𝑥1 + 𝑥2 ≤ 100,000
2𝑥1 +𝑥2
≤ 1.5
100,000
3𝑥1 +4𝑥2
≤ 3.6
100,000
𝑥1 , 𝑥2 ≥ 0
Example:
Transition from Graphical
to Algebraic Solution
 If m = n, and the equations are consistent,
the system has only one solution

 If m < n (which represents the majority of


LPs), then the system of equations, again if
consistent, will yield an infinite number of
solutions.
Algebraic Determination of
Corner Points
 In a set of m x n equations (m < n), if we set
n – m variables equal to zero and then solve
the m equations for the remaining m
variables, the resulting solution, if unique, is
called a basic solution and must correspond
to a (feasible or infeasible) corner point of
the solution space. This means that the
maximum number of corner points is
Transition from Graphical
to Algebraic Solution
A basic solution has the following properties:

1. Each variable is designated as either a


nonbasic variable or a basic variable.

2. The number of basic variables equals the


number of functional constraints (m).
Therefore, the number of nonbasic
variables equals the total number of
variables minus the number of functional
constraints (n – m).
Transition from Graphical
to Algebraic Solution
A basic solution has the following properties:

3. The nonbasic variables are set equal to


zero.

4. The values of the basic variables are


obtained as simultaneous solution of the
system of equations (functional
constraints in augmented form). The set of
basic variables are called “basis”

5. If the basic variables satisfy the


nonnegativity constraints, the basic
solution is a basic feasible (BF) solution.
Notes on the Simplex Method
1. In any Simplex tableau, the intersection of
any basic variable with itself is always one
and the rest of the column is zeroes.

2. In any simplex tableau, the objective


function row (Z row) is always in terms of
the nonbasic variables. This means that
under any basic variable (in any tableau)
there is a zero in the Z row. For the
nonbasic there is no condition ( it can take
any value in this row).

3. If there is a zero under one or more


nonbasic variables in the last tableau
(optimal solution tableau), then there is a
multiple optimal solution.
Notes on the Simplex Method
4. When determining the leaving variable of
any tableau, if there is no positive ratio (all
the entries in the pivot column are negative
and zeroes), then the solution is
unbounded.

5. If there is a tie (more than one variables


have the same most negative or positive)
in determining the entering variable,
choose any variable to be the entering one.
Notes on the Simplex Method
6. If there is a tie in determining the leaving
variable, choose any one to be the leaving
variable. In this case a zero will appear in
RHS column; therefore, a “cycle” will
occur, this means that the value of the
objective function will be the same for
several iterations.

7. A solution that has a basic variable with


zero value is called a degenerate solution.
LP Model in Equation Form
 In (≤) constraints, the right-hand side can
be thought of as representing the limit on
the availability of a resource, in which case
the left-hand side would represent the usage
of this limited resource by the activities
(variables) of the model.

 The difference between the right-hand side


and the left-hand side of the (≤) constraint
thus yields the unused or slack amount of
the resource
LP Model in Equation Form
 To convert a (≤)-inequality to an equation, a
nonnegative slack variable is added to the
left-hand side of the constraint.
LP Model in Equation Form
 A (≥)-constraint sets a lower limit on the
activities of the LP model, so that the
amount by which the left-hand side exceeds
the minimum limit represents a surplus.

 The conversion from (≥) to (=) is achieved


by subtracting a nonnegative surplus
variables from the left-hand side of the
inequality.
LP Model in Equation Form
 The development of the simplex method
computations is facilitated by imposing two
requirements on the constraints of the
problem:

1. All the constraints (with the exception of


the nonnegativity of the variables) are
equations with nonnegative right-hand
side.

2. All the variables are nonnegative.


Example:
𝑀𝑎𝑥 𝑍 = 0.04𝑥1 + 0.03𝑥2

Subject to

𝑥1 + 𝑥2 ≤ 100,000
2𝑥1 +𝑥2
≤ 1.5
100,000
3𝑥1 +4𝑥2
≤ 3.6
100,000
𝑥1 , 𝑥2 ≥ 0
Setting up the Initial Simplex Tableau
 General notation:

cj = objective function coefficient for


variable j
bi = right-hand-side value for constraint i
aij = coefficient associated with variable j
in constraint I
Initialization
 Introduce slack variables.

 Select the decision variables to be the initial


nonbasic variables (set equal to zero) and
the slack variables to be the initial basic
variables.
Optimality Test
 The current basic feasible solution is optimal if and
only if every coefficient in row Z ≥ 0. If it is, stop.

 Otherwise, go to an iteration to obtain the next basic


feasible solution, which involves changing one
nonbasic variable to a basic variable and vice versa
and then solving for the new solution
Iterative Nature of the Simplex
Method
 Normally, the simplex method starts at the origin
where x1 = x2 = 0

 At this starting point, the value of the objective


function is zero, and the question is whether an
increase in nonbasic x1 and/or x2 above their
current zero values can improve (increase) the
value of the objective function.

 The design of the simplex method calls for an


increasing one variable at a time, with the
selected variable being the one with the largest
rate of improvement.
Iterative Nature of the Simplex
Method
 The simplex method moves alongside the
edges of the solution space, which means
that the method cannot cut across the
solution space.

 Entering variable (enters the basic solution)


 Leaving variable (leaves the basic solution)
Iteration
 Step 1: Determine the entering basic variable
by selecting the variable (automatically a
nonbasic variable) with the negative
coefficient having the largest absolute value
(i.e. the “most negative” coefficient) in row Z.
Put a box around the column of this
coefficient, and call this the pivot column. In
case of a tie, select the variable to enter that
corresponds to the leftmost of the columns.

 Step 2: Determine the leaving basic variable


by applying the minimum ratio test. Put a
box around this row and call it the pivot row.
Also call the number that is in both boxes the
pivot number.
Iteration
 Minimum Ratio Test
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, so replace that
variable by the entering basic variable in the
basic variable column of the next simplex
tableau.
Iteration
 Step 3: Solve for the new basic feasible solution
by using elementary row operations (multiply or
divide a row by a nonzero constant; subtract a
multiple of one row to another row) to construct
a new simplex tableau in proper form from
Gaussian elimination below the current one, and
then return to the optimality test.

New pivot row = current pivot row ÷ pivot number

New row = (current row) –


[(pivot column coefficient) x
(new pivot row)]
Example:
Given the LP problem, solve it using simplex
method. Then answer the following questions.

Max Z = 4A + 10B

s.t

2A + 2B ≤ 10
- A + 3B ≤ 12
2A + 4B ≤ 20
A, B ≥ 0
1) Which variable must be replaced in the 1st tableau
to improve the solution? ________
2) What is the theta of the leaving variable in the 1st
tableau? ________
3) What is the value of Z in the 2nd tableau?
________
4) The 2nd tableau is ________
5) What is the value of B in the 2nd tableau?
________
6) In the 2nd tableau, which variable must be included
in the basic variable column to improve the
solution? ________
7) In the 2nd tableau, the leaving variable is
________
8) If the 3rd tableau is optimal, identify the type of
solution. ________
9) What is the value of Z in the 3rd tableau? ________
10) What is the value of the basic variables in the 3rd
tableau? ________
The Our-Bags-Don’t-Break (OBDB) plastic bag company
manufactures three plastic refuse bags for home use: a 20-gallon
garbage bag, a 30-gallon garbage bag, and a 33-gallon leaf-and-
grass bag. Using purchased plastic material, three operations are
required to produce each end product: cutting, sealing, and
packaging. The production time required to process each type of bag
in every operation and the maximum production time available for
each operation are shown (note that the production time figures in
this table are per box of each type of bag).

If OBDB’s profit contribution is $0.10 for each box of 20-gallon bags


produced, $0.15 for each box of 30-gallon bags, and $0.20 for each
box of 33-gallon bags, what is the optimal product mix?

Vous aimerez peut-être aussi