Professional Documents
Culture Documents
Linearization Methods
n
Two classes of optimization theory that are most thoroughly addressed Unconstrained problems Completely linear problems Efficient solution algorithms exist for each If we could transform a nonlinear problem into a linear one, we might be able to significantly speed up solution
n n
2011 K. English
Linearization Methods
n
" " " " " " " ! ( x) = f ( x 0 ) + !f ( x 0 )( x " x 0 ) + O x " x 0 f " " " " ! " f ( x) = f ( x 0 ) + !f ( x 0 )( x " x 0 ) "0 x is the linearized point
n n
+#
If the function is highly nonlinear, the linear approximation could result in substantial errors Before linearizing nonlinear problems, we will take a side step to linear programming (i.e., solving linear optimization problems)
2011 K. English
Linear Programming
n Linear
2011 K. English
Example
n
n n n n n
A company has two grades of inspectors: Grade I and Grade II, who are to be assigned to a quality control inspection. At least 1800 pieces must be inspected per 8hr day. Grade I inspectors earn $40/hr and can check pieces at a rate of 25 per hour, with an accuracy of 98% Grade II inspectors earn $30/hr and can check pieces at a rate of 15 per hour, with an accuracy of 95% Errors cost the company $20 each The company has 8 Grade I and 10 Grade 2 inspectors Determine the optimal assignment of inspectors that will minimize the total cost of inspection.
2011 K. English 6
Example
x1 8 x2 10 (Grade I) (Grade II)
2011 K. English
Example
x1 8 x2 10 (Grade I) (Grade II) (1800 pieces must be inspected each shift) 8(25* x1 ) + 8(15* x2 ) 1800
2011 K. English
Example
x1 8 x2 10 (Grade I) (Grade II) (1800 pieces must be inspected each shift) 8(25* x1 ) + 8(15* x2 ) 1800 200 x1 + 120 x2 1800 5 x1 + 3x2 45
2011 K. English
Example
x1 8 x2 10 5 x1 + 3 x2 45 (Salary) + (Error Charge)*(Parts per hr.)(Error rate) = Hourly rate $40 + $20*(25) *(0.02) = $50 $30 + $20*(15) *(0.05) = $45 (Grade I Hourly rate) (Grade II Hourly rate) (Grade I) (Grade II)
2011 K. English
10
Example
x1 8 x2 10 5 x1 + 3 x2 45 (Salary) + (Error Charge)*(Parts per hr.)(Error rate) = Hourly rate $40 + $20*(25) *(0.02) = $50 $30 + $20*(15) *(0.05) = $45 Z = 8 ( 50 x1 + 45 x2 ) = 400 x1 + 360 x2 (Grade I Hourly rate) (Grade II Hourly rate) (Grade I) (Grade II)
2011 K. English
11
Example
Minimize : subject to :
2011 K. English
12
Standard Form
Minimize : subject to : Z = c1x1 + c2 x2 +!+ cn xn a11x1 + a12 x2 +!+ a1n xn = b1 a21x1 + a22 x2 +!+ a2n xn = b2 " am1x1 + am2 x2 +!+ amn xn = bm x1 ! 0, x2 ! 0 ! xn ! 0 b1 ! 0,b2 ! 0 ! bm ! 0
2011 K. English 13
Standard Form
Minimize : subject to :
Z = cx Ax = b x!0 b!0
2011 K. English
14
Standard Form
n n
2011 K. English
15
Standard Form
n n
2011 K. English
16
Standard Form
n n
2011 K. English
18
Maximize : subject to :
Z = x1 2 x2 + 3 x3 x1 + x2 + x3 7 x1 x2 + x3 2 3 x1 x2 2 x3 = 5 x1 , x2 , x4 , x5 0 x3 =x4 x5
2011 K. English
19
Maximize : subject to :
Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5
3 x1 x2 2 ( x4 x5 ) = 5
2011 K. English
20
Maximize : subject to :
Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5
3 x1 x2 2 ( x4 x5 ) = 5
2011 K. English
21
Maximize : subject to :
Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5
3 x1 + x2 + 2 ( x4 x5 ) = 5
2011 K. English
22
Maximize : subject to :
Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5
3 x1 + x2 + 2 ( x4 x5 ) = 5
2011 K. English
23
Maximize : subject to :
Z = x1 2 x2 + 3 ( x4 x5 )
x1 + x2 + ( x4 x5 ) + x6 = 7 x1 x2 + ( x4 x5 ) x7 = 2 x1 , x2 , x4 , x5 , x6 , x7 0 x3 =x4 x5
3 x1 + x2 + 2 ( x4 x5 ) = 5
2011 K. English
24
Maximize : subject to :
Z = x1 2 x2 + 3 x4 3 x5 x1 + x2 + x4 x5 + x6 = 7 x1 x2 + x4 x5 x7 = 2 3 x1 + x2 + 2 x4 2 x5 = 5 x1 , x2 , x4 , x5 , x6 , x7 0
2011 K. English
25
Maximize : subject to :
Z=
x1 x1 x1 3x1
2 x2 + x2 x2 + x2
2011 K. English
+3x4 + x4 + x4 +2 x4
3x5 x5 x5 2 x5 + x6 x7 =7 =2 =5
26
x1 , x2 , x4 , x5 , x6 , x7 0
2011 K. English
27
x2 x2 +2 x2 + x3 + x4
+50 =2 =8
2011 K. English
29
f = 2 x1 + 4( x3 x4 ) 2 x1 + ( x3 x4 ) 2 x1 , x3 , x4 0
f = 2 x1 + 4( x3 x4 ) 2 x1 + ( x3 x4 ) x5 = 2 x1 , x3 , x4 , x5 0
Minimize : subject to :
f =
2 x1 2 x1
+4 x3 + x3
4 x4 x4 x5 =2
x1 , x3 , x4 , x5 0
2011 K. English
32
Standard Form
Minimize : subject to : Z = c1x1 + c2 x2 +!+ cn xn a11x1 + a12 x2 +!+ a1n xn = b1 a21x1 + a22 x2 +!+ a2n xn = b2 " am1x1 + am2 x2 +!+ amn xn = bm x1 ! 0, x2 ! 0 ! xn ! 0 b1 ! 0,b2 ! 0 ! bm ! 0
2011 K. English 34
The general form poses the problem as m equations and n variables If there are more variables than equations (i.e., m<n), there are an infinite number of feasible solutions Classical solution approach: Gauss-Jordan Elimination
Reduce the system to canonical (row echelon) form X1 through Xm appear with a unit coefficient in only one equation, with zeroes (basic variables) Xm+1 through Xn are considered nonbasic variables
2011 K. English 35
2011 K. English
36
Example Problem
Min s.t.
X1 1 1 -4
X2 -1 2 -1
X3 1 0 0
X4
2011 K. English
37
Example Problem
Min s.t.
X1 1 1 -4
X2 -1 2 -1
X3 1 0 0
X4
2011 K. English
38
Example Problem
Min s.t.
X1 1 1 -4 Multiply by -1
X2 -1 2 -1
X3 1 0 0
X4
2011 K. English
39
Example Problem
Min s.t.
X1 1 1 -4 Multiply by -1 X1 -1 1 -4
X2 -1 2 -1
X3 1 0 0
X4
X2 1 2 -1
X3 -1 0 0
X4 0 1 0 = = =
b 5 8 f-50
40
2011 K. English
Example Problem
Min s.t.
X1 1 1 -4 Multiply by -1 X1 -1 1 -4
X2 -1 2 -1
X3 1 0 0
X4
Not Canonical X2 1 2 -1 X3 -1 0 0
2011 K. English
X4 0 1 0 = = =
b 5 8 f-50
41
Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0
Min s.t.
b = = = 5 8 f-50
X1 -1 1 -4
X2 1 2 -1
X3 -1 0 0
X4 0 1 0
X5 1 0 0 = = =
b 5 8 f-50
2011 K. English
42
Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0
Min s.t.
b = = = 5 8 f-50
X1 -1 1 -4
X2 1 2 -1
X3 -1 0 0
X4 0 1 0
X5 1 0 0 = = =
b 5 8 f-50
2011 K. English
43
Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0
Min s.t.
b = = = 5 8 f-50
Add artificial variable, X5 Add temporary objective function, w, as a measure of infeasibility w is the sum of the artificial variables X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 0 0 0 X4 0 1 0 0
2011 K. English
X5 1 0 0 1 = = = =
b 5 8 f-50 w
44
Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0
Min s.t.
b = = = 5 8 f-50
Add artificial variable, X5 Add temporary objective function, w, as a measure of infeasibility w is the sum of the artificial variables X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 0 0 0 X4 0 1 0 0
2011 K. English
X5 1 0 0 1 = = = =
b 5 8 f-50 w
45
Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0
Min s.t.
b = = = 5 8 f-50
Add artificial variable, X5 Add temporary objective function, w, as a measure of infeasibility w is the sum of the artificial variables X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 X4 X5 = = = = b 5 8 f-50 w
46
0 1 Not Canonical 0 1 0 0 0 0 0
2011 K. English
0 1
Example Problem
X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 X4 X5 0 1 Not Canonical 0 1 0 0 0 0 0 0 1
Min s.t.
b = = = = 5 8 f-50 w
Subtract row 1 from row 4 to get canonical form X1 -1 1 -4 0-(-1) X2 1 2 -1 0-1 X3 -1 0 0 0-(-1) X4 0 1 0 0-0
2011 K. English
X5 1 0 0 1-1 = = = =
b 5 8 f-50 w-5
47
Example Problem
X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 X4 X5 0 1 Not Canonical 0 1 0 0 0 0 0 0 1
Min s.t.
b = = = = 5 8 f-50 w
X5 1 0 0 0 = = = =
b 5 8 f-50 w-5
48
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = = 5 8 f-50 w-5
X2 will enter the basis (only negative coefficient and we are minimizing the objective function)
X1 -1 1 -4 1
X2 1 2 -1 -1
X3 -1 0 0 1
X4 0 1 0 0
2011 K. English
X5 1 0 0 0 = = = =
b 5 8 f-50 w-5
49
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = = 5 8 f-50 w-5
X2 will enter the basis (only negative coefficient and we are minimizing the objective function) Calculating the b/a ratios shows that row 2 has the minimum value and X4 will leave the basis
X1 -1 1 -4 1
X2 1 2 -1 -1
X3 -1 0 0 1
X4 0 1 0 0
2011 K. English
X5 1 0 0 0 = = = =
b
5/1=5 8/2=4
5 8 f-50 w-5
50
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = =
5/1=5 8/2=4
5 8 f-50 w-5
X1 -1 =0.5 -4 1
X2 1 2/2=1 -1 -1
X3 -1 0/2=0 0 1
X4 0 =0.5 0 0
2011 K. English
X5 1 0/2=0 0 0 = = = =
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = =
5/1=5 8/2=4
5 8 f-50 w-5
X1 -1 0.5 -4 1
X2 1 1 -1 -1
X3 -1 2=0 0 1
X4 0 0.5 0 0
2011 K. English
X5 1 0 0 0 = = = =
b 5 4 f-50 w-5
52
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = =
5/1=5 8/2=4
5 8 f-50 w-5
Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1
X1
-1-0.5=-1.5 0.5 -4 1
X2
1-1=0 1 -1 -1
X3
-1-0=-1 0 0 1
X4
0-0.5=-0.5 0.5 0 0
2011 K. English
X5
1-0=1 0 0 0 = = = =
b
5-4=1 4 f-50 w-5
53
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = =
5/1=5 8/2=4
5 8 f-50 w-5
Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1 Add the new row 2 to row 3
X1
-1.5 0.5 -4+0.5=-3.5 1
X2
0 1 -1+1=0 -1
X3
-1 0 0+0=0 1
X4
-0.5 0.5 0+0.5=0.5 0
2011 K. English
X5
1 0 0+0=0 0 = = = =
b
1 4 f-50+4=f-46 w-5
54
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = =
5/1=5 8/2=4
5 8 f-50 w-5
Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1 Add the new row 2 to row 3 Add the new row 2 to row 4
X1
-1.5 0.5 -3.5 1+0.5=1.5
X2
0 1 0 -1+1=0
X3
-1 0 0 1+0=1
X4
-0.5 0.5 0.5 0+0.5=0.5
2011 K. English
X5
1 0 0 0+0=0 = = = =
b
1 4 f-46 w-5+4=w-1
55
Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0
Min s.t.
b = = = =
5/1=5 8/2=4
5 8 f-50 w-5
Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1 Add the new row 2 to row 3 Add the new row 2 to row 4
X1
-1.5 0.5 -3.5 1.5
X2
0 1 0 0
X3
-1 0 0 1
X4
-0.5 0.5 0.5 0.5
2011 K. English
X5
1 0 0 0 = = = =
b
1 4 f-46 w-1
56
Example Problem
X1
-1.5 0.5 -3.5 1.5
Min s.t.
X2
0 1 0 0
X3
-1 0 0 1
X4
-0.5 0.5 0.5 0.5
X5
1 0 0 0 = = = =
b
1 4 f-46 w-1
All coefficients in row 4 are positive, so w cannot be decreased further X5 still has a value This tells us that a basic feasible solution to the original problem (without the artificial variable) cannot be found
2011 K. English
57
Phase I
1.
2011 K. English
58
Phase I
1. 2.
Add artificial variables as necessary to achieve canonical form Create a new objective function (w) equal to the sum of the artificial variables
2011 K. English
59
Phase I
1. 2. 3.
Add artificial variables as necessary to achieve canonical form Create a new objective function (w) equal to the sum of the artificial variables Minimize using Phase II approaches
2011 K. English
60
Phase I
1. 2. 3.
Add artificial variables as necessary to achieve canonical form Create a new objective function (w) equal to the sum of the artificial variables Minimize using Phase II approaches
If w cannot be reduced to zero, the solution to the original problem does not exist. n If w has been reduced to zero, delete the artificial variables and the artificial objective (w) from the system and proceed with Phase II
n
2011 K. English
61
Phase II
2011 K. English
62
Phase II
Find the minimum ci, i=1,n.
2011 K. English
63
Phase II
Find the minimum ci, i=1,n.
Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element
2.
If ck is negative
2011 K. English
64
Phase II
Find the minimum ci, i=1,n.
Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr
2.
If ck is negative
3.
Pivot on ark.
2011 K. English
65
Phase II
Find the minimum ci, i=1,n.
Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr
2.
If ck is negative
3.
Pivot on ark.
4.
2011 K. English
66
Phase II
Find the minimum ci, i=1,n.
Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr
2.
If ck is negative
3.
Pivot on ark.
4. 5.
2011 K. English
67
Phase II
Find the minimum ci, i=1,n.
Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr
2.
If ck is negative
3.
Pivot on ark.
4. 5.
If all associated with non-basic variables are positive, the solution is unique
2011 K. English
68
Phase II
Find the minimum ci, i=1,n.
Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr
2.
If ck is negative
3.
Pivot on ark.
4. 5.
If all associated with non-basic variables are positive, the solution is unique If some associated with a non-basic variable is zero, the solution is not unique
2011 K. English
69
Phase II
Find the minimum ci, i=1,n.
Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr
2.
If ck is negative
3.
Pivot on ark.
4. 5.
If all associated with non-basic variables are positive, the solution is unique If some associated with a non-basic variable is zero, the solution is not unique If some is negative, the solution is unbounded 2011 K. English 70
Grade 1 inspectors can check pieces at the rate of 25 per hour, with an accuracy of 98%. Grade 2 inspectors can check pieces at the rate of 15 per hour with an accuracy of 95%. The wage rate of a Grade 1 inspector is $40 per hour, while a Grade2 inspector earns $30 per hour. Each error made by an inspector costs the company $20. The company has available 8 Grade 1 inspectors and 10 Grade 2 inspectors.
n n
What is the optimal assignment of inspectors that will minimize the total cost of inspection?
2011 K. English
71