Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 65

3.2.

Linear Programming: The


Simplex Method
After completing this chapter, you should be able to:

1. Explain the ways in which the simplex method is superior


to the graphical method for solving linear programming
problems.
2. Solve small maximization problems manually using the
simplex method.
3. Interpret simplex solutions.
4. Convert = and >constraints into standard form.
5. Solve maximization problems that have mixed constraints
and interpret those solutions.
After completing this chapter, you should be able to:

6. Solve minimization problems and interpret those


solutions.
7. Discuss unbound solutions, degeneracy, and multiple
optimal solutions in terms of the simplex method and
recognize infeasibility in a simplex solution.
 Simplex Method involves movement from one iteration to
another until no further improvement in the solution is
possible.
 Advantages and Characteristics
• More realistic approach as it is not limited to problems with two
decision variables
• Systematically examines basic feasible solutions for an optimal
solution.
• Based on the solutions of linear equations (equalities) using slack
variables to achieve equality.
 Rule
• Linear programming models have fewer equations than variables;
unless the number of equations equals the number of variables, a
unique solution cannot be found.
 Notation used in the simplex tableau:
Step 1. Formulation of LP – already done and you can refer to the
“Server” case
Step 2: Standardization of a constraint
 Standardization is the process of converting inequality in to
equality by adding additional variable.
 this is done by equalizing both sides by adding Slack variable(Si)
to the left side for <= constraint and –Si is added to left side for >=
sign.
The number of Si variables in <= constraints equal to the number of
constraints.
So, standard form for 4x1+10x2 <=100 :
4x1 + 10x2+ S1 =100.
? Would you standardize the remaining two constraints?
Note: The full standard form of LPM for the “server” case is shown in the next
slide.
 Variables could be of two types:
i. Basic variables(BVs)- variables with non zero positive value,
which usually come under “basis” in the simplex table.
ii. Non basic variables(NBVs) - variables with zero value.
 For <= constraint, usually Si are considered as BVs and others

as NBVs.
 For >= and = constraints, Ai(Artificial variables) will be BVs.
Step 3. Develop the initial tableau.
1. List the variables across the top of the table and write the
objective function coefficient of each variable just above it.
2. There should be one row in the body of the table for each
constraint. List slack variables in the basis column, one per row.
3. In the C column, enter the objective function coefficient of 0 for
each slack variable.
4. Compute values for row Z.
5. Compute values for row C – Z.
Step 4. Check for Optimality
Rule: A simplex solution in a maximization problem is optimal if the C–Z
row consists entirely of zeros and negative numbers (i.e., there are no
positive values in the bottom row).
•If all C-Z value <= 0, then optimality achieved.
•If one or more C-Z > 0, this is an indication for possibility for further
improvement.
•The improvement is possible by moving to next iteration by choosing an
entering variable.
Unit Vector

Each tableau represents a basic feasible solution to the problem.


Step5. Determine the entering variable
Rule: A variable with the largest positive C-Z will be an entering
variable.
 Identify the variable with the largest positive value in row C – Z. This variable
will come into solution next (X1 is entering variable).
Step6. Determine the leaving variable
Rule: A variable with smallest positive replacement ratio(RR) is considered as
leaving/departing variable(S2 is leaving variable).
• Using the constraint coefficients in the entering variable’s column, divide each one into
the corresponding Quantity column value. The smallest nonnegative ratio that results
indicates which variable will leave the solution mix.
• Compute replacement values for the leaving variable: Divide each element in the row by
the row element that is in the entering variable column. These are the pivot row values for
the next tableau. Enter them in the same row as the leaving variable and label the row with
the name of the entering variable. Write the entering variable’s objective function
coefficient next to it in column C.
Initial
InitialTableau
Tableau
Revised
RevisedFirst
FirstRow
Rowand
andPivot
PivotRow
Rowofofthe
theSecond
SecondTableau
Tableau
Interpreting the Second Tableau
At this point, variables s1, x1, and s3 are in solution. Not only are they listed in the
basis, they also have a 0 in row C – Z. The solution at this point is s1 = 56, x1 = 11,
and s3 = 6.
Note, too, that x2 and s2 are not in solution. Hence, they are each equal to zero. The
profit at this point is $660, which is read in the Quantity column in row Z. Also,
note that each variable in solution has a unit vector in its column.
Step 7. Repeat step 4- Step 8 till optimum solution is reached.
Partially
PartiallyCompleted
CompletedThird
ThirdTableau
Tableau
Interpreting the Third Tableau
In this tableau, all of the values in the bottom row are either negative or zero,
indicating that no additional potential for improvement exists. Hence, this
tableau contains the optimal simplex solution, which is
s1 = 24
x1 = 9
x2 = 4
 Initial Tableau
1. Write each constraint so that all variables are on the left side and a
nonnegative constant is on the right. Then add a slack variable to the
left side, thereby making it an equality.
2. Develop the initial tableau.
1. List the variables across the top of the table and write the objective
function coefficient of each variable just above it.
2. There should be one row in the body of the table for each constraint.
List slack variables in the basis column, one per row.
3. In the C column, enter the objective function coefficient of 0 for each
slack variable.
4. Compute values for row Z.
5. Compute values for row C – Z.
 Subsequent Tableaus
1. Identify the variable with the largest positive value in row C – Z. This variable
will come into solution next.
2. Using the constraint coefficients in the entering variable’s column, divide
each one into the corresponding Quantity column value. The smallest
nonnegative ratio that results indicates which variable will leave the solution
mix.
3. Compute replacement values for the leaving variable: Divide each element in
the row by the row element that is in the entering variable column. These are
the pivot row values for the next tableau. Enter them in the same row as the
leaving variable and label the row with the name of the entering variable.
Write the entering variable’s objective function coefficient next to it in
column C.
 Subsequent Tableaus (cont’d)
4. Compute values for each of the other constraint equations:
1. Multiply each of the pivot row values by the number in the entering variable
column of the row being transformed (e.g., for the first row, use the first number in
the entering variable’s column; for the third row, use the third number in the
entering variable’s column).
2. Then subtract the resulting equation from the current equation for that row and enter
the results in the same row of the next tableau.
5. Compute values for row Z: For each column, multiply each row coefficient by
the row value in column C and then add the results. Enter these in the tableau.
6. 6. Compute values for row C – Z: For each column, subtract the value in row
Z from the objective function coefficient listed in row C at the top of the
tableau.
 Subsequent Tableaus (cont’d)
6. Examine the values in the bottom row. If all values are zero or negative, the
optimal solution has been reached. The variables that comprise the solution
are listed in the basis column and their optimal values can be read in the
corresponding rows of the quantity column. The optimal value of the
objective function will appear in row Z in the Quantity column.
7. If the solution is not optimal, repeat steps 1–7 of this section until the optimal
solution has been attained.
 This is the case where a problem consists of more than one
type of constraints(<=, >= or =
 It is possible for maximization problem to contain >=
constraint and minimization problem to contain <= constraint.
All other procedures remain the same.
Step1: As usual, the first thing we are going to do is to
Standardize the constraints. For:
<= add slack variable(Si) to the left side to equalize with right

side
>= add surplus(-Si) and artificial variable (Ai) to equalize.
= add only artificial variable(Ai)

Step2: Develop initial simplex tableau and follow the same


procedures as ordinary maximization problem discussed earlier.
.
 In pure minimization problems, >= constraints are included.
 Most procedures are similar to maximization problems except
some.
 Note: Standardization of constraint has no thing to do with the
type of objective function; rather with constraint.
 Step 1. Standardization of a model
 To standardize >=, add surplus and artificial variables.
Cons1: 3x1 +6x2 >=36… add –S1 and A1
3x1+6x2-S1+A1 =36
Cons2: 8x1+4x2>=64…add –S2+A2
Note: The number of Artificial variables equal to the number of
>= and = signs if any.
 Note: Artificial Variables do not have any physical meaning;

their purpose is to enable us find initial feasible solution.


 Once they do the purpose, they should be removed from the

final simplex table.


 The guarantee to remove them is through penalization of

objective function.
 Penalization of objective function depends on the type of
objective function(OF):
i. If the objective function is maximization, the OF is penalized
by subtracting a very big coefficient of Ai (usually denoted by
–M) as –MAi from OF, in which the system will remove those
variables which negatively affect the OF.
ii. If OF is minimization, penalization is done by adding a very
big positive M as a coefficient of artificial variable in the OF
as +MAi.
iii. Artificial variable is needed only for >= and = constraints.
Type of Additional Type of OF
Constraint variable Maximization Minimization
needed

<= Slack 0 0
variable(Si)
>= Surplus(-Si) 0 0
Artificial -M +M
Var(Ai)
= Artificial -M +M
Var(Ai)
 Unbounded Solutions
• A solution is unbounded if the objective function can
be improved without limit.
• An unbounded solution will exist if there are no
positive values in the pivot column of simplex table.
 Degeneracy
• A conditions that occurs when there is a tie for the
lowest nonnegative ratio which, theoretically, makes it
possible for subsequent solutions to cycle (i.e., to return
to previous solutions).
Which special situation has happened and how would it be treated?
Is this optimal? How do we go to the next step if not optimal? Which special
condition has happened?
 Multiple Optimal Solutions
• Occur when the same maximum value of the objective
function might be possible with a number of different
combinations of values of the decision variables because the
objective function is parallel to a binding constraint.
• Occurs when optimality condition is satisfied and a non
basic variable has a zero value under C-Z row.
• To find the alternative solution, a non basic variable with a
zero value will be made entering variable and the remaining
steps be done the same way.
leaving

Non basic variable with a zero c-z value


 Infeasibility
• A problem in which no combination of decision and
slack/surplus variables will simultaneously satisfy all
constraints.
• Can be the result of an error in formulating a problem or it
can be because the existing set of constraints is too
restrictive to permit a solution.
• Recognized by the presence of an artificial variable in a
solution that appears optimal (i.e., a tableau in which the
signs of the values in row C – Z indicate optimality), and it
has a nonzero quantity; i.e, optimality requirement is
fulfilled but still there is artificial variable is found under
basic variable’s column.
Optimality requirement is satisfied as the problem is maximization; but still A2 is found
under basic variable’s column, which is the indication of infeasibility.
Which special condition has occurred? How it is treated? Discuss.
 There are many soft wares used to solve LP models as
solving LPM manually is time consuming and very
tedious especially as the number of constraints and
variables become large.
 To solve this problem, soft wares are ideal as they are
not limited to the number of constraints and variables;
hence can be applied to complex problems too.
 Some of these soft wares include POM/QM windows,
LINDO, Excel solver, etc.
 While others are commercial, excel solver is
embedded in to the window and will be discussed in
this class and the material which shows the detailed
steps is attached to this material.
 Excel solver is used in finding optimal solution as
well as conducting sensitivity analysis.
 Steps in using excel solver:
1. Configuring/ Activating the soft ware from the
window.
 Procedure: Open new excel sheet- File-Options-Add

ins-
solver Add in-Go-Solver Add-in(√)-OK.(Wait for
some time till configuration is completed).
 To check the correct configuration, click on “Data”

on the top of excel sheet and look for


? Solver at the right corner of the sheet.
Step2: Data Preparation
Step 3: Data Feeding to the solver
Step 4: Select the Non negativity and
Linearity requirements(Simplex LP) on
the window
Step5: Press on “Solve” on the window
Step6: Select what you look for( Optimal solution, Sensitivity)
Step 7: Click “OK”. Automatically answer and sensitivity report
will be shown up at the bottom of the sheet.

Solve a problem which you solved manually early.


-------END------
--------END----
Question?

You might also like