Chapter07_Linear_programming_Simplex_Resolution
Chapter07_Linear_programming_Simplex_Resolution
programming-simplex
Linear program resolution
(PL)
The graphical method is limited => two variables at max => real
problems have more than two variables (ex:1000 variable and
100 constraints) => must be solved by computer.
The algebraic resolution of a PL =>is also not effective even for
an acceptable number of variables=> suppose when 5 variables
and 10 constraints=> this will generate 250 coint points possible
to test which is not obvious enough.
We need a method
Effective
Without objective function evaluation for each corner
points
Computable by computerThe proposed method is simplex.
resolution
simplex
La
formulation/
Modélisation
Programmation La méthode
linéaire graphique
La résolution
Simplexe
principe
2nd step: Building the initial simplex table Step 1: Converting the PL to standard format
3 2 1 0 0
1 0 0 1 0
0 1 0 0 1
30 50 0 0 0
2nd step: Building the initial simplex table
based on the standard form
In the initial table we will propose an initial solution of the set of the feasible
solution from our PL.
Suppose when takes the origin point where x=0 and y=0, The system will give as a
result:
✓e1= 1800
✓e2= 400
✓e3=600
✓Z=0
We will integrate these results in the initial table as follows=>
2nd step: Building the initial simplex table
3 2 1 0 0
1 0 0 1 0
0 1 0 0 1
3 2 1 0 0
1 0 0 1 0
0 1 0 0 1
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
e3 0 1 0 0 1 600
z 30 50 0 0 0 0
Objective/economic
coefficients
function
3 Step: Choose the variables to be inserted in the database.
• The choice is made by making sure that this variable will have the greatest possible
value coefficient and will increase the objective function as quickly as possible.
• This selected variable will allow you to select a column that will represent the pivot
column
• The selected variable will call an agreement variable. since which will take a value
after which had none.
3 Step: Choose the variables to be inserted in the base.
Selection of the highest coefficient of the objective function (MAX), Pivot column,
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
e3 0 1 0 0 1 600
z 30 50 0 0 0 0
4 step: choose the variable to remove from the base
The outgoing variable :. Is the the minimum of the ratio of the coefficient
of the right-hand side of each constraint to the corresponding coefficient
of the pivot column when the latter is strictly positive. This line is called
the pivot line.
4 step: choose the variable to remove from the base
• Calculates the ratio: second members/coefficient of the selected variable.
• Retain the MIN
• This value represents => Pivot line
• A quotient that is zero, or a negative number, or has a zero at the denominator, is
ignored.
Variable x y e1 e2 e3 Ci Calcule du
rapport
e1 3 2 1 0 0 1800 1800/2=900
e2 1 0 0 1 0 400 +∞
When we choose the variable with a maximum quotient, you try to maximize the result of the
objective function as quickly as possible. But in order not to violate the constraints, we will
have to limit the value of the chosen variable.
For this, we assume that the other variables except the one chosen are zero and we get the
result of the variable. This is exactly the process of making quotients.
We choose the min because it will guarantee that the variable will not cover any of the
constraints
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e3 0 1 0 0 1 600
z 30 50 0 0 0 0
The
pivot
6 Step: Divide the pivot line by the pivot
Variable x y e1 e2 e3 Ci
e1
e2
y 0 1 0 0 1 600
z
• 7 Step: Calculate the values of the table (rectangle rule)
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
y 0 1 0 0 1 600
z 30 50 0 0 0 0
• Set a " 0 " for the pivot column
Variable x y e1 e2 e3 Ci
e1 0
e2 0
y 0 1 0 0 1
z
• 7th Step: Calculate the values of the table (rectangle rule)
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
y 0 1 0 0 1 600
z 30 50 0 0 0 0
Variable x y e1 e2 e3 Ci
e1 3 0 1 0
y 0 1 0 0 1 600
z 30 0 0 0
7th Step: Calculate the values of the table (rectangle rule)
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
y 0 1 0 0 1 600
z 30 50 0 0 0 0
Variable x y e1 e2 e3 Ci
0-(2*1/1)=-2
e1 3 0 1 0
e2 1 0 0 1 0
y 0 1 0 0 1 600
z 30 0 0 0
7th Step: Calculate the values of the table (rectangle rule)
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
y 0 1 0 0 1 600
z 30 50 0 0 0 0
Variable x y e1 e2 e3 Ci
e1 3 0 1 0 -2
e2 1 0 0 1 0
y 0 1 0 0 1 600
z 30 0 0 0
7th Step: Calculate the values of the table (rectangle rule)
Variable x y e1 e2 e3 Ci
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
y 0 1 0 0 1 600
z 30 50 0 0 0 0
Variable x y e1 e2 e3 Ci
e1 3 0 1 0 -2
e2 1 0 0 1 0
y 0 1 0 0 1 600
0-(50*1/1)=-50
z 30 0 0 0
7th Step: Calculate the values of the table (rectangle rule)
Variable x y e1 e2 e3 Ci 1800-(2*600)/1=600
e1 3 2 1 0 0 1800
e2 1 0 0 1 0 400
y 0 1 0 0 1 600
z 30 50 0 0 0 0
Variable x y e1 e2 e3 Ci
e1 3 0 1 0 -2
e2 1 0 0 1 0
y 0 1 0 0 1 600
0-(600*50)/1=-30000
z 30 0 0 0 -50
Variable x y e1 e2 e3 Ci
e1 3 0 1 0 -2 600
e2 1 0 0 1 0 400
Y 0 1 0 0 1 600
z 30 0 0 0 -50 -30000
Variable x y e1 e2 e3 Ci
e1 3 0 1 0 -2 600
e2 1 0 0 1 0 400
Y 0 1 0 0 1 600
z 30 0 0 0 -50 -30000
This means that we start from the point x=0 and y=0 and z=0We have
the point x=0, y=600 and z=30000With a remainder in the variance
variables of e1= 600 and e2=400
8th Step: Checking the coefficients of the objective function
Are the coefficients of the economic/objective function zero
or negative?
Yes
We are coming up with the maximum
solution.
No
Variable x y e1 e2 e3 Ci
In our case we have a positive value which
means that we have not yet reached the e1 3 0 1 0 -2 600
maximum e2 1 0 0 1 0 400
Y 0 1 0 0 1 600
z 30 0 0 0 -50 -30000
A new pass/iteration (from step 3)
Step 3: Choose the variables to be inserted in the database. (max last line)
Variable x y e1 e2 e3 Ci Rapport
e1 3 0 1 0 -2 600
e2 1 0 0 1 0 400
y 0 1 0 0 1 600
z 30 0 0 0 -50 -30000
X is the incoming variable
New pass (step 3)
Step 3: Choose the variables to be inserted in the database. (max last line)
Step 4: choose the variable to remove from the base (min of the report)
e1 is the output
Variable x y e1 e2 e3 Ci variable
Rapport
e1 3 0 1 0 -2 600 600/3=200
e2 1 0 0 1 0 400 400/1=400
y 0 1 0 0 1 600 /
z 30 0 0 0 -50 -30000
X is the incoming variable
New pass (step 3)
Step 3: Choose the variables to be inserted in the database. (max last line)
Step 4: choose the variable to remove from the base (min of the report)
e1 is the output
Variable x y e1 e2 e3 Ci variable
Rapport
e1 3 0 1 0 -2 600 600/3=200
e2 1 0 0 1 0 400 400/1=400
y 0 1 0 0 1 600 /
The
z 30 0 0 0 -50 -30000
pivot
X is the incoming variable
New pass (step 3)
Variable x y e1 e2 e3 Ci
X 3 0 1 0 -2 600 600/3=200
e2 1 0 0 1 0 400 400
Y 0 1 0 0 1 600 /
z 30 0 0 0 -50 -30000
New pass (step 3)
Variable x y e1 e2 e3 Ci
e2 1 0 0 1 0 400
Y 0 1 0 0 1 600
z 30 0 0 0 -50 -30000
New pass (step 3)
Variable x y E1 e2 e3 Ci
e2 0
Y 0
z 0
Variable x y e1 e2 e3 Ci
X 3 0 1 0 -2 600
Y la colonne du
Mettre 0 pivot à zéro1 0 0 1 600
Détecter les lignes et les colonnes qui ne change pas.
z 30 0 0 0 -50 -30000
Variable X y E1 e2 e3 Ci
e2 0
Y 0
z 0
Variable x y e1 e2 e3 Ci
Un nouveau
X 3passage0 (étape1 3) 0 -2 600
e2 1 0 0 1 0 400
Y 0 1 0
Étape7: Calculer les valeurs du tableau (règle du rectangle)
0 1 600
z la remarque
Appliquer 30 de la ligne et
0 colonne qui 0ne change pas0 -50 -30000
Variable X y e1 e2 e3 Ci
e2 0 0 1
Y 0 1 0 0 1 600
z 0 0 0
Variable X y e1 e2 e3 Ci
Un nouveau
X 1passage0 (étape
1/33) 0 -2/3 200
e2 0 0 0 1 0 400
Y 0 1 0
Étape7: Calculer les valeurs du tableau (règle du rectangle)
0 1 600
z la remarque
Appliquer 0 de la ligne et
0 colonne qui0ne change pas0 -50 -30000
Variable X y e1 e2 e3 Ci
Y 0 1 0 0 1 600
Y 0 1 0 0 1 0
Y 0 1 0 0 1 600
Variable X y e1 e2 e3 Ci
Y 0 1 0 0 1 600
Z=36 000
X=200
Y=600
e2 is not saturated => there are still 200
e1 and e3 are saturated
Example
Step 1: Transformation of the PL in
standard form
e1 1 3 1 0 0 21
Step 1: Transformation of the PL in
standard form e2 -1 3 0 1 0 18
e1 1 3 1 0 0 21
Step 1: Transformation of the PL in
standard form e2 -1 3 0 1 0 18
e1 1 3 1 0 0 21
Step 1: Transformation of the PL in
standard form e2 -1 3 0 1 0 18
8th Step: Checking the coefficients of Calculates the remainder of the number by the rectangular ruler
the objective function
Step 1: Transformation of the PL in
standard form
e1 2 0 1 -1 0 3
y -1/3 1 0 1/3 0 6
e3 2/3 0 0 1/3 1 11
e1 2 0 1 -1 0 3
Step 1: Transformation of the PL in
standard form y -1/3 1 0 1/3 0 6
2nd step:Construct the initial simplex
array
e3 2/3 0 0 1/3 1 11
4th Step: choose the variable to remove Are the coefficients of the economic/objective function zero
from the base or negative?
Variable x y e1 e2 e3 Ci
e1 2 0 1 -1 0 3
y -1/3 1 0 1/3 0 6
e3 2/3 0 0 1/3 1 11
Variable x y e1 e2 e3 Ci
x 1 0 ½ -1/2 0 3/2
e3 0 0 -1/3 2/3 1 10
Variable x y e1 e2 e3 Ci
X 1 0 ½ -1/2 0 3/2
e3 0 0 -1/3 2/3 1 10
Variable x y e1 e3 e3 Ci
x 1 0 1/4 0 0 9
Y 0 1 1/4 0 -1/4 4
e2 0 0 -1/2 1 3/2 15
x 1 0 1/4 0 0 9
Y 0 1 1/4 0 -1/4 4
e2 0 0 -1/2 1 3/2 15
Base x y e1 e2 e3 e4 ci
X 1 0 4/3 0 -1/3 0 40
e2 0 0 -14/3 1 2/3 0 60
Y 0 1 -1/3 0 1/3 0 110
e4 0 0 -4/3 0 1/3 1 50
Z 0 0 -200/3 0 -100/3 0 -26000