Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Week 10

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Optimal Design

Week 10
Arora 8.4-8.6
Calculation of Basic Solutions and
the Simplex Method

1
Tableau: Representation of all necessary
information related to an LP problem

Example 1:
𝑥1 + 𝑥2 + 𝑥3 = 10
2𝑥1 + 1.25𝑥2 + 𝑥4 = 14 Form: 𝑨𝒙 = 𝒃
5𝑥1 + 2𝑥2 + 𝑥5 = 30

Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30

2
Calculation of Basic Solutions using the Tableau

Systematically search the basic feasible solutions for the


optimum design
1. Start with a basic feasible solution
2. Interchange one current basic variable with a nonbasic
variable
a) Perform pivot step of Gauss-Jordan elimination
b) Write results in new canonical form (general solution)
3. Evaluate cost function at new basic solution
4. Repeat until all basic solutions are found
5. Select basic feasible solution with minimum cost as optimal
design

3
Example 2:

Maximize
𝑧 = 4𝑥1 + 5𝑥2
Subject to
−𝑥1 + 𝑥2 ≤4
𝑥1 + 𝑥2 ≤ 6
𝑥1 , 𝑥2 ≥ 0

Figure 8.2 Graphical solution to the Example 8.3 LP


problem. Optimum point = (1, 5), z*=29.

4
Introduction to Optimum Design 3e. Copyright © 2012 Elsevier, Inc. All rights reserved.
Example 2:

Minimize
𝑓 = −4𝑥1 − 5𝑥2
Subject to
−𝑥1 + 𝑥2 + 𝑥3 =4
𝑥1 + 𝑥2 + 𝑥4 = 6
𝑥𝑖 ≥ 0, i = 1 to 4

Basic x1 x2 x3 x4 b
1. x3 -1 1 1 0 4
2. x4 1 1 0 1 6

5
Introduction to Optimum Design 3e. Copyright © 2012 Elsevier, Inc. All rights reserved.
Example 2: Interchange roles of x1 and x4

Initial tableau
Basic x1 x2 x3 x4 b
1. x3 -1 1 1 0 4
2. x4 1 1 0 1 6

Perform Gauss elimination using a21 as pivot element

Second tableau
Basic x1 x2 x3 x4 b
1. x3 0 2 1 1 10
2. x1 1 1 0 1 6

6
Example 3:
Minimize
16
𝑓 = −40𝑥1 − 60𝑥2
Subject to 14
𝑥1 + 𝑥2 ≤ 10
12
2𝑥1 + 1.25𝑥2 ≤ 14
5𝑥1 + 2𝑥2 ≤ 30 10
𝑥1 , 𝑥2 ≥ 0

x2
8

Constraint equations after transcription 6 -400


to standard LP problem form: -800
4

𝑥1 + 𝑥2 + 𝑥3 = 10 2 -600
2𝑥1 + 1.25𝑥2 + 𝑥4 = 14 -200
5𝑥1 + 2𝑥2 + 𝑥5 = 30 0
0 5 10 15
𝑥𝑖 ≥ 0, i = 1 to 5 x1

Initial tableau
Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
7
Example 3: Interchange roles of x1 and x4

Initial tableau
Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
Nonbasic variables: x1 = x2 = 0, Basic variables: x3 = 10, x4 = 14, x5 = 30

Second tableau
Basic x1 x2 x3 x4 x5 RS:b
4. x3 0 0.375 1 -0.5 0 3
5. x1 1 0.625 0 0.5 0 7
6. x5 0 -1.125 0 -2.5 1 -5
Nonbasic variables: x2 = x4 = 0, Basic variables: x1 = 7, x3 = 3, x5 = -5

8
Example 3
16

14

12

10
x2
8

6 -400
-800
4

2 -600
-200
0
0A 5 B 10 15
x1

Basic Solution A: Basic Solution B:


x1 = 0 x1 = 7
x2 = 0 x2 =0
x3 = 10 x3 = 3 Infeasible
x4 = 14 x4 = 0
x5 = 30 x5 = -5
f=0 f = -280 9
The Simplex Method

• A Simplex in n-dimensional space is a convex hull* of any


(n+1) points that do not lie on one hyperplane
– In 2-D space: 3 points that do not lie on a straight line
– In 3-D space: 4 points that do not all lie in the same plane
• A Simplex represents a convex set
• The Simplex method uses Gauss-Jordan elimination to
proceed from one basic feasible solution to another while
continuously decreasing the cost function until the minimum
is reached
• The Simplex method never calculates basic infeasible
solutions

* Convex hull – The smallest convex set containing all specified points
10
The Simplex Method

Cost function
• To initialize the Simplex method, the cost function must be in
terms of the nonbasic variables only
• Cost coefficients of nonbasic variables are called the reduced
cost coefficients, c’j
• At the end of each Simplex iteration, the cost function must
again be in terms of the nonbasic variables only
– Write 𝑓 = 𝒄𝑻 x as the last row of the tableau
– Coefficients of nonbasic columns of last row are c’j
• If all of the reduced cost coefficients are non-negative (c’j ≥ 0),
then the current basic feasible solution is optimum
• If not, a negative coefficient c’j determines which nonbasic
variable needs to become basic to reduce the cost function

11
Example 3: Solution by Simplex method
Minimize
16
𝑓 = −40𝑥1 − 60𝑥2
Subject to 14
𝑥1 + 𝑥2 ≤ 10
12
2𝑥1 + 1.25𝑥2 ≤ 14
5𝑥1 + 2𝑥2 ≤ 30 10
𝑥1 , 𝑥2 ≥ 0

x2
8

Constraint equations after transcription 6 -400


to standard LP problem form: -800
4

𝑥1 + 𝑥2 + 𝑥3 = 10 2 -600
2𝑥1 + 1.25𝑥2 + 𝑥4 = 14 -200
5𝑥1 + 2𝑥2 + 𝑥5 = 30 0
0A 5 B 10 15
𝑥𝑖 ≥ 0, i = 1 to 5 x1

Initial tableau
Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
4. Cost -40 -60 0 0 0 f 12
Example 3: Solution by Simplex method

Initial Basic x1 x2 x3 x4 x5 RS:b


tableau 1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
4. Cost -40 -60 0 0 0 f

Second Basic x1 x2 x3 x4 x5 RS:b


tableau
5. x2 1 1 1 0 0 10
6. x4 0.75 0 -1.25 1 0 1.5
7. x5 3 0 -2 0 1 10
8. Cost 20 0 60 0 0 f+600

13
Example 3: Solution by Simplex method
16

14

12

10
x2 C
8

6 -400
-800
4

2 -600
-200
0
0A 5 10 15
x1

Basic Solution A: Basic Solution C:


x1 = 0 x1 = 0
x2 = 0 x2 = 10
x3 = 10 x3 = 0
x4 = 14 x4 = 1.5
x5 = 30 x5 = 10
f=0 f = -600 14
Notes on Simplex Method
• If we do not select the row with the
smallest positive ratio b/(jth column
element), the new basic solution may not
Figure 3.7 Example
be feasible problem with multiple
• If a reduced cost coefficient c’j solutions.
corresponding to a nonbasic variable is
zero, the problem may have multiple
solutions
– If the nonbasic variable associated with a zero
reduced cost coefficient can be made basic by
using the pivot step procedure, the extreme
point (vertex) corresponding to an alternate
solution is obtained
– Any point on the line segment joining the two
extreme points is also an optimum point
– Multiple global optima, no strict global
optimum Figure 3.8
Example problem
• If there is no positive element in the jth with an
column, then the feasible set is unbounded
unbounded and the cost function can be solution.
made arbitrarily small

15
Introduction to Optimum Design 3e. Copyright © 2012 Elsevier, Inc. All rights reserved.
The Two-Phase Simplex Method

• Extension of the Simplex method to handle “≥” type


constraints and equality constraints
• The Simplex method must be initiated with a basic feasible
solution
– This is immediately available if only “≤” type constraints are present
– If the problem includes other types of constraints, we introduce
artificial variables and define an auxiliary minimization LP problem
• Phase I: Solve the auxiliary minimization problem
– Minimize the artificial cost function, 𝑤 =
σ 𝑎𝑙𝑙 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠
– Obtain a basic feasible solution for the original problem
• Phase II: Solve the original LP problem

16
Example 4: Introduction of Artificial Variables

Maximize
z = 𝑥1 + 4𝑥2
Subject to
𝑥1 + 2𝑥2 ≤ 5
2𝑥1 + 𝑥2 = 4
−𝑥1 + 𝑥2 ≤ −1
𝑥1 , 𝑥2 ≥ 0

Introduce slack variable x3 ≥ 0 and surplus variable x4 ≥ 0:

Minimize
f = −𝑥1 − 4𝑥2
Subject to
𝑥1 + 2𝑥2 + 𝑥3 = 5
2𝑥1 + 𝑥2 = 4 Not in canonical form!
𝑥1 − 𝑥2 − 𝑥4 = 1
𝑥𝑖 ≥ 0; 𝑖 = 1 to 4

17
Example 4: Introduction of Artificial Variables

Introduce artificial variables x5 ≥ 0 and x6 ≥ 0

Re-write constraints:
𝑥1 + 2𝑥2 + 𝑥3 = 5
2𝑥1 + 𝑥2 + 𝑥5 = 4
𝑥1 − 𝑥2 − 𝑥4 + 𝑥6 = 1
𝑥𝑖 , ≥ 0; 𝑖 = 1 to 4

Initial tableau for Phase I auxiliary problem


Basic x1 x2 x3 x4 x5 x6 RS:b
1. x3 1 2 1 0 0 0 5
2. x5 2 1 0 0 1 0 4
3. x6 1 -1 0 -1 0 1 1

Initial basic feasible solution for auxiliary problem:


Nonbasic variables: x1 = 0, x2 = 0, x4 = 0
Basic variables: x3 = 5, x5 = 4, x6 = 2

Artificial cost function: 𝑤 = σ 𝑎𝑙𝑙 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠 = 𝑥5 + 𝑥6 18


Example 4: Introduction of Artificial Variables

If we make all artificial variables nonbasic, they have zero value at the basic
solution, so 𝑤 = 0

Phase I problem: Minimize the artificial cost function


𝑤 = 𝑥5 + 𝑥6

To initialize the Simplex method, need reduced cost coefficients c’j in terms of
nonbasic variables only.

Use constraint equations to find 𝑤 in terms of nonbasic variables.

Minimize 𝑤 = 5 − 3𝑥1 + 𝑥4

When 𝑤 = 0, an extreme point of the original feasible set has been reached

19
Example 4: Introduction of Artificial Variables

Basic x1 x2 x3 x4 x5 x6 RS:b Ratio


Phase I 1. x3 1 2 1 0 0 0 5 5
Initial
tableau 2. x5 2 1 0 0 1 0 4 2
3. x6 1 -1 0 -1 0 1 1 1
4. Cost -1 -4 0 0 0 0 f-0
5. Artificial -3 0 0 1 0 0 w-5

Basic x1 x2 x3 x4 x5 x6 RS:b Ratio


Phase I 6. x3 0 3 1 1 0 -1 4 1.33
Second
tableau 7. x5 0 3 0 2 1 -2 2 0.67
8. x1 1 -1 0 -1 0 1 1 Neg.
9. Cost 0 -5 0 -1 0 1 f+1
10. Artificial 0 -3 0 -2 0 3 w-2

20
Example 4: Introduction of Artificial Variables

Basic x1 x2 x3 x4 x5 x6 RS:b
Phase I 12. x3 0 0 1 -1 -1 1 2
third
tableau 12. x2 0 1 0 2/3 1/3 -2/3 2/3
13. x1 1 0 0 -1/3 1/3 1/3 5/3
14. Cost 0 0 0 7/3 5/3 -7/3 f+13/3
15. Artificial 0 0 0 0 1 1 w-0

End of Phase I
Basic feasible solution:
Nonbasic variables: x4 = 0, x5 = 0, x6 = 0
Basic variables: x1 = 5/3, x2 = 2/3, x3 = 2

21
Example 4: Introduction of Artificial Variables

Phase II

Discard artificial cost row and artificial cost columns from final Phase I tableau
Continue Simplex iterations

Basic x1 x2 x3 x4 RS:b
Phase II 12. x3 0 0 1 -1 2
tableau
12. x2 0 1 0 2/3 2/3
13. x1 1 0 0 -1/3 5/3
14. Cost 0 0 0 7/3 f+13/3

Optimum solution:
Nonbasic variable: x4 = 0
Basic variables: x1 = 5/3, x2 = 2/3, x3 = 2

22
Notes on the Two-Phase Simplex Method

• If 𝑤 cannot be driven to zero at the end of Phase I (none of


the reduced cost coefficients for the artificial cost function
are negative but 𝑤 > 0), no feasible solution for the original
design problem exists
• During Simplex iterations, it is possible for a basic variable to
attain a zero value (b = 0 in RS column)
– Basic feasible solution becomes degenerate
– It is possible for the Simplex method to fail by cycling between two
degenerate solutions (in practice this usually does not happen)
– See Arora, Example 8.17

23
Conclusions: Features of the Simplex Method

• If there is a solution to the LP problem, the Simplex method


finds it
• The Simplex method indicates if the problem
– Is infeasible
– Is unbounded
– Has multiple solutions

24
Example 5:

Minimize
f = 3𝑥1 + 𝑥2 + 𝑥3
Subject to
2𝑥1 + 𝑥2 − 3𝑥3 − 𝑥4 = 5
−𝑥1 + 2𝑥2 − 3𝑥3 + 𝑥5 =2
𝑥𝑖 ≥ 0; 𝑖 = 1 to 4

25

You might also like