Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Linear programming simplex method
1.
2. 3/19/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. 3/19/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. 3/19/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
3) Convert each inequality in the set of constraints to an equation as
follows:
• Slack Variable added to a ≤ constraint to convert it to an equation
(=).
A slack variable represents unused resources A slack variable
contributes nothing to the objective function value.
• Surplus Variable subtracted from a ≥ constraint to convert it to an
equation (=).
A surplus variable represents an excess above a constraint
requirement level. Surplus variables contribute nothing to the
calculated value of the objective function.
Simplex Algorithm
5. 3/19/2020 Dr. Abdulfatah Salem 5
4) Prepare the equations to make the unknowns in the left hand side and
the fixed values in the right hand side
5) Create the initial simplex tableau
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)
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 6
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.)
6. 3/19/2020 Dr. Abdulfatah Salem 6
= + Artificial (A)
Constraint type Variable to be added
≥ + slack (s)
≤ - Surplus (s) + artificial (A)
Simplex Algorithm (cont.)
7. 3/19/2020 Dr. Abdulfatah Salem 7
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
37. 19-Mar-20 Dr. Abdulfatah Salem 37
RHSS3S2S1X3X2X1BV
70012-13S1
120100-4-2S2
10/31/3008/31-4/3X2
0000-33-1Z
10/31/3008/31-4/3
-1
-4
1
3
-10/3-1/300-8/3-14/3
-40/3-4/30032/3-416/3
10/31/3008/31-4/3
1010083-4
❶
❷
RHSS3S2S1X3X2X1BV
31/31/30114/305/3S1
61/34/310-32/30-22/3S2
10/31/3008/31-4/3X2
-10-100-1103Z
❸
First
iteration
38. 19-Mar-20 Dr. Abdulfatah Salem 38
RHSS3S2S1X3X2X1BV
31/51/503/514/501X1
61/34/310-32/30-22/3S2
10/31/3008/31-4/3X2
-10-100-1103Z
31/51/503/514/501
1
-22/3
-4/3
3
31/51/503/514/501
-682/15-22/150-66/15-305/150-22/3
-124/15-4/150-4/5-56/150-4/3
93/53/509/542/503
RHSS3S2S1X3X2X1BV
31/51/503/514/501X1
987/1542/15166/15000S2
58/519/1504/596/1510X2
-143/5-8/50-9/5-97/500Z
❶
❷
❸
Second
iteration
39. 19-Mar-20 Dr. Abdulfatah Salem 39
RHSS3S2S1X3X2X1BV
31/51/503/514/501X1
987/1542/15166/15000S2
58/519/1504/596/1510X2
-143/5-8/50-9/5-97/500Z
The optimal solution will be :
X1 = 31/5
X2 = 58/5
X3 = 0
Z = -143/5
40. 19-Mar-20 Dr. Abdulfatah Salem 40
Example :
Solution :
Let P = -Z = -X1 + 3X2 - 3X3
Min Z = Min –P
Min Z = - Max P
Max P = -X1 + 3X2 - 3X3
S.T 3X1 - X2 + 2X3 ≤ 7,
2X1 + 4X2 ≥ -12,
-4X1 + 3X2 + 8X3 ≤ 10
X1, X2, X3 ≥ 0
Min Z = X1 - 3X2 + 3X3
S.T.
3X1 - X2 + 2X3 ≤ 7
2X1 + 4X2 ≥ -12
4X1 - 3X2 - 8X3 ≥ -10
X1, X2, X3 ≥ 0
42. 19-Mar-20 Dr. Abdulfatah Salem 42
RHSS3S2S1X3X2X1BV
70012-13S1
120100-4-2S2
10/31/3008/31-4/3X2
00003-31P
-1
-4
1
-3
10/31/3008/31-4/3
-10/3-1/300-8/3-14/3
-40/3-4/300-32/3-416/3
10/31/3008/31-4/3
-10-100-8-34
RHSS3S2S1X3X2X1BV
31/31/30114/305/3S1
76/34/31032/30-22/3S2
10/31/3008/31-4/3X2
10100110-3P
❶
❷
❸
First
iteration
43. 19-Mar-20 Dr. Abdulfatah Salem 43
RHSS3S2S1X3X2X1BV
31/51/503/514/501X1
76/34/31032/30-22/3S2
10/31/3008/31-4/3X2
10100110-3P
1
-22/3
-4/3
-3
31/51/503/514/501
31/51/503/514/501
-682/15-22/150-66/15-308/150-22/3
-124/15-4/150-4/5-56/150-4/3
-93/5-3/50-9/5-42/50-3
RHSS3S2S1X3X2X1BV
31/51/503/514/501X1
324/542/15166/15468/1500S2
58/59/1504/596/1510X2
143/58/509/597/500P
❶
❷
❸
Second
iteration
44. 19-Mar-20 Dr. Abdulfatah Salem 44
The optimal solution will be :
X1 = 31/5
X2 = 58/5
X3 = 0
P = 143/5
Z = -P = -143/5
RHSS3S2S1X3X2X1BV
31/51/503/514/501S1
324/542/15166/15468/1500S2
58/59/1504/596/1510X2
143/58/509/597/500P
45. 3/19/2020 Dr. Abdulfatah Salem 45
The Dual method
If standard form
The Big-M method
If not standard form
46. 3/19/2020 Dr. Abdulfatah Salem 46
The Dual method
In solving the linear programming problem, it helps to note that
each maximization problem is associated with a minimization
problem, and vice versa.
The given problem is called the primal problem, and the related
problem is called the dual problem.
The solution of maximizing (primal) problem produces the
solution of associated minimizing (dual) problem, and vice-
versa.
47. 3/19/2020 Dr. Abdulfatah Salem 47
The Duality Theorem
A primal problem has a solution if and only if the corresponding dual
problem has a solution.
Furthermore, if a solution exists, then:
The objective functions of both the primal and the dual problem attain
the same optimal value.
When the dual optimal case reached, the optimal solution to the
primal problem appears under the slack variables in the last row of
the final simplex tableau associated with the dual problem.
48. 3/19/2020 Dr. Abdulfatah Salem 48
The Dual Problem
Primalproblem Dualproblem
M variables N variables
N constraints M constraints
Coefficients of objective function Constants ( RHS)
Constants ( RHS) Coefficients of objective function
49. 3/19/2020 Dr. Abdulfatah Salem 49
transpose
Min P = 8y1 + 16y2
St: y1 + 5y2 9
2y1 + 2y2 10
y1 0, y2 0.
Max Z = 9x1 + 10 x2
St: x1 + 2x2 8
5x1 + 2x2 16
x1 0 , x2 0
69. 19-Mar-20 Dr. Abdulfatah Salem 69
Solving the non standard LP model
The Method
Suppose that you add n artificial variables A1 , A2 , …. , An to the LP model
Build the initial tableau representing the LP model with rows representing the
constraints’ equations and last row representing the modified objective function
Ž where :
Model modification
Add M[A1 + A2 + …. + An]to the objective function Eqn. if the model is Min.
Subtract M[A1 + A2 + …. + An] from the objective function Eqn. if the model is Max.
Ž row = Z row + M[A1row + A2row + …. + Anrow] if the model is Min.
Ž row = Z row - M[A1row + A2row + …. + Anrow] if the model is Max.
70. 19-Mar-20 Dr. Abdulfatah Salem 70
Solve the following linear programming problem by using the
simplex method:
Min Z = 12 X1 + 20 X2
S.t.
6X1 + 8X2 100
7X1 + 12X2 120
X1, X2 0
The Method
Artificial Variable Technique
Example :
74. 19-Mar-20 Dr. Abdulfatah Salem 74
RHSA1X2X1Basic Variable
100186A1
10017/12X2
220M020(M-1)-12 +13MZ
10017/12
8
1
20(M-1)
800856/12
10017/12
200(M-1)020(M-1)35/3(M-1)
RHSA1X2X1Basic Variable
20104/3A1
10017/12X2
20M+200001/3(4M-1)Z
❶
❷
❸
First
iteration
75. 19-Mar-20 Dr. Abdulfatah Salem 75
RHSA1X2X1Basic Variable
20104/3A1
10017/12X2
20M+200001/3(4M-1)Z
RHSX2X1Basic Variable
1501X1
1017/12X2
20M+20001/3(4M-1)Z
*3/4
76. 19-Mar-20 Dr. Abdulfatah Salem 76
RHSX2X1Basic Variable
1501X1
1017/12X2
20M+20001/3(4M-1)Z
1501
1
7/12
1/3(4M-1)
1501
35/407/12
5(4M-1)01/3(4M-1)
RHSX2X1Basic Variable
1501X1
5/410X2
20500Z
❶
❷
❸
Second
iteration
77. 19-Mar-20 Dr. Abdulfatah Salem 77
RHSX2X1Basic Variable
1501X1
5/410X2
20500Z
This solution is optimal, since there is no positive
value in the last row. The optimal solution is:
X1 = 15, X2 = 5/4 Z = 205
78. 19-Mar-20 Dr. Abdulfatah Salem 78
MAX Z = 3X1 – X2
S.T.
2X1 + X2 ≤ 2,
X1 + 3X2 ≥ 3,
X1 ≤ 4
X1, X2 , ≥ 0
Example :
S.T.
2X1 + X2 + S1 = 2
X1 + 3X2 – S2 + A1 = 3
X1 + S3 = 4
MAX Z = 3X1 – X2 - MA1
Solution :