Associate Professor of Computers & Informatics - Benha University Operations Research 1 Dr. El-Sayed Badr Associate Professor of Computers & Informatics - Benha University Alsayed.badr@fsc.bu.edu.eg Dr. El-Sayed Badr 2014
2. All the variables are non-negative. The Simplex Method and Sensitivity Analysis The development of the simplex method computations is facilitated by imposing two requirements on the constraints of the problem: All the constraints (with the exception of the non-negativity of the variables) are equations with nonnegative right-hand side. 2. All the variables are non-negative. Dr. El-Sayed Badr 2012
How to convert max problem to min problem ? Dr. El-Sayed Badr 2014
The Slack Variables Dr. El-Sayed Badr 2014
The Surplus Variables Dr. El-Sayed Badr 2014
Graph all constraints, including non-negativity restriction TRANSITION FROM GRAPHICAL TO ALGEBRAIC SOLUTION Algebraic Method Graphical Method Represent the solution space by m equations in n variables and restrict all variables to non-negativity m < n. Graph all constraints, including non-negativity restriction The system has infinity of feasible solutions. Solution space consists of infinity of feasible points. Determine the feasible basic solution of the equations. Identity feasible corner points of the solution space. Candidates for the optimum solution are given by a finite number of basic feasible solutions. Candidates for the optimum solution are given by a finite number of corner points. Use the objective function to determine the optimum basic feasible solution from among all the candidates Use the objective function to determine the optimum corner point from among all the candidates. 6
Example: n = 4 m = 2 7
Basic Solutions and Basic Feasible Solutions Objective value, z Feasible? Corner point Basic solution Basic variables Non-Basic variables Yes A (4, 5) (x3, x4) (x1, x2)=(0,0) - No F (4, -3) (x2, x4) (x1, x3) =(0,0) 7.5 B (2.5, 1.5) (x2, x3) (x1, x4) =(0,0) 4 D (2, 3) (x1, x4) (x2, x3) =(0,0) E (5, -6) (x1, x3) (x2, x4) =(0,0) 8 C (1, 2) (x1, x2) (x3, x4) =(0,0) 8
Iterative Nature of the Simplex Method 9
The Simplex Method (Reddy Mikks Problem): 10
1- Entering Variable 2- Leaving Variable solution x6 x5 x4 x3 x2 x1 z (المقام صفرا،يهمل) (المقام سالب،يهمل) (المقام صفرا،يهمل) (المقام سالب،يهمل) solution x6 x5 x4 x3 x2 x1 z Basic z-row -4 -5 1 x3-row 24 4 6 x4-row 2 x5-row -1 x6-row 1- Entering Variable 2- Leaving Variable 11
solution x6 x5 x4 x3 x2 x1 z Basic -4 -5 1 الصف المحورى 24 4 6 2 -1 -4 -5 1 الصف المحورى 24 4 6 2 -1 12
solution x6 x5 x4 x3 x2 x1 z Basic 20 1 4 2 5 5/6 -2/3 1 4 1/6 2/3 2 -1/6 4/3 5 5/3 13
solution x6 x5 x4 x3 x2 x1 z Basic 21 ½ ¾ 1 3 -1/2 ¼ 3/2 -1/8 5/2 -5/4 ½ ¾ 1 3 -1/2 ¼ 3/2 -1/8 5/2 -5/4 3/8 1/2 -3/4 1/8 14
Another Example : Minimization Problem solution x5 x4 x3 x2 x1 z Basic -5 -3 3 1 Pivot row -2 2 -1 Dr. El-Sayed Badr 2012
solution x5 x4 x3 x2 x1 z Basic 1.5- -1.5 -9.5 1 0.5 1.5 -1 -0.5 -3.5 -1.5 -9.5 1 0.5 1.5 -1 -0.5 -3.5 16
Simplex Algorithm 17
Question1: Solve the following Linear Problem Klee-Minty Question1: Solve the following Linear Problem 18
Question2: What is the situation if our problem Simplex Algorithm Question2: What is the situation if our problem Contains constraints of the kind ( <= , >= and = = ) ? Answer1: 1- Dual Simplex Algorithm. 2- Two-Phase Method. 3- Big M-Method. 4-……. 19