8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
1/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Linear Programming ageometrical preview
(FEUP | DEGI) Operations Research 2012/2013 1 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
2/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Linear ProgrammingLearning Objectives
Ability to formulate a linear program:dene the decision variables (elements under control of the decision maker whose values determinethe solution of the model);dene the objective function as linear combinations of the decision variables (criterion the decisionmaker will use to evaluate alternative solutions to the problem);dene the constraints of the problem as linear combinations of the decision variables (restrictionsimposed upon the values of the decision variables by the caracteristics of the problem under study);
Ability to represent graphically the decision space of a linear program.Ability to nd, based on the graphical representation, the optimal solution of the linearprogram.Ability to determine, based on the graphical representation, the shadow price on a constraint:How much does the objective function increase if there is a unit increase in a constraintresource?Ability to determine, based on the graphical representation, over what range can a particularobjective-function coefficient vary without changing the optimal solution.Ability to determine, based on the graphical representation, over what range can theright-hand-side of a constraint change in order to maintain the shadow price.
(FEUP | DEGI) Operations Research 2012/2013 2 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
3/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BA
The factory of Barbosa & Almeida (BA) in Avintes produces glass containers through mouldinjection.BA recently won two new clients and intends to assign this production to one of its furnaces. Theorders were of bottles of Sandeman Ruby Port (75cl) and one liter bottles of olive oil Oliveira daSerra. Both customers buy all the bottles that BA can produce.
Due to differences in the production (number of cavities and different cycle times), each batch of portwine bottles takes 50 hours to produce, whereas each batch of oil bottles requires only 30hours. There are a total of 2000 hours available at the oven.Moreover, there are restrictions in the storage capacity of the bottles prior to their dispatch. Thewarehouse has 300 m3 available and each batch of portwine bottles occupies 6 m3 of warehousespace, while each batch of bottles of olive oil holds 5 m3.Finally we must also consider the capacity available in the decoration sector (e.g. labels,packaging), which is 200 hours. The portwine bottles spend 3 hours per batch and the olive oilbottles 5 hours per batch.Barbosa & Almeida wants to maximize the prot from these two orders, knowing that the protper batch is 50 e and 60 e , respectively.
(FEUP | DEGI) Operations Research 2012/2013 3 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
4/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BALinear Programming Model
Decision variables
x VP Number of batches of Vinho do Porto Ruby Sandeman bottles to produce;x A Number of batches of Azeite Oliveira da Serra bottles to produce.
Objective:max Z = 50 x VP + 60 x A
Subject to:50x VP + 30 x A 2000 (time in the oven)
6x VP + 5 x A 300 (space in the warehouse)3x VP + 5 x A 200 (capacity in the decoration sector)
x VP , x A 0
In this model x VP and x A may not be integer.
(FEUP | DEGI) Operations Research 2012/2013 4 / 103
http://find/http://goback/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
5/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAGraphical resolution Active and redundant constraints
0
10
20
30
40
50
60
70
80
0 10 20 30 40 50 60 70 80
X A
X VP
Tempo no Forno Espao no armazm
Capacidade na decorao
Funo objectivo
6X VP + 5X A = 300(restrio redundante)
3X VP + 5X A = 200
(restrio ativa)
50X VP + 30X A = 2000(restrio ativa)
X VP =0
X A =0
Sentido de crescimento de Z
Z = 50X VP + 60X A
(FEUP | DEGI) Operations Research 2012/2013 5 / 103
http://goforward/http://find/http://goback/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
6/103
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
7/103
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
8/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAGraphical resolution (Sensitivity analysis Coefficients of the objectivefunction)
0
10
20
30
40
50
60
70
80
0 10 20 30 40 50 60 70 80
Tempo no Forno Espao no armazm
Capacidade na decorao
Funo objectivo
Z = 50X VP + 60X A
50X VP + 30X A = 2000
3X VP + 5X A = 200
6X VP + 5X A = 300
X A
X VP
The optimal solution ramains unchanged whilethe slope of the objective function is maintainedbetween the slope of the restriction time in theoven and the slope of the constaint decorationcapacity.
Varying the slope of the objective function theoptimal solution jumps from vertex to vertex.
(FEUP | DEGI) Operations Research 2012/2013 8 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
9/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAGraphical resolution (Sensitivity analysis Coefficients of the objectivefunction)
In order to calculate the variation of the coefficient of x VP (C VP x VP + 60 x A) we can write the two active constraintsin the optimal solution with coefficient 60 in x A:
100x VP + 60 x A 4000 (time in the oven)36x VP + 60 x A 2400 (decoration cap.)
The coefficients of x VP in the two constraints will then bethe limits for the variation of C VP such that the optimalsolution does not change.
36 C VP 100
36 C VP (initial value 50) 100
In order to calculate the variation of the coefficient of x A(50x VP + C Ax A) we can write the two active constraints inthe optimal solution with coefficient 50 em x VP :
50x VP + 30x A 2000 (time in the oven)
50x VP + 2503 x A 100000
3 (decoration cap.)
The coefficients of x A in the two constraints will then be thelimits for the variation of C A such that the optimal solutiondoes not change.
30 C A 250
3
30 C A(initial value 60) 250
3
In both cases, the initial value of the coefficients is within the calculated range of variation.If the initial values were not contained in this interval, which ranges should be considered?
(FEUP | DEGI) Operations Research 2012/2013 9 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
10/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAGraphical resolution (Sensitivity analysis RHS of the constraints)
0
10
20
30
40
50
60
70
80
0 10 20 30 40 50 60 70 80
Tempo no Forno Espao no armazm
Capacidade na decorao
Funo objectivo
Z = 50X VP + 60X A
50X VP + 30X A = b 1
3X VP + 5X A = 200
6X VP + 5X A = 300
X A
X VP
Active constraint with another slope:the optimal value changes but the vertex does
not change.
A change in the RHS value of a constraint
translates the constraint into a paralel position.
(FEUP | DEGI) Operations Research 2012/2013 10 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
11/103
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
12/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAGraphical resolution (Shadow prices 1 of the constraints)
The shadow price of one constraint represents the variation in the objective function value if we increase theRHS of the constraint by one unit.Example:By how much would the prot increase if we could have an additional hour in the decoration? (increase theRHS of the contraint from 200 to 201)
50x VP + 30 x A = 20003x VP + 5 x A = 201
x VP = 24 1316x A = 25 516
Optimal solution: x VP = 241316 , x
A = 25 516 , Z
= 2759 38
With an additional hour in the decoration (an increase from 200 to 201) the value of the optimal solutionincreased from 2750 to 2759 38 . The constraint decoration capacityhas therefore a shadow price of 9
38 .
The shadow price remains the same while the optimal vertex does not change(see the sensitivity analysis for the RHS of the constraints).
The shadow price of a non-active constraint is zero.
1The shadow prices are also called dual variables, marginal values or pi values.(FEUP | DEGI) Operations Research 2012/2013 12 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
13/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Linear ProgrammingGraphical resolution (Unique optimal solution)
Objective:max Z = 4 x 1 + x 2
Subject to:x 1 x 2 2x 1+ 2 x 2 8
x 1, x 2 0 x 1
x2
x1
+ 2x2
= 8
x 1 - x 2 = 2
Z = 4 x1
+ x2
04
8 1216
20
(FEUP | DEGI) Operations Research 2012/2013 13 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
14/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Linear ProgrammingGraphical resolution (Non-unique optimal solution)
Objective:
max Z = x 1 x 2 30Subject to:x 1 x 2 2x 1+ 2 x 2 8
x 1, x 2 0 x1
x 2
x1
+ 2x2
= 8
x 1 - x 2 = 2
Z = x1
- x2
- 30
- 28
- 30
- 32
- 34
(FEUP | DEGI) Operations Research 2012/2013 14 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
15/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Linear ProgrammingGraphical resolution (Unlimited solution)
Objective:
max Z = 4 x 1 + x 2Subject to:
x 1 x 2 2x 1, x 2 0
x1
x2
x 1 - x 2 = 2
Z = 4 x1
+ x2
04
8 1216
20
(FEUP | DEGI) Operations Research 2012/2013 15 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
16/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Linear ProgrammingGraphical resolution (Without admissible solution)
Objective:max Z
Subject to:x 1 x 2 5x 1+ 2 x 2 8
x 1, x 2 0
x1
x2
x1
+ 2x2
= 8
x1
- x2
= -5
(FEUP | DEGI) Operations Research 2012/2013 16 / 103
h l
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
17/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Mathematical Programming
We consider only very special Mathematical Programming Models:All the variables take values in R or in Z .There is only one objective to minimize or to maximize.
The objective and the constraints are linear functions of the decision variables. Linear Programming Models if all the variables take values in R . Integer Programming Models if all the variables take values in Z .
(FEUP | DEGI) Operations Research 2012/2013 17 / 103
M h i l P i f d l
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
18/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Mathematical Programming: fundamentals
Objective:min f (X )
Subject to:
g i (X ) 0 i {1,..., m}
hi (X ) = 0 i {1,..., l }
Admissible set All the points S R n that satisfy the constraints.Admissible solution Each X S is an admissible solution.
Optimal solution X S
f (X ) f (X ) X S
(FEUP | DEGI) Operations Research 2012/2013 18 / 103
M th ti l P i
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
19/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Mathematical ProgrammingNon-linear programming example
x1
x2
x 1 + x 2 = 6 x 2 = x 12
Conjuntoadmissvel
(3, 6)
Curvas de nvel de f
Objective:min f (X ) = ( x 1 3)2 + ( x 2 6)2
Subject to: x 21 + x 2 0x 1 + x 2 6x 1, x 2 0
Optimal solution: x 1 = 32 , x 2 = 92 , f =
92
(FEUP | DEGI) Operations Research 2012/2013 19 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
20/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Simplex Methodbased on:Bradley, Hax, and Magnanti; AppliedMathematical Programming, Addison-Wesley,1977
(FEUP | DEGI) Operations Research 2012/2013 20 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
21/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Simplex MethodLearning Objectives
Canonical FormAbility to transform any linear program to a canonical form:
with nonnegative variablesby replacing each decision variable unconstrained in sign by a difference between two nonnegative variables. This replacement applies to all equations including the objective function.with equality constraintsby changing inequalities to equalities by the introduction of slack and surplus variables. For inequalities, let the nonnegative surplus variable represent the amount by which the lefthand side exceeds the righthand side; for inequalities, let the nonnegative slack variable represent the amount by which the righthand side exceeds the lefthand side.with non-negative righthand-side coefficientsby multiplying equations with a negative righthand side coefficient by -1.with one basic variable isolated in each constraintby adding a (nonnegative) articial variable to any equation that does not have an isolated variable readily apparent, and construct the BIG M objective function.
Simplex MethodAbility to use the simplex method in tableau formto solve a linear program represented in the Canonical Form, i.e.:
Ability to determine the starting point to initiate the simplex method.
Ability to write the linear program in tableau form.Ability to use the improvement mechanism for moving from a point to another point with a bettervalue of the objective function.
Improvement CriterionIn a maximization (minimization) problem, choose the nonbasic variable that has the most positive (negative)coefficient in the objective function of a canonical form. If that variable has a positive coefficient in some constraint, then a new basic feasible solution may be obtained by pivoting Ratio and Pivoting CriterionWhen improving a given canonical form by introducing variable x s into the basis, pivot in a constraint that
gives the minimum ratio of righthand-side coefficient to the corre sp onding x s c oe ffi cient. C o mpu te t hese rat io s only for constraints that have a positive coefficient for x s .Abilit to detect termination crite ria to indicate when a solution has been obtained.(FEUP | DEGI) Operations Research 2012/2013 21 / 103
Simplex method: A systematic procedure for solving linear
http://find/http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
22/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Simplex method: A systematic procedure for solving linearprograms
The method proceeds by moving from one feasible solution to another, at each step improving
the value of the objective function and terminates after a nite number of such transitions.Two important characteristics of the simplex method:
The method is robust it solves any linear program;it detects redundant constraints in the problem formulation;it identies instances when the objective value is unbounded overthe feasible region;it solves problems with one or more optimal solutions;the method is also self-initiating: it uses itself either to generatean appropriate feasible solution, as required, to start the method,or to show that the problem has no feasible solution.
The method provides much more than just optimal solutions. .it indicates how the optimal solution varies as a function of theproblem data (cost coefficients, constraint coefficients, andrighthand-side data).it gives information intimately related with a linear program calledthe dual of the given problem: the simplex method automaticallysolves this dual problem along with the given problem.
(FEUP | DEGI) Operations Research 2012/2013 22 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
23/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BALinear Programming Model
Objective:max Z = 50 x VP + 60 x A
Subject to:50x VP + 30 x A 2000 (time in the oven)
6x VP + 5 x A 300 (space in the warehouse)3x VP + 5 x A 200 (capacity in the decoration sector)
x VP , x A 0
Adding slack variables s1 , s2 and s3 :
Objective:max 50x VP + 60 x A
Subject to:50x VP +30 x A + s1 = 2000
6x VP +5 x A + s2 = 3003x VP +5 x A + s3 = 200x VP , x A, s1 , s2 , s3 0
(FEUP | DEGI) Operations Research 2012/2013 23 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
24/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Objective:max Z = 50 x VP + 60 x A
Subject to:50x VP +30 x A + s1 = 20006x VP +5 x A + s2 = 3003x VP +5 x A + s3 = 200x VP , x A, s1 , s2 , s3 0
Basic (admissible) solution:
Non-basic variables: x VP = 0x A = 0
Basic variables:s1 = 2000s2 = 300s3 = 200
Z = 0
0
10
20
30
40
50
60
70
80
0 10 20 30 40 50 60 70 80
50X VP + 30X A = 2000
Z = 50X VP + 60X A
3X VP + 5X A = 200
6X VP + 5X A = 300
X A
X VP
Objective: maximize Z ; choose the variablewith the most positive coecient in theobjective function: x As 3 is the rst variable that turns zero whenx A grows.
x A grows from 0 until 40, a value such thats 3 = 0; s 1 and s 2 remain 0
(FEUP | DEGI) Operations Research 2012/2013 24 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
25/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Objective:max Z = 50 x VP +60 x A
= 50 x VP +60(40 35 x VP 15 x d )
= 2400 +14 x VP 12s 3
Subject to:32x VP + s1 6s 3 = 800
3x VP + s2 s 3 = 10035 x VP + xA +
15 s 3 = 40
x VP , x A, s1 , s2 , s3 0
Basic (admissible) solution:
Non-basic variables: x VP = 0s 3 = 0
Basic variables:s1 = 800s2 = 100xA = 40
Z = 2400
0
10
20
30
40
50
60
70
80
0 10 20 30 40 50 60 70 80
50X VP + 30X A = 2000
Z = 50X VP + 60X A
3X VP + 5X A = 200
6X VP + 5X A = 300
X A
X VP
Objective: maximize Z ; choose the variablewith maximum coecient in the objectivefunction: x VP s 1 is the rst variable that turns zero whenx VP grows.
x VP grows from 0 until 25, a value such thats 1 = 0; x A and s 2 remain 0
(FEUP | DEGI) Operations Research 2012/2013 25 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
26/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Objective:max Z = 2400 +14 x VP 12s 3
= 2400 +14(25 132 s 1 + 316 s 3) 12s 3
= 2750 716 s 1 758 s 3
Subject to:xVP + 132 s 1 316 s 3 = 25
332 s 1 + s2 516 s 3 = 25
+ xA 3160 s 1 7180 s 3 = 25
xVP , xA, s 1 , s2 , s 3 0
Basic (admissible) solution:
Non-basic variables: s
1 = 0s 3 = 0
Basic variables:xVP = 25s2 = 25xA = 25
Z = 2750
0
10
20
30
40
50
60
70
80
0 10 20 30 40 50 60 70 80
50X VP + 30X A = 2000
Z = 50X VP + 60X A
3X VP + 5X A = 200
6X VP + 5X A = 300
X A
X VP
This solution is optimal because an increasein s 1 or s 3 reduction of Z.
(FEUP | DEGI) Operations Research 2012/2013 26 / 103
Simplex Method
http://find/http://goback/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
27/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Simplex MethodSteps of the algorithm
Initial Basic Admissible Solution (BAS) :Obtain an initial Basic Admissible Solution (BAS).
BAS is optimal? 2
Maximization if all the marginal costs are negative then the solution is optimal;Minimization if all the marginal costs are positive then the solution is optimal.If the BAS is not optimal then ITERATE.
ITERATE :1 Choose the variable that enters the basis: 3
Maximization the non-basic variable with the most positive marginal cost.
Minimization the non-basic variable with the most negative marginal cost.2 Choose the variable that enters the basis:
divide the RHS of all the equations by the positive coefficients of the variable that willenter the basis;the variable that will leave the basis will be the basic variable of the equation with thelowest ratio;if all the coefficients of the variable that will enter the basis are negative or zero thenthe solution is non-limited.
3 Change the lines in the tableau in order to obtain coecient equal to one for thepivotelement and zero for all the other elements of the column, including theobjective function.
4 BAS is optimal?2There are alternative optimal solutions when, in the optimal solution, one non-basic variable has a zero marginal
cost.
3If there is more than one variable that fullls the criterion choose one arbitrarilly .(FEUP | DEGI) Operations Research 2012/2013 27 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
28/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BASimplex method
Objective:max Z = 50 x VP + 60 x A
Subject to:50x VP + 30 x A 2000
6x VP + 5 x A 3003x VP + 5 x A 200x VP , x A 0
Objective:max Z = 50 x VP + 60 x A
Subject to:
50x VP + 30 x A+ s 1 = 20006x VP + 5 x A+ s 2 = 3003x VP + 5 x A+ s 3 = 200
x VP , x A, s 1, s 2 , s 3 0
(FEUP | DEGI) Operations Research 2012/2013 28 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
29/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BASimplex method
x VP x A s 1 s 2 s 3s 1 50 30 1 0 0 2000s 2 6 5 0 1 0 300
s 3 3 5 0 0 1 200 Z 50 60 0 0 0 0
x VP x A s 1 s 2 s 3 s 1 1605 0 1 0
305 800
s 2 3 0 0 1 1 100x A 35 1 0 0
15 40
Z 14 0 0 0 12 2400
x VP x A s 1 s 2 s 3x VP 1 0 5160 0
316 25
s 2 0 0 15160 1 716 25
x A 0 1 3160 0 5
16 25 Z 0 0 716 0
758 2750
x A enters the basis because:max(50 , 60) = 60s 3 leaves the basis because:min( 200030 ,
3005 ,
2005 ) =
2005
x VP enters the basis because:max(14) = 14s 1 leaves the basis because:min( 800150
5, 1003 ,
4035
) = 8001505
All the coefficients of the objective functionare 0.Optimal solution:(x VP , x A) = (25 , 25) and Z = 2750What does s 2 = 25 mean?
(FEUP | DEGI) Operations Research 2012/2013 29 / 103
Finding an initial Basic Admissible Solution (BAS)
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
30/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
g ( )
An important condition for the Simplex method is the availability of an initial BasicAdmissible Solution in the canonical form.Sometimes this initial BAS is not evident or it may evn not exist (and sometimes there is noBasic Admissible Solution!).Solutions:
Trial and error solve the system for different sets of variables, reduce it to the canonical form andtest if the resulting solution is admissible.Using articial variables.
(FEUP | DEGI) Operations Research 2012/2013 30 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
31/103
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
32/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
3. Thearticial problem will only be equivalent to the original one if all the articial variableshave value zero.
Objective all the articial variables must leave the basis.
1
Two-fase method2 Big Mmethod
(FEUP | DEGI) Operations Research 2012/2013 32 / 103
Big M method
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
33/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Assign the articial variables a very high cost ( M) (minimization problem) in the objectivefunction.The simplex method will take care, by improving the objective function, to expel the arcicialvariables from the basis articial variables equal to zero.
min n j =1 c j x j + mi = k +1 My i Subject to:
n
j =1aij x j = b i i {1,..., k }
n
j =1a ij x j + y i = b i i {k +1 ,..., m}
x j 0 j {1,..., n}y i 0 i {k +1 ,..., m}
(FEUP | DEGI) Operations Research 2012/2013 33 / 103
Big M method
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
34/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
example
Objective:min Z = 3x 1 + x 2 + x 3Subject to:
x 1 2x 2 + x 3 + s 1 = 11 4x 1 + x 2 + 2 x 3 s 2 = 3 2x 1 + x 3 = 1
x 1 , x 2 , x 3 , s 1 , s 2 0
Objective:min Z = 3x 1 + x 2 + x 3 + My1 + My2Subject to:
x 1 2x 2 + x 3 + s 1 = 11 4x 1 + x 2 + 2 x 3 s 2 + y1 = 3 2x 1 + x 3 + y2 = 1
x 1 , x 2 , x 3 , s 1 , s 2 , y1 , y2 0
(FEUP | DEGI) Operations Research 2012/2013 34 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
35/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Z = 3x 1 + x 2 + x 3 + M (3 + 4 x 1 x 2 2x 3 + s 2) + M (1 + 2 x 1 x 3)= 4 M + ( 3 + 6 M )x 1 + (1 M )x 2 + (1 3M )x 3 + Ms 2
x 1 x 2 x 3 s 1 s 2 y 1 y 2s 1 1 2 1 1 0 0 0 11y 1 4 1 2 0 1 1 0 3
y 2 2 0 1 0 0 0 1 1 Z 3 1 1 0 0 0 0 0
6M M 3M 0 M 0 0 4M
x 1 x 2 x 3 s 1 s 2 y 1 y 2s 1 3 2 0 1 0 0 1 10
y 1 0 1 0 0 1 1 2 1
x 3 2 0 1 0 0 0 1 1 Z 1 1 0 0 0 0 1 10 M 0 0 M 0 3M M
(FEUP | DEGI) Operations Research 2012/2013 35 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
36/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
x 1 x 2 x 3 s 1 s 2 y 1 y 2
s 1 3 0 0 1 2 2 5 12x 2 0 1 0 0 1 1 2 1x 3 2 0 1 0 0 0 1 1
Z 1 0 0 0 1 1 +1 20 0 0 0 0 M M 0
x 1 x 2 x 3 s 1 s 2x 1 1 0 0 13
23 4
x 2 0 1 0 0 1 1x 3 0 0 1 23
43 9
Z 0 0 0 1313 2
Optimal solution: ( x 1 , x 2 , x 3 , s 1 , s 2) = (4 , 1, 9, 0, 0) with Z = 2
(FEUP | DEGI) Operations Research 2012/2013 36 / 103
Some remarks
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
37/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
The articial variables are only used to serve as basic variables in a given equation. Once replacedin the base by the original variables, the articial variables can be eliminated from the simplextableau (eliminating the respective columns).
If, in the optimal simplex tableau, some articial variables have a value > 0, it means that theoriginal problem has no admissible solution, and therefore it is an impossible problem.
(FEUP | DEGI) Operations Research 2012/2013 37 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
38/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Sensitivity Analysisbased on:Bradley, Hax, and Magnanti; AppliedMathematical Programming, Addison-Wesley,1977Chapter 3, sections 3.1, 3.2, 3.3, 3.4 and 3.5
(FEUP | DEGI) Operations Research 2012/2013 38 / 103
Sensitivity Analysis
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
39/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
We have already been introduced to sensitivity analysis via the geometry of a simple example. Wesaw that the values of the decision variables and those of the slack and surplus variables remainunchanged even though some coefficients in the objective function are varied. We also saw thatvarying the righthand-side value for a particular constraint alters the optimal value of theobjective function in a way that allows us to impute a per-unit value, or shadow price, to thatconstraint. These shadow prices and the shadow prices on the implicit nonnegativity constraints,called reduced costs, remain unchanged even though some of the righthand-side values are varied.Since there is always some uncertainty in the data, it is useful to know over what range and underwhat conditions the components of a particular solution remain unchanged. Further, thesensitivity of a solution to changes in the data gives us insight into possible technologicalimprovements in the process being modeled. For instance, it might be that the available resourcesare not balanced properly and the primary issue is not to resolve the most effective allocation of these resources, but to investigate what additional resources should be acquired to eliminatepossible bottlenecks. Sensitivity analysis provides an invaluable tool for addressing such issues.
(FEUP | DEGI) Operations Research 2012/2013 39 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
40/103
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
41/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BA with Favaios Bottles
The factory of Barbosa & Almeida (BA) in Avintes produces glass containers through mouldinjection.BA recently won two new clients and intends to assign this production to one of its furnaces. Theorders were of bottles of Sandeman Ruby Port (75cl), one liter bottles of olive oil Oliveira da Serraand one liter bottles of Favaios Moscatel. The customers buy all the bottles that BA can produce.Due to differences in the production (number of cavities and different cycle times), each batch of
portwine bottles takes 50 hours to produce, whereas each batch of oil bottles requires only 30hours and a batch of favaios takes 50 hours to produce. There are a total of 2000 hours availableat the oven.Moreover, there are restrictions in the storage capacity of the bottles prior to their dispatch. Thewarehouse has 300 m3 available and each batch of portwine bottles occupies 6 m3 of warehousespace, each batch of bottles of olive oil holds 5 m3 and each batch of favaios holds 6 m3 .Finally we must also consider the capacity available in the decoration sector (e.g. labels,packaging), which is 200 hours. The portwine bottles spend 3 hours per batch, the olive oilbottles 5 hours per batch and the favaios bottles also 5 hours per batch.Barbosa & Almeida wants to maximize the prot from these two orders, knowing that the protper batch is 50 e 60e and 20e , respectively.
(FEUP | DEGI) Operations Research 2012/2013 41 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
42/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BA with Favaios Bottles
Decision variablesx VP Number of batches of Vinho do Porto Ruby Sandeman bottles to produce;
x A Number of batches of Azeite Oliveira da Serra bottles to produce;x F Number of batches of Favaios bottles to produce.
Objective:max Z = 50 x VP + 60 x A + 20 x F
Subject to:50x VP +30 x A +50 x F 2000 (time in the oven)
6x VP +5 x A +6 x F 300 (space in the warehouse)3x VP +5 x A +5 x F 200 (capacity in the decoration sector)x VP , x A, x F 0
In this model x VP , x A and x F may not be integer.
(FEUP | DEGI) Operations Research 2012/2013 42 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
43/103
Some remarks about the sensitivity analysis
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
44/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
We wish to analyze the effect on the optimal solution of changing various elements of theproblem data without re-solving the linear program or having to remember any of theintermediate tableaux generated in solving the problem by the simplex method.
The type of results that can be derived in this way are conservative, in the sense that theyprovide sensitivity analysis for changes in the problem data small enough so that the samedecision variables remain basic, but not for larger changes in the data.
(FEUP | DEGI) Operations Research 2012/2013 44 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
45/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Shadow PricesReduced Costs
(FEUP | DEGI) Operations Research 2012/2013 45 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
46/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios Bottles
x VP x A x F s 1 s 2 s 3x VP 1 0 58
132 0
316 25
s 2 0 0 78 332 1
716 25
x A 0 1 58 3160 0
516 25
Z 0 0 48 34 716 0 9
38 2750
The complete optimal solution for the problem is
(x VP , x A, x F , s 1 , s 2, s 3) = (25 , 25, 0, 0, 25, 0) and Z = 2750
The binding constraints in this optimal solution are therefore:the rst one (time in the oven, s 1 = 0);
the third one (capacity in the decoration sector, s 3 = 0);and x F = 0.
50x VP +30 x A +50 x F = 20003x VP +5 x A +5 x F = 200
x F = 0
(x VP , x A, x F ) = (25 , 25, 0)Z = 2750
(FEUP | DEGI) Operations Research 2012/2013 46 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
47/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Shadow PriceDefinitionThe shadow price associated with a particular constraint is thechange in the optimal value of the objective function per unitincrease in the righthand-side value of that constraint, all otherproblem data remaining unchanged.
(FEUP | DEGI) Operations Research 2012/2013 47 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
48/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios Bottles Shadow Prices
What will be the increase of the prot per unit increase in the oven time?
50x VP +30 x A +50 x F = 20013x VP +5 x A +5 x F = 200
x F = 0
50x VP +30 x A = 20013x VP +5 x A = 200x F = 0
50x VP +30 x A = 200118x VP +30 x A = 1200
x F = 0
x VP = 25 132x A = 24 157160
x F = 0
(x VP , x A, x F ) = (25 132 , 24157160 , 0)
Z = 50 25 132 + 60 24157160 + 20 0 = 2750
716
Prot increase: 2750 716 2750 = 716
x VP x A x F s 1 s 2 s 3
x VP 1 0 5
81
32 0 316 25
s 2 0 0 78
332 1
716 25
x A 0 1 58 3160 0 516 25
Z 0 0 48 34 716 0 9
38 2750
(FEUP | DEGI) Operations Research 2012/2013 48 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
49/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios Bottles Shadow Prices
What will be the increase of the prot per unit increase in the decoration capacity?50x VP +30 x A +50 x F = 2000
3x VP +5 x A +5 x F = 201x F = 0
50x VP +30 x A = 2000
3x VP +5 x A = 201x F = 0
50x VP +30 x A = 200018x VP +30 x A = 1206
x F = 0
x VP = 24 1316
x A = 25 83240
x F = 0
(x VP , x A, x F ) = (24 1316 , 25 516 , 0)
Z = 50 24 1316 + 60 516 + 20 0 = 2759
38
Prot increase: 2759 38 2750 = 9 38
x VP x A x F s 1 s 2 s 3
x VP 1 0 5
81
32 0 316 25
s 2 0 0 78
332 1
716 25
x A 0 1 58 3160 0
516 25
Z 0 0 48 34 716 0 9
38 2750
(FEUP | DEGI) Operations Research 2012/2013 49 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
50/103
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
51/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Reduced CostDefinitionThe reduced cost associated with the nonnegativity constraint foreach variable is the shadow price of that constraint (i.e., thecorresponding change in the objective function per unit increase inthe lower bound of the variable).
(FEUP | DEGI) Operations Research 2012/2013 51 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
52/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios Bottles Reduced costs
What will be the reduction of the prot if we must produce at least one batch of favaios bottles?
50x VP +30 x A +50 x F = 20003x VP +5 x A +5 x F = 200
x F = 1
50x VP +30 x A +50 = 20003x VP +5 x A +5 = 200x F = 1
50x VP +30 x A = 19503x VP +5 x A = 195
x F = 1
x VP = 195 / 8x A = 195 / 8
x F = 1
(x VP , x A, x F ) = ( 1958 , 195
8 , 1)
Z = 50 1958 + 60 195
8 + 20 1 = 2701 , 25Prot reduction:2750 2701 , 25 = 48 , 75 = 48 34
x VP x A x F s 1 s 2 s 3
x VP 1 0 5
81
32 0 316 25
s 2 0 0 78
332 1
716 25
x A 0 1 5
8 3160 0
516 25
Z 0 0 48 34 716 0 9
38 2750
(FEUP | DEGI) Operations Research 2012/2013 52 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
53/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios Bottles Reduced costs
What will be the reduction of the prot if we must produce at least one batch of favaios bottles?
x VP x A x F s 1 s 2 s 3s 1 50 30 50 1 0 0 2000s 2 6 5 6 0 1 0 300s 3 3 5 5 0 0 1 200
Z 50 60 20 0 0 0 0
x VP x A x F s 1 s 2 s 3x VP 1 0 58
132 0
316 25
s 2 0 0 78 332 1 716 25x A 0 1 58
3160 0
516 25
Z 0 0 48 34 716 0 9
38 2750
We can compute the reduced cost of x F in a different way by computing theoportunity cost for producing 1 batch of favaios bottles:50 716 + 6 0+5 9
38 = 21
78 + 46
78 =
68 34As the revenue of 1 batch of favaiosbottles is 20, the prot will change by20 68 34 = 48
34
(FEUP | DEGI) Operations Research 2012/2013 53 / 103
General DiscussionFundamental relationship between shadow prices, reduced
t d th bl d t
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
54/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
costs, and the problem data.
Shadow x 1 . . . x n s 1 . . . s m price
s 1 a11 . . . a1n 1 . . . 0 b 1 y 1...
......
......
......
s m am1 . . . amn 0 . . . 1 b m y m Z c 1 . . . c n 0 . . . 0 0
At the nal tableau:
Z c 1 . . . c n c n+1 . . . c n+ m z 0= . . . = y 1 . . . y m
Recall that, at each iteration of the simplex method, the objective function is transformed by subtracting fromit a multiple of the row in which the pivot was performed. Consequently, the nal form of the objective functioncould be obtained by subtracting multiples of the original constraints from the original objective function.Consider rst the nal objective coefficients associated with the original basic variables: s 1 , . . . , s m . Let 1 ,. . . , m be the multiples of each row that are subtracted from the original objective function to obtain its nalform. Since s i appears only in the i th constraint and has a +1 coefficient we should havec n+ i = 0 1 i = i = y i . Thus the shadow prices are the multiples i .Since these multiples can be used to obtain every objective coefficient in the nal form, the reduced cost c j of variable x j is given by c j = c j mi =1 aij y i ( j = 1 . . . n).Since c j = 0 for the m basic variables: 0 = c j mi =1 aij y i (for j basic). This is a system of m equations in munknowns that uniquely determines the values of the shadow prices y i .The current value of the objective function is z 0 = mi =1 b i y i , z 0 =
mi =1 b i y i
(FEUP | DEGI) Operations Research 2012/2013 54 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
55/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Variation in the objective coefficientsHow much the objective-function coefficients can vary withoutchanging the values of the decision variables in the optimal solution?
We will make the changes one at a time, holding all othercoefficients and righthand-side values constant.
(FEUP | DEGI) Operations Research 2012/2013 55 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
56/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios BottlesVariation in the objective coefficient of x
F
Suppose that we increase the objective function coefficient of x F in the original problemformulation by c F :In applying the simplex method, multiples of the rows were subtracted from the objective functionto yield the nal system of equations. Therefore, the objective function in the nal tableau willremain unchanged except for the addition of c F x F .
x VP x A x F s 1 s 2 s 3s 1 50 30 50 1 0 0 2000s 2 6 5 6 0 1 0 300s 3 3 5 5 0 0 1 200
Z 50 60 20 + c F 0 0 0 0
x VP x A x F s 1 s 2 s 3x VP 1 0 58
132 0
316 25
s 2 0 0 78 332 1
716 25
x A 0 1 58 3160 0
516 25
Z 0 0 48 34 + c F 716 0 9
38 2750
x F will become a candidate toenter the basis, only when itsobjective-function coefficient ispositive.The optimal solution remains un-
changed as long as: 48 34 + c F 0
c F 48 34
(FEUP | DEGI) Operations Research 2012/2013 56 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
57/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios BottlesVariation in the objective coefficient of x
VP
x VP x A x F s 1 s 2 s 3s 1 50 30 50 1 0 0 2000s 2 6 5 6 0 1 0 300s 3 3 5 5 0 0 1 200
Z 50 60 20 0 0 0 0+ c
VP
x VP x A x F s 1 s 2 s 3x VP 1 0 58
132 0
316 25
s 2 0 0 78 332 1
716 25
x A 0 1 58 3160 0
516 25
Z c VP 0 48 34 716 0 9
38 2750
x VP x A x F s 1 s 2 s 3x VP 1 0 581
32 0 316 25
s 2 0 0 78 332 1
716 25
x A 0 1 58 3160 0
516 25
Z 0 0 48 34 716 0 9
38 2750
0 0 58 c VP 132 c VP 0 +
316 c VP 25 c VP
The current solution re-mains unchanged while:
48 34 58 c VP 0
( c VP 78) 716 132 c VP 0
( c VP 14) 9 38 +
316 c VP 0
( c VP 50)
Taking the most limiting in-equalities, the bounds on c VP are:
14 c VP 50 14+50 c new VP 50+50
36 c new VP 100
(FEUP | DEGI) Operations Research 2012/2013 57 / 103
General DiscussionRanges of the cost coefficients in the optimal solution.
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
58/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Shadow x 1 . . . x n s 1 . . . s m price
s 1 a11 . . . a1n 1 . . . 0 b 1 y 1...
.
.....
.
.....
.
.....
s m am1 . . . amn 0 . . . 1 b m y m Z c 1 . . . c n 0 . . . 0 0
At the nal tableau: Z c 1 . . . c n c n+1 . . . c n+ m z 0
If x j is a non-basic variable at the final tableau with objective function coefficient c j that waschanged to c new j = c j + c j , then the current solution remains unchanged so long as the new reducedcost c new j remains nonnegative, that is, c
new j = c j + c j
mi =1 aij y i = c j + c j 0.
The range on the variation of the objective-function coefficient of a nonbasic variable is then given by: < c j < c j ; ( < c j + c j = c new j < c j c j ).
If x r is a basic variable at the final tableau with objective function coefficient c r that was changed toc new r = c r + c r , then c
new r = c r + c r
mi =1 aij y i = c r + c r .
Since x r is a basic variable, c r = 0. So, to recover a canonical form with c new r = 0, we subtract c r times the rth constraint in the nal tableau from the nal form of the objective function, obtaining newreduced costs for all nonbasic variables: c new j = c j a rj c r , where arj is the coefficient of variable x j inthe rth constraint in the nal tableau.For all basic variables c new j = 0 and the current basis remains optimal if c
new j 0.
The range on the variation of the objective-function coefficient is:
Max j c j arj
| a rj > 0 c r Min j c j arj
| a rj < 0
(FEUP | DEGI) Operations Research 2012/2013 58 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
59/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Variations on the righthand-side values
(FEUP | DEGI) Operations Research 2012/2013 59 / 103
P d i Pl i BA
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
60/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios BottlesVariations on the righthand-side values
Varying the righthand-side value of a constraint that is non-binding in the optimal solution:the warehouse constraint.
x VP
x A
x F
s 1
s 2
s 3s 1 50 30 50 1 0 0 2000
s 2 6 5 6 0 1 0 300 + b 2s 3 3 5 5 0 0 1 200
Z 50 60 20 0 0 0 0
x VP x A x F s 1 s 2 s 3
x VP 1 0 5
81
32 0 316 25s 2 0 0 78
332 1
716 25 + b 2
x A 0 1 58 3160 0
516 25
Z 0 0 48 34 716 0 9
38 2750
We add an amount b 2 to the right-hand side of the warehouse constraint.s 2 was basic in the initial tableau and isbasic in the optimal tableau.
6 25+5 25+6 0+ s 2 = 300+ b 2s 2 = 25 + b 2
In order to keep the solution feasible:
25 + b 2 0 b 2 25
b new 2 = 300 + b 2 275
(FEUP | DEGI) Operations Research 2012/2013 60 / 103
P d ti Pl i t BA
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
61/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Production Planning at BAProducing Favaios BottlesVariations on the righthand-side valuesVarying the righthand-side value of a constraint that is binding in the optimal solution:the decoration constraint.
We add an amount b 3 to the righthand side
of the decoration constraint.This is equivalent to decreasing the value of theslack variable s 3 by b 3 , that is substituting s 3by s 3 b 3 in the original problem formulation.s 3 , which is zero in the nal solution, is changedto s 3 = b 3
x VP = 25 316 b 3 0 that is b 3 25 16
3
s 2 = 25 716 b 3 0 that is b 3
25 16
7x A = 25 + 516 b 3 0 that is b 3 5 1625 16
7 b 3 80200 + 25 167 b
new 3 200 80
x VP x A x F s 1 s 2 s 3s 1 50 30 50 1 0 0 2000s 2 6 5 6 0 1 0 300s 3 3 5 5 0 0 1 200 + b 3
Z 50 60 20 0 0 0 0
x VP x A x F s 1 s 2 s 3x VP 1 0
58
132 0
316 25
316 b 3
s 2 0 0 78
332 1
716 25
716 b 3
x A 0 1 5
8 3160 0
516 25 +
516 b 3
Z 0 0 48 34 716 0 9
38 2750 9
38 b 3
For b new 3 < 200 80 ( b 3 < 80) the basic variable x Abecomes negative.
What variable should enter the basis to take its place?In order for the new basis to be an optimal solution, the en-tering variable must be chosen so that the reduced costs arenot allowed to become positive.
(FEUP | DEGI) Operations Research 2012/2013 61 / 103
x VP x A x F s 1 s 2 s 3x VP 1 0
58
132 0
316 25
316 b 3
s 2 0 0 1 58
332 1
716 25
716 b 3
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
62/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
2 8 32 16 16 3x A 0 1
58
3160 0
516 25 +
516 b 3
Z 0 0 48 34 716 0 9
38 2750 9
38 b 3
The nal tableau for b new 3
= 120 ( b 3 = 80) will be:
x VP x A x F s 1 s 2 s 3x VP 1 0
58
132 0
316 40
s 2 0 0 78
332 1
716 60
x A 0 1 5
8 3160 0
516 0
Z 0 0 48 34 716 0 9
38 2480
For b new 3 < 120 the basic variable x A becomes negative.
What variable should enter the basis to take its place?In order for the new basis to be an optimal solution, the entering variable must be chosen so that the reducedcosts are not allowed to become positive.Regardless of which variable enters the basis, the entering variable will be isolated in row 3 of the nal tableauto replace x A, which leaves the basis.To isolate the entering variable, we must perform a pivot operation, and a multiple, say t, of row 3 in the naltableau will be subtracted from the objective-function row.
x VP x A x F s 1 s 2 s 3
x VP 1 0 5
81
32 0 316 40
s 2 0 0 78
332 1
716 60
x A 0 1 5
8 3160 0
516 0
Z 0 0 48 34 716 0 9
38 2480
t t 58 + t 3160 t
516 t 0
(FEUP | DEGI) Operations Research 2012/2013 62 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
63/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
x VP x A x F s 1 s 2 s 3x VP 1 0 58
132 0
316 40
s 2
0 0 78
332
1 716
60x A 0 1 58
3160 0
516 0
Z 0 0 48 34 716 0 9
38 2480
t t 58 + t 3160 t
516 t 0
t 0 that is t 0 48 34 t
58 0 that is t
2885
716
+ t 3160
0 that is t 703 9 38 t
516 0 that is t 30
0 t 703Since the coefficient of s 1 is most constraining on t, s 1 will enter the basis. Note that the rangeon the righthand-side value and the variable transitions that would occur if that range wereexceeded by a small amount are easily computed. However, the pivot operation actually
introducing s 1 into the basis and eliminating x A need not be performed.
(FEUP | DEGI) Operations Research 2012/2013 63 / 103
General DiscussionVariations in the Righthand-Side values.
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
64/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
x 1 . . . x n s 1 . . . s ms 1 a11 . . . a1n 1 . . . 0 b 1
......
......
......
s m am1 . . . amn 0 . . . 1 b m Z c 1 . . . c n 0 . . . 0 0
At the nal tableau:x 1 . . . x n s 1 . . . s m
s 1 a11 . . . a1n 11 . . . 1m b 1...
......
......
...s m am1 . . . amn m1 . . . mm b m
Z c 1 . . . c n c n+1 . . . c n+ m z 0As this is a canonical form, aij and ij in the nal tableau will be structured so that one basic variable isisolated in each contraint.We can change the coefficient b k in the kth righthand-side by b k with all the other data held xed, simply bysubstituting s k b k for s k in the initial tableau. To see how this change affects the updated righthand-sidecoefficients, we make the same substitution in the nal tableau. The terms ik s k become ik (s k b k ) = ik s k ik b k . As ik b k is a constant, we move it to the righthand side to give modiedrighthand-side values b i + ik b k for (i = 1 , 2, . . . , m).
(FEUP | DEGI) Operations Research 2012/2013 64 / 103
As long as all of these values are nonnegative the basis specied by the nal tableau remains
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
65/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
As long as all of these values are nonnegative, the basis specied by the nal tableau remainsoptimal, since the reduced costs have not been changed. Consequently, the current basis isoptimal whenever b i + ik b k 0 for (i = 1 , 2, . . . , m) or equivalently,
Max i b
i ik | ik > 0 b k Mini b
i ik | ik < 0When b k reaches either its upper or lower bound any further increase (or decrease) in its valuemakes one of the updated righthand sides, say b r + rk b k negative. At this point the basicvariable in row r leaves the basis, and we must pivot in row r of the nal tableau to nd thevariable to be introduced in its place. Since pivoting subtracts a multiple t of the pivot row fromthe objective equation, the new objective equation has coefficients c j ta rj ( j = 1 , 2, . . . , n).For the basis to be optimal, each of these coefficients must be nonpositive. Since c
j = 0 for the
basic variable being dropped and since its coefficient in costraint r is arj = 1, we must have t 0.For any nonnegative t, the updated coefficient c j ta rj for any other variable remains nonpositiveif arj 0. Consequently we need only to consider arj < 0, and t is given by:t = Min j
c j arj
| a rj < 0The index u giving this minimum has c u ta ru = 0, and the corresponding variable x u canbecome the new basic variable in row r by pivoting on aru . Note that the pivot is made on anegative coefficient.
(FEUP | DEGI) Operations Research 2012/2013 65 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
66/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Alternative optimal solutionsAs in the case of the objective function and righthand-side ranges,the nal tableau of the linear program tells us somethingconservative about the possibility of alternative optimal solutions.
If all reduced costs of the nonbasic variables are strictly negative(positive) in a maximization (minimization) problem, then there isno alternative optimal solution, because introducing any variableinto the basis at a positive level would reduce (increase) the value of the objective function.
If one or more of the reduced costs are zero, there may exist
alternative optimal solutions.
(FEUP | DEGI) Operations Research 2012/2013 66 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
67/103
Alternative Shadow PricesExample
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
68/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
x VP x A x F s 1 s 2 s 3
x VP 1 0 581
32 0 316 40
s 2 0 0 78 332 1
716 60
x A 0 1 5
8 3160 0
516 0
Z 0 0 48 34 716 0 9
38 2480
Since the righthand-side value in row 3 is zero, it is possible to take x A (basic variable in row 3)out of the basis as long as there is a variable to introduce into the basis.The candidates to be introduced into the basis are x F , s 1 and s 3 , the one that corresponds to:
Min j c j arj | arj < 0 = Min 716
3160 s 1 will enter the basis.
(FEUP | DEGI) Operations Research 2012/2013 68 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
69/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Duality in Linear Programmingbased on:Bradley, Hax, and Magnanti; AppliedMathematical Programming, Addison-Wesley,
1977Chapter 4, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6 and 4.7
(FEUP | DEGI) Operations Research 2012/2013 69 / 103
Duality in Linear Programming
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
70/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
In the preceding chapter on sensitivity analysis, we saw that the shadow-price interpretation of the
optimal simplex multipliers is a very useful concept.First, these shadow prices give us directly the marginal worth of an additional unit of any of theresources.Second, when an activity is priced out using these shadow prices, the opportunity cost of allocating resources to that activity relative to other activities is determined.Duality in linear programming is essentially a unifying theory that develops the relationshipsbetween a given linear program and another related linear program stated in terms of variableswith this shadow-price interpretation.The importance of duality is twofold:First, fully understanding the shadow-price interpretation of the optimal simplex multipliers canprove very useful in understanding the implications of a particular linear-programming model.Second, it is often possible to solve the related linear program with the shadow prices as thevariables in place of, or in conjunction with, the original linear program, thereby taking advantageof some computational efficiencies.
(FEUP | DEGI) Operations Research 2012/2013 70 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
71/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Duality in Linear ProgrammingLearning Objectives
Write the dual problem of a linear programming problem.
Understand the:
weak duality property,optimality property,unboundedness property,strong duality property.
Verify that the complementary slackness conditions hold for a given problem.
Apply the dual simplex method.
Apply the parametric primal-dual algorithm.
(FEUP | DEGI) Operations Research 2012/2013 71 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
72/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
A Preview of Duality
(FEUP | DEGI) Operations Research 2012/2013 72 / 103
Production Planning at BA
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
73/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
g
The factory of Barbosa & Almeida (BA) in Avintes produces glass containers through mouldinjection.BA recently won two new clients and intends to assign this production to one of its furnaces. Theorders were of bottles of Sandeman Ruby Port (75cl), one liter bottles of olive oil Oliveira da Serraand one liter bottles of Favaios Moscatel. The customers buy all the bottles that BA can produce.Due to differences in the production (number of cavities and different cycle times), each batch of portwine bottles takes 50 hours to produce, whereas each batch of oil bottles requires only 30hours and a batch of favaios takes 50 hours to produce. There are a total of 2000 hours availableat the oven.Moreover we must also consider the capacity available in the decoration sector (e.g. labels,packaging), which is 200 hours. The portwine bottles spend 3 hours per batch, the olive oilbottles 5 hours per batch and the favaios bottles also 5 hours per batch.
Barbosa & Almeida wants to maximize the prot from these two orders, knowing that the protper batch is 50 e 60e and 20e , respectively.
(FEUP | DEGI) Operations Research 2012/2013 73 / 103
Production Planning at BA
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
74/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Decision variablesx VP Number of batches of Vinho do Porto Ruby Sandeman bottles to produce;
x A Number of batches of Azeite Oliveira da Serra bottles to produce;x F Number of batches of Favaios bottles to produce.
Objective:max Z = 50 x VP + 60 x A + 20 x F
Subject to:50x VP +30 x A +50 x F 2000 (time in the oven)
3x VP +5 x A +5 x F 200 (capacity in the decoration sector)x VP , x A, x F 0
In this model x VP , x A and x F may not be integer.
(FEUP | DEGI) Operations Research 2012/2013 74 / 103
Production Planning at BA
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
75/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Shadow prices
x VP x A x F s O s D s O 50 30 50 1 0 2000s D 3 5 5 0 1 200
Z 50 60 20 0 0 0
At the nal tableau:x VP x A x F s O s D
x VP 1 0 581
32 316 25
x A 0 1 5
8 3160
516 25
Z 0 0 48 34 716 9
38 2750
The shadow prices, y O for the oven ca-pacity and y D for the decoration ca-
pacity can be determined from the naltableau as the negative of the reducedcosts associated with the slack variabless O and s D .Thus these shadow prices are y O = 716and y D = 9 38
(FEUP | DEGI) Operations Research 2012/2013 75 / 103
Economic properties of the shadow prices associated withthe resources
Shadow
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
76/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Shadow x 1 . . . x n s 1 . . . s m price
s 1 a11 . . . a1n 1 . . . 0 b 1 y 1...
......
......
......
s m am1 . . . amn 0 . . . 1 b m y m Z c 1 . . . c n 0 . . . 0 0
At the nal tableau: Z c 1 . . . c n c n+1 . . . c n+ m z 0
Reduced costs in terms of shadow prices:c j = c j mi =1 aij y i ( j = 1 . . . n)
aij is the amount of resource i used per unit of activity j , and y i is the imputed value of thatresource.The term
mi =1 aij y i is the total value of the resources used per unit of activity j and is thus the
marginal resource cost per unit of activity j .If we think of the objective coefficients c j as being marginal revenues, the reduced costs
c j = c j mi =1 aij y i ( j = 1 . . . n)
are simply net marginal revenues (i.e., marginal revenue minus marginal cost).
(FEUP | DEGI) Operations Research 2012/2013 76 / 103
Production Planning at BAR d d ( i l ) f h f
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
77/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Reduced cost (net marginal revenue) for each type ofbottle (decision variable)
x VP x A x F s O s D s O 50 30 50 1 0 2000s D 3 5 5 0 1 200
Z 50 60 20 0 0 0At the nal tableau:
x VP x A x F s O s D
x VP 1 0 58 132 316 25
x A 0 1 58 3160
516 25
Z 0 0 48 34 716 9
38 2750
For the basic variables the reduced costs arezero.The marginal revenue is equal to themarginal cost for these activities.For all nonbasic variables the reduced costsare negative.The marginal revenue is less than themarginal cost for these activities, so theyshould not be pursued.
Shadow price for the oven capacity: y O = 716 .Shadow price for the decoration capacity: y D = 9 38 .Net marginal revenue for the production of portwine bottles:c VP = c VP mi =1 aiVP y i = 50 (50
716 + 3 9
38 ) = 0
Net marginal revenue for the production of azeite bottles:c A = c A mi =1 aiAy i = 60 (30
716 + 5 9
38 ) = 0
Net marginal revenue for the production of favaios bottles:c F = c F mi =1 aiF y i = 20 (50
716 + 5 9
38 ) = 48
34
(FEUP | DEGI) Operations Research 2012/2013 77 / 103
Production Planning at BASh d i ( i ) i d i h h
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
78/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Shadow prices (opportunity costs) associated with theconsumption of the resources (constraints)
x VP x A x F s O s D s O 50 30 50 1 0 2000s D 3 5 5 0 1 200
Z 50 60 20 0 0 0At the nal tableau:
x VP x A x F s O s D
x VP 1 0 581
32 316 25
x A 0 1 58 3160
516 25
Z 0 0 48 34
716
9 38
2750
If we value the total resources at the shadow prices, we nd their value is exactly equal to theoptimal value of the objective function:
2000 716 + 200 938 = 2750
(FEUP | DEGI) Operations Research 2012/2013 78 / 103
Production Planning at BAC h d i b d t i d di tl ?
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
79/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Can shadow prices be determined directly?
For a maximization decision problem, the shadow prices must satisfy the requirement thatmarginal revenue be less than or equal to marginal cost for all activities.The shadow prices must be nonnegative since they are associated with less-than-or-equal-toconstraints in a maximization decision problem.Imagine that BA does not own its productive capacity but has to rent it. In this case the
shadow prices could be seen as rent rates.
Objective:max Z = 50 x VP + 60 x A + 20 x F
Subject to:
50x VP + 30 x A + 50 x F 20003x VP + 5 x A + 5 x F 200
x VP , x A, x F 0
Objective:min V = 2000 y O + 200 y D
Subject to:
50y O + 3 y D 5030y O + 5 y D 6050y O + 5 y D 20
y O , y D 0
(FEUP | DEGI) Operations Research 2012/2013 79 / 103
Production Planning at BAPrimal and Dual Decision Problems
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
80/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Primal and Dual Decision Problems
PRIMAL Decision Problem:Objective:
max Z = 50 x VP + 60 x A + 20 x F Subject to:
50x VP + 30 x A + 50 x F 20003x VP + 5 x A + 5 x F 200
x VP , x A, x F 0
Optimal solution:x VP = 25x A = 25x F = 0Z = 2750with shadow prices:y O = 716y D = 9 38
DUAL Decision Problem:Objective:
min V = 2000 y O + 200 y D Subject to:50y O + 3 y D 50
30y O + 5 y D 6050y O + 5 y D 20
y O , y D 0
Optimal solution:y O = 716y D = 9 38V = 2750with shadow prices:x VP = 25x A = 25x F = 0
(FEUP | DEGI) Operations Research 2012/2013 80 / 103
Production Planning at BARequirements of the optimality conditions of the Simplex
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
81/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Requirements of the optimality conditions of the SimplexMethod
The reduced costs of the basicvariables are zero.If a decision variable of the primal is positive, then thecorresponding constraint in the dual must hold withequality.
If x VP 0 then c VP = 50 (50y O + 3 y D ) = 0
If x A 0 then c A = 60 (30y O + 5 y D ) = 0
The variables with negativereduced costs are nonbasicvariables (zero valued)If a constraint holds as a strict inequality, then thecorresponding decision variable must be zero.
If c F = 20 (50y O + 5 y D ) < 0 then x F = 0
If a shadow price is positive,then the correspondingconstraint must hold withequality.
If y O > 0 then 50 x VP + 30 x A + 50 x F = 2000If y D > 0 then 3x VP + 5 x A + 5 x F = 200
(FEUP | DEGI) Operations Research 2012/2013 81 / 103
Complementary Slackness Conditions
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
82/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
If a primal variable ispositive,then its corresponding(complementary) dualconstraint holds withequality.
If a dual constraint holdswith strict inequality,then its corresponding(complementary) primalvariable must be zero.
(FEUP | DEGI) Operations Research 2012/2013 82 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
83/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Finding the dual in generalDenition of the dual problem
(FEUP | DEGI) Operations Research 2012/2013 83 / 103
PRIMAL is a maximization problem
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
84/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
PRIMAL
Objective:max Z =
n
j =1c j x j
Subject to:n
j =1
aij x j b i (i = 1 , 2, . . . , m )
n
j =1aij x j b i (i = m , 2, . . . , m )
n
j =1aij x j = b i (i = m , 2, . . . , m)
x j 0 ( j = 1 , 2, . . . , n)
DUAL
Objective:min V =
m
i =1b i y i +
m
i = m +1
b i y i +m
i = m +1
b i y i
Subject to:
m
i =1aij y i +
m
i = m +1aij y i +
m
i = m +1aij y i c j ( j = 1 , 2, . . . , n)
y i 0 (i = 1 , . . . , m )
y i 0 (i = m + 1 , . . . , m )
y i R (i = m + 1 , . . . , m)
(FEUP | DEGI) Operations Research 2012/2013 84 / 103
PRIMAL is a minimization problem
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
85/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
PRIMAL
Objective:min Z =
n
j =1c j x j
Subject to:n
j =1
aij x j b i (i = 1 , 2, . . . , m )
n
j =1aij x j b i (i = m , 2, . . . , m )
n
j =1aij x j = b i (i = m , 2, . . . , m)
x j 0 ( j = 1 , 2, . . . , n)
DUAL
Objective:max V =
m
i =1b i y i +
m
i = m +1
b i y i +m
i = m +1
b i y i
Subject to:
m
i =1aij y i +
m
i = m +1aij y i +
m
i = m +1aij y i c j ( j = 1 , 2, . . . , n)
y i 0 (i = 1 , . . . , m )
y i 0 (i = m + 1 , . . . , m )
y i R (i = m + 1 , . . . , m)
(FEUP | DEGI) Operations Research 2012/2013 85 / 103
Summary of the correspondences between PRIMAL andDUAL decision problems
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
86/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Primal (Maximize) Dual (Minimize)i th constraint i th variable 0i th constraint i th variable 0i th constraint = i th variable unrestricted
j th variable 0 j th constraint j th variable 0 j th constraint j th variable unrestricted j th constraint =
(FEUP | DEGI) Operations Research 2012/2013 86 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
87/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
The fundamental dualityproperties
(FEUP | DEGI) Operations Research 2012/2013 87 / 103
Weak duality property
PRIMAL DUAL
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
88/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
PRIMALObjective:
max Z = n j =1 c j x j Subject to:n
j =1a ij x j b i (i = 1 , 2, . . . , m)
x j 0 ( j = 1 , 2, . . . , n)
Objective:
min V = mi =1 b i y i Subject to:m
i =1aij y i c j ( j = 1 , 2, . . . , n)
y i 0 (i = 1 , . . . , m)
n j =1 c j x j
mi =1 b i y i
If x j , j = 1 , 2, . . . , n is a feasible solution to
the primal problemand y i , i = 1 , 2, . . . , m is a feasible solutionto the dual problem.
DUAL feasible V decreasing
PRIMAL feasible Z increasing
(FEUP | DEGI) Operations Research 2012/2013 88 / 103
Optimality property
PRIMAL DUAL
http://find/http://goback/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
89/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
PRIMALObjective:
max Z = n j =1 c j x j Subject to:n
j =1a ij x j b i (i = 1 , 2, . . . , m)
x j 0 ( j = 1 , 2, . . . , n)
Objective:min V = mi =1 b i y i Subject to:
m
i =1aij y i c j ( j = 1 , 2, . . . , n)
y i 0 (i = 1 , . . . , m)
If x j , j = 1 , 2 , . . . , n is a feasible solution to the primal problemand y i , i = 1 , 2 , . . . , m is a feasible solution to the dual problemand n j =1 c j x j =
mi =1 b i
y i
then x j , j = 1 , 2, . . . , n is an optimal solution for the primal problemand y i , i = 1 , 2, . . . , m is an optimal solution for the dual problem
(FEUP | DEGI) Operations Research 2012/2013 89 / 103
Unboundedness Property
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
90/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
If the PRIMAL problem hasan unbounded solutionthen the DUAL problem isinfeasible
If the DUAL problem has anunbounded solutionthen the PRIMAL problem isinfeasible
(FEUP | DEGI) Operations Research 2012/2013 90 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
91/103
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
92/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
The complementary slackness
(FEUP | DEGI) Operations Research 2012/2013 92 / 103
Complementary Slackness Property
I ti l l ti f li
For the PRIMAL linear programposed as a maximization problem with
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
93/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
In an optimal solution of a linear program: posed as a maximization problem withless-than-or-equal-to constraints, thismeans:
If the value of the dual variable(shadow price) associated with aconstraint is nonzero, then thatconstraint must be satisfied with
equality.
If y i > 0, then n j =1 aij x j = b i
If a constraint is satisfied withstrict inequality, then itscorresponding dual variable must be
zero.
If n j =1 aij
x j < b i then
y i = 0
(FEUP | DEGI) Operations Research 2012/2013 93 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
94/103
Optimality conditions
8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
95/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
If x j , j = 1 , 2 , . . . , n is a feasible solution to thePRIMAL problemand y i , i = 1 , 2 , . . . , m , is a feasible solution to theDUAL problem,then they are optimal solutions to these problems if,and only if, the complementary-slackness conditionshold for both the primal and the dual problems.
(FEUP | DEGI) Operations Research 2012/2013 95 / 103
http://find/http://goback/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
96/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
The dual Simplex Algorithm
(FEUP | DEGI) Operations Research 2012/2013 96 / 103
The DUAL Simplex Algorithm
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
97/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Solving the primal problem, moving throughsolutions (simplex tableaux) that are dual feasiblebut primal unfeasible. a
a Different from solving the DUAL problem with the (PRIMAL) simplex method
PRIMAL feasible: b i 0DUAL feasible: c i 0
An optimal solution is a solution that is both primaland dual feasible.
(FEUP | DEGI) O ti R h 2012/2013 97 / 103
DUAL Simplex Algorithm
Initialization: problem in canonical form with all c j 0.Optimality test :
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
98/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Optimality test :if b i 0 for all i = 1 , 2, . . . , m, then stop optimal solution found ;else:
Iterate :
Choose the variable to leave the basis by 4:
b r = min i b i |b i < 0 .
If arj 0 for j = 1 , 2, . . . , n, then stop the PRIMAL problem is infeasible (DUAL is unbounded) ;else choose the variable to enter the basis by 5:
c s ars = min i
c j arj
| arj < 0 .
Replace the basic variable in row r with variable in column s and reestablishthe canonical form (i.e. pivot on the coefficient ars ).
Return to the optimality test.
4nd the most promissing candidate for an improvement in feasibility5guarantee that c s 0 in each iteration
(FEUP | DEGI) O ti R h 2012/2013 98 / 103
The DUAL Simplex Algorithm An example
x 1 x 2 x 3 x 41 1 1 0 1 x4 leaves the basis because:
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
99/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
x 3 1 1 1 0 1
x 4 2 -3 0 1 2 Z 3 1 0 0 0
x 1 x 2 x 3 x 4
x 3 13 0 1 13
13
x 2 23 1 0 13 23
Z 73 0 0 13
23
x 1 x 2 x 3 x 4x 4 1 0 3 1 1x 2 1 1 1 0 1
Z 2 0 1 0 1
x 4 leaves the basis because:mini b i | b i < 0 = min { 1, 2} = 2x 2 enters the basis because:min j
c j arj
| a rj < 0 = min 3 2 , 1 3 =
13
x 3 leaves the basis because:mini b i | b i < 0 = min 13 =
13
x 4 enters the basis because:min j
c j arj
| a rj < 0 = min 73 13
, 13 13
= min {7, 1} = 1
All the b i are 0.Optimal solution:
(x 1 , x 2 , x 3 , x 4) = (0 , 1, 0, 1) and Z = 1
(FEUP | DEGI) O ti R h 2012/2013 99 / 103
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
100/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
Parametric PRIMAL-DUALAlgorithmPrimal-dual algorithms are useful whensimultaneous changes of both righthand-side andcost coefficients are imposed on a previousoptimal solution, and a new optimal solution isto be recovered.
(FEUP | DEGI) O i R h 2012/2013 100 / 103
Parametric PRIMAL-DUAL Algorithm an example IObjective:
max Z = 2x 1 + 3 x 2Subject to: This example can easily be put in canonical
http://find/8/10/2019 02.3 Chapter2 Solving Linear Programs.pdf
101/103
PORTOFEUP FACULDADE DE ENGENHARIA
UNIVERSIDADE DO PORTODEPARTAMENTO DE ENGENHARIA E GESTO INDUST RIAL
U.
j
x 1 + x 2 6 x 1 + 2 x 2
12
x 1 3x 2 1x 1 , x 2 0
x 1 x 2 x 3 x 4 x 5x 3 1 1 1 0 0 6x 4 1 2 0 1 0 12x 5 1 3 0 0 1 1
Z 2 3 0 0 0 0
x 1 x 2 x 3 x 4 x 5
x 3 1 1 1 0 0 6x 4 1 2 0 1 0 12 + x 5 1 3 0 0 1 1 +
Z 2 3 0 0 0 0
p y pform by addition of slack variables.
However, neither primal feasibility nor primaloptimality conditions will be satised.
We will arbitrarily consider the example as afunction of the parameter .If we choose large enough, i.e. 3,this system of e