UNIT 2 Non-Linear Programming
A NLP problem An engineering factory makes 4 products (PROD1 to PROD4) on the following machines: 4 grinders, 2 drills and 1 planer. Each product yields a certain contribution to profit (defined as €/unit selling price minus cost of raw materials). These quantities together with the unit production times (hours) required on each process are given in the table below. PROD 1 PROD 2 PROD 3 PROD 4 Contribution to profit 8+0.1x 1 6 8 6-0.2x 4 Grinding 0.5 0.7 - - Drilling 0.1 0.2 - 0.3 Planing - - 0.01 - If there are 8 working hours in a day, what should the factory produce (daily) in order to maximize the total profit?
A NLP model Nonlinear objective function
Introduction In order to find the optimal solutions of an NLP problem, we will study a special type of points called Kuhn-Tucker points. If our problem does satisfy some particular conditions, we will be sure that one of these special points will be the optimal solution.
Lagrangian function It is a function that is built adding some terms to the objective function: RHS of the constraints m ∑ λ λ = + λ − L ( x ,..., x , ,..., ) f ( x ,..., x ) ( b g ( x ,..., x ) ) 1 n 1 m 1 n i i i 1 n = 1 i o.f. Lagrange multipliers constraints functions
Lagrangian function: example Max xyz + + ≤ s . t . x y z 3 + + = 2 2 2 x y z 9 ≥ y 0 λ λ λ = + λ − − − + λ − − − − λ 2 2 2 L ( x , y , z , , , ) xyz ( 3 x y z ) ( 9 x y z ) y 1 2 3 1 2 3
Kuhn-Tucker (K-T) points For a point to be K-T, it must satisfy 4 conditions (the K-T conditions) : Feasibility Stationary point Sign Complementary slackness
K-T conditions Feasibility: The point must satisfy all the constraints of the problem (i.e., it must be a feasible solution). Stationary point: The partial derivatives of the Lagrangian function with respect to the problem variables must take value 0 at this point. Sign: If a constraint is canonical, its associated multiplier must be nonnegative. If it is not canonical, it must be nonpositive. Complementary slackness: For each constraint, either it is non-binding or its associated multiplier λ − = takes value 0. ( b g ( x )) 0
K-T conditions: example Max xyz + + ≤ s . t . x y z 3 + + = 2 2 2 x y z 9 ≥ y 0 + + ≤ x y z 3 + + = 2 2 2 Feasibility: x y z 9 ≥ y 0
K-T conditions: example Max xyz + + ≤ s . t . x y z 3 + + = 2 2 2 x y z 9 ≥ y 0 λ λ λ = + λ − − − + λ − − − − λ 2 2 2 L ( x , y , z , , , ) xyz ( 3 x y z ) ( 9 x y z ) y 1 2 3 1 2 3 ∂ L = − λ − λ = yz 2 x 0 ∂ 1 2 x ∂ L = − λ − λ − λ = Stationary point: xz 2 y 0 ∂ 1 2 3 y ∂ L = − λ − λ = xy 2 z 0 ∂ 1 2 z
K-T conditions: example Max xyz + + ≤ s . t . x y z 3 + + = 2 2 2 x y z 9 ≥ y 0 λ ≥ 0 1 Sign: λ ≤ 0 3
K-T conditions: example Max xyz + + ≤ s . t . x y z 3 + + = 2 2 2 x y z 9 ≥ y 0 λ − − − = ( 3 x y z ) 0 1 Complementary slackness: λ = y 0 3
How to proceed to check if a point is K-T? The best order to check the K-T conditions is the following one: Feasibility Complementary slackness Stationary point Sign
Checking K-T conditions: example Max xyz + + ≤ s . t . x y z 3 Is (0,3,0) a K-T point? + + = 2 2 2 x y z 9 ≥ y 0 + + ≤ + + ≤ x y z 3 0 3 0 3 + + = + + = 2 2 2 2 9 0 3 0 9 Feasibility: x y z ≥ ≥ y 0 3 0
Checking K-T conditions: example Max xyz + + ≤ s . t . x y z 3 Is (0,3,0) a K-T point? + + = 2 2 2 x y z 9 ≥ y 0 λ − − − = ( 3 x y z ) 0 1 Complementary slackness: λ = y 0 3 λ − − − = λ ⋅ = ( 3 0 3 0 ) 0 0 0 1 1 λ 3 = λ = λ ⋅ = 0 y 0 3 0 3 3
Checking K-T conditions: example Max xyz + + ≤ s . t . x y z 3 + + = 2 2 2 x y z 9 ≥ y 0 ∂ L = − λ − λ = ⋅ − λ − ⋅ ⋅ λ = − λ = yz 2 x 0 3 0 2 0 0 0 ∂ Stationary 1 2 1 2 1 x ∂ L = − λ − λ − λ = ⋅ − λ − ⋅ λ − = − λ − λ = xz 2 y 0 0 0 2 3 0 0 6 0 ∂ 1 2 3 1 2 1 2 point: y ∂ L = − λ − λ = ⋅ − λ − ⋅ λ = λ = xy 2 z 0 0 3 2 0 0 0 ∂ 1 2 1 2 1 z λ = λ = λ = 0 1 2 3
Checking K-T conditions: example Max xyz + + ≤ s . t . x y z 3 + + = 2 2 2 x y z 9 ≥ y 0 λ ≥ 0 1 Sign: λ ≤ 0 3 So (0,3,0) is a K-T point, and its associated multipliers are (0,0,0).
Obtaining K-T points If we are not given any candidates for K-T points, we can obtain them by solving the system of equations obtained from the K-T conditions. Example: + 2 2 Max x y + ≤ . . 2 5 s t x y ≥ , 0 x y Note that all the functions are C 2 and the second constraint qualification (linearity) is satisfied, thus all the optimal solutions (if there is any) must be K-T points.
Obtaining K-T points + 2 2 Max x y + ≤ s . t . x 2 y 5 ≥ x , y 0 λ λ λ = + + λ − − − λ − λ • Lagrangian function 2 2 L ( x , y , , , ) x y ( 5 x 2 y ) x y 1 2 3 1 2 3 + ≤ ≥ ≥ • Feasibility x 2 y 5 , x 0 , y 0 − λ − λ = − λ − λ = 2 x 0 , 2 y 2 0 • Stationary point 1 2 1 3 λ ≥ λ ≤ λ ≤ • Sign 0 , 0 , 0 1 2 3 λ − − = λ = λ = • Complementary slackness ( 5 x 2 y ) 0 , x 0 , y 0 1 2 3
Obtaining K-T points We begin with the complementary slackness conditions (if there is any): λ = λ = λ = 0 , 0 , 0 Case 1: 1 2 3 λ = λ = λ = = 0 0 , 0 , 0 y Case 2: 1 λ − − = 1 2 ( 5 x 2 y ) 0 or 1 − − = λ = = λ = 5 x 2 y 0 0 , x 0 , 0 Case 3: 1 3 λ = λ = = = 0 0 , x 0 , y 0 Case 4: 2 λ = 1 x 0 or 2 = + = λ = λ = x 0 x 2 y 5 , 0 , 0 Case 5: 2 3 λ = + = λ = = 0 x 2 y 5 , 0 , y 0 Case 6: 3 λ = 2 y 0 or 3 = + = = λ = y 0 x 2 y 5 , x 0 , 0 Case 7: 3 + = = = x 2 y 5 , x 0 , y 0 Case 8:
Obtaining K-T points Then we analyze the stationary point conditions and the equality constraints of the problem (if any) for each one of the cases obtained earlier: − λ − λ = − λ − λ = Stationary point: 2 x 0 , 2 y 2 0 1 2 1 3 λ = λ = λ = 0 , 0 , 0 Case 1: 1 2 3 = 2 x 0 ⇒ = = x 0 , y 0 = 2 y 0
Obtaining K-T points Then we analyze the stationary point conditions and the equality constraints of the problem (if any) for each one of the cases obtained earlier: − λ − λ = − λ − λ = Stationary point: 2 x 0 , 2 y 2 0 1 2 1 3 λ = λ = = 0 , 0 , y 0 Case 2: 1 2 = 2 x 0 ⇒ = λ = x 0 , 0 − λ = 3 0 3
Obtaining K-T points Then we analyze the stationary point conditions and the equality constraints of the problem (if any) for each one of the cases obtained earlier: − λ − λ = − λ − λ = Stationary point: 2 x 0 , 2 y 2 0 1 2 1 3 λ = = λ = Case 3: 0 , x 0 , 0 1 3 − λ = 0 ⇒ = λ = 2 y 0 , 0 = 2 2 y 0
Obtaining K-T points Then we analyze the stationary point conditions and the equality constraints of the problem (if any) for each one of the cases obtained earlier: − λ − λ = − λ − λ = Stationary point: 2 x 0 , 2 y 2 0 1 2 1 3 λ = = = 0 , x 0 , y 0 Case 4: 1 − λ = 0 ⇒ λ = λ = 2 0 , 0 − λ = 2 3 0 3
Obtaining K-T points Then we analyze the stationary point conditions and the equality constraints of the problem (if any) for each one of the cases obtained earlier: − λ − λ = − λ − λ = Stationary point: 2 x 0 , 2 y 2 0 1 2 1 3 + = λ = λ = x 2 y 5 , 0 , 0 Case 5: 2 3 − − λ = 10 4 0 y ⇒ = λ = = 1 y 2 , 2 , x 1 − λ = 1 2 2 0 y 1
Obtaining K-T points Then we analyze the stationary point conditions and the equality constraints of the problem (if any) for each one of the cases obtained earlier: − λ − λ = − λ − λ = Stationary point: 2 x 0 , 2 y 2 0 1 2 1 3 + = λ = = x 2 y 5 , 0 , y 0 Case 6: 2 − λ = 10 0 ⇒ = λ = λ = − 1 x 5 , 10 , 20 − λ − λ = 1 3 2 0 1 3
Recommend
More recommend