The document discusses the simplex method for solving linear programming problems. It explains that the simplex method is an iterative procedure developed by George Dantzig in 1946 that provides a systematic way to examine the vertices of the feasible region to determine the optimal value of the objective function. The document then provides step-by-step instructions for applying the simplex method, including preparing the initial tableau, selecting pivots, and checking for optimality. It also includes an example problem demonstrating the simplex method.
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
Linear programming simplex method explained in detail
1.
2. 4/5/2020 Dr. Abdulfatah Salem 2
For linear programming problems involving two variables, the graphical solution
method introduced before is convenient.
It is better to use solution methods that are adaptable to computers. One such method
is called the simplex method, The simplex method is an iterative procedure
developed by George Dantzig in 1946. It provides us with a systematic way of
examining the vertices of the feasible region to determine the optimal value of the
objective function.
more than two
variables
problems involving
a large number of
constraints
However, for
problems involving
3. 4/5/2020 Dr. Abdulfatah Salem 3
Standard Minimization Form
• The objective function is to be
minimized.
• All the RHS involved in the
problem are nonnegative.
• All other linear constraints may
be written so that the
expression involving the
variables is greater than or equal
to a nonnegative constant.
Standard Maximization Form
• The objective function is to be
maximized.
• All the RHS involved in the
problem are nonnegative.
• All other linear constraints may
be written so that the expression
involving the variables is less
than or equal to a nonnegative
constant.
4. 4/5/2020 Dr. Abdulfatah Salem 4
1) Be sure that the model is standard model
2) Be sure that the right hand side is +ve value
4X1 - 7X2 > -50 4X1 - 7X2 < 50
-8X1 - 6X2 ≤ -57 8X1 + 6X2 ≥ 57
3) Convert each inequality in the set of constraints to an equation as
follows:
• Slack Variable added to the LHS of a constraint contains ≤ separator
to convert it to an equal separator (=).
4X1 - 7X2 < 50 4X1 - 7X2 + S = 50
or
• Surplus Variable subtracted from the LHS and artificial variable
added to the LHS of a constraint contains ≥ to convert it to an equal
separator (=).
8X1 + 6X2 ≥ 57 8X1 + 6X2 - S + A = 57
Simplex Algorithm
5. 4/5/2020 Dr. Abdulfatah Salem 5
4) Prepare the equations to move all the unknown terms to the left hand
side and the fixed values to the right hand side
Z = 4X1 + 9X2 + 3X3 Z - 4X1 - 9X2 - 3X3 = 0
8X1 + 6X2 = 57 + 4X3 8X1 + 6X2 - 4X3 = 57
X1 + 5X2 = 70 - X3 X1 + 5X2 + X3 = 70
5) Create the initial simplex tableau
Simplex Algorithm (cont.)
Z - 4X1 - 9X2 - 3X3 = 0
X1 + 5X2 + X3 + S1 = 70
5X2 + S2 = 81
Basic
Variables
X1 X2 X3 S1 S2 Z RHS
S1 1 5 1 1 0 0 70
S2 0 5 0 0 1 0 81
Z -4 -9 -3 0 0 1 0
6. 4/5/2020 Dr. Abdulfatah Salem 6
6) Select the pivot column. ( The column with the “most negative value”
element in the last row. )
7) Select the pivot row. (The row with the smallest non-negative result
when the last element in the row is divided by the corresponding in
the pivot column)
Simplex Algorithm (cont.)
Basic
Variables
X1 X2 X3 S1 S2 Z RHS
S1 1 5 1 1 0 0 70
S2 0 5 0 0 1 0 81
Z -4 -9 -3 0 0 1 0
Basic
Variables
X1 X2 X3 S1 S2 Z RHS
X2 1 5 1 1 0 0 70
S2 0 5 0 0 1 0 81
Z -4 -9 -3 0 0 1 0
7. 4/5/2020 Dr. Abdulfatah Salem 7
8) Use elementary row operations
to make all numbers in the
pivot column equal to 0 except
for the pivot number equal to 1.
9) Check the optimality (entries
in the bottom row are zero or
positive, If so, this the final
tableau (optimal solution) ,
If not, go back to step 5
10) The linear programming problem has been solved and maximum solution
obtained, which is given by the entry in the lower-right corner of the
tableau.
Simplex Algorithm (cont.)
Basic
Variables
X1 X2 X3 S1 S2 Z RHS
S1 # 1 # # # # #
S2 # 0 # # # # #
Z # 0 # # # # #
Basic
Variables
X1 X2 X3 S1 S2 Z RHS
S1 # 1 # # # # #
S2 # 0 # # # # #
Z # 0 # # # # #
8. 4/5/2020 Dr. Abdulfatah Salem 8
= + Artificial (A)
Constraint separator Action
≥ + Slack (s)
≤ - Surplus (s) + Artificial (A)
Simplex Algorithm (cont.)
9. 4/5/2020 Dr. Abdulfatah Salem 9
The national co. for assembling computer systems. assembles laptops and
printers, Each laptop takes four hours of labor from the hardware department and two hours of labor from
the software department. Each printer requires three hours of hardware and one hour of software. During
the current week, 240 hours of hardware time are available and 100 hours of software time. Each laptop
assembled gives a profit of $70 and each printer a profit of $50. How many printers and laptops should be
assembled in order to maximize the profit?
Example
Solution
ConstraintsprinterlaptopResource
24034hardware
10012software
5070Unit profit $
Max Z = 70x1 + 50x2
4x1 + 3x2 ≥ 240
2x1 + x2 ≥ 100
Z - 70x1 - 50x2 = 0
4x1 + 3x2 + s1 = 240
2x1 + x2 + s2 = 100
14. 4/5/2020 Dr. Abdulfatah Salem 14
BV X1 X2 S1 S2 Z Rhs
X2 0 1 1 -2 0 40
X1 1 0 -1/2 3/2 0 30
Z 0 0 15 5 1 4100
X1 = 30 No of laptops = 30
X2 = 40 No of printers = 40
Z = 4100 The optimal profit = $4100
Editor's Notes
In the last two lectures we discussed about the graphical method for solving linear programming problems depending on graphical representation of the constraints to form a feasible area and testing the values of objective function at each corner of the area.
Although the graphical method is an invaluable aid to understand the properties of linear programming models,
it provides very little help in handling practical problems.
For linear programming problems the graphical solution method is convenient when the problem involving two variables and a few number of constraints. In real-world most applications have more than two variables and many constraints, which is too complex for graphical solution , it is better to use a new method that is adaptable to the real-world applications. Many different methods have been proposed to solve linear programming problems. One such method is called the Dantzig Simplex method, in honor of George Dantzig, the mathematician who developed the approach in 1946. The simplex method is an iterative systematic process based on algebraically examining the vertices or what we call corners of the polygon representing the feasible solutions to determine the optimal value of the objective function.
Simplex Method is applicable to any problem that can be formulated in terms of linear objective function, subject to a set of linear constraints.
The Simplex algorithm is an iterative procedure for solving LP model in a finite number of steps. It consists of Having a trial basic feasible solution to constraint-equations then testing whether it is an optimal solution or not, If not an improvement to the trial by a set of mathematical rules and repeating the process till an optimal solution is obtained.
The main function in a LP problem is that you try to maximize something like profit or to minimize something like cost, waste, loss or risks for example then you organize your other mathematical relationship even equations or inequations which have variables who affect this.
The first step in using the simplex method is to classify the LP model to two types, maximization model or minimization model.
The simplex method in its simple form is called the simple algorithm, that algorithm require having the LP model in a standard Form. So, you have to formulate the model to either standard maximization model or standard minimization model.
The standard maximization model require:
The objective function is to be maximized, that mean the objective function start with the word “Maximize Z =“ for example.
All the RHS involved in the problem are nonnegative, that mean all the right hand side are positive values.
All other linear constraints may be written so that the expression involving the variables is less than or equal to a nonnegative constant.
On the other hand,
The standard minimization model require:
The objective function is to be minimized, that mean the objective function start with the word “Minimize Z =“ for example.
All the RHS involved in the problem are nonnegative, that mean all the right hand side are positive values.
All other linear constraints may be written so that the expression involving the variables is greater than or equal to a nonnegative constant.
After preparing the model by converting it into standard model and become ready to solve using the simple algorithm, follow the following steps:
Be sure that the model is standard model by applying the rules of the standard forms explained in details before.
Be sure that the right hand side is +ve value
Convert each inequality in the set of constraints to an equation as follows:
Slack Variable added to the LHS of a constraint contains ≤ separator to convert it to an equal separator (=).
or
Surplus Variable subtracted from the LHS of a constraint contains ≥ to convert it to an equal separator (=).
A slack variable represents unused resources A slack variable contributes nothing to the objective function value.
A surplus variable represents an excess above a constraint requirement level. Surplus variables contribute nothing to the calculated value of the objective function.
Write the objective function as an equation in the form "left hand side"= 0 where terms involving variables are negative
Prepare the equations to move all the unknown terms to the left hand side and the fixed values to the right hand side
Create the initial simplex tableau consisting of all the coefficients of the decision variables, slack variables, surplus variables and artificial variables added in the 3rd step.
Each variable assign its separate column.
the 1st. Column assigned to the basic variables while the last column assigned to the LHS values.
each constraint assign a separate row while the revised objective function assign the last row.
Select the pivot column. ( The column with the “most negative value” element in the last row. )
Select the pivot row. (The row with the smallest non-negative ratio resulting from dividing the value of when the last element in the row “under the RHS column” by the corresponding value under the pivot column)
Use elementary row operations to make all numbers in the pivot column equal to 0 except for the pivot number equal to 1.
Check the optimality case (entries in the bottom row are non-negative values, If so, this the final tableau (optimal solution) , If not, go back to step 6
The linear programming problem has been solved and maximum solution obtained, which is given by the entry in the lower-right corner of the tableau.