Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nonlinear Programming Consider the following math program: Max Z = K*L st 4K + L <= 8 K,L >= 0 place Winston Fig 2 here Where does the optimal solution.

Similar presentations


Presentation on theme: "Nonlinear Programming Consider the following math program: Max Z = K*L st 4K + L <= 8 K,L >= 0 place Winston Fig 2 here Where does the optimal solution."— Presentation transcript:

1 Nonlinear Programming Consider the following math program: Max Z = K*L st 4K + L <= 8 K,L >= 0 place Winston Fig 2 here Where does the optimal solution fall within the feasible region?

2 Nonlinear Programming Consider the following math program: Max Z = f(x) st 0 <= x <= 1 where f(x) is pictured at right. place Winston Fig 3 here Where does the optimal solution fall within the feasible region?

3 Nonlinear Programming Consider the following math program: Max Z = f(x) st 0 <= x <= 10 where f(x) is pictured at right. place Winston Fig 4 here Note there are three local optima, but only one optimal solution at point C.

4 Nonlinear Programming Formulate the following problem as an NLP. Truckco is trying to determine where they should locate a single warehouse. The positions in the x-y plane (in miles) of their four customers and the number of shipments made annually to each customer is given below. Locate the warehouse to minimze the total distance trucks must travel annually from the ware house to the four customers. Customer X Coord. Y Coord. Number of Shipments

5 Nonlinear Programming Truckco formulation: Let X,Y be the coordinates of the warehouse. Min Z = 200 * D * D * D * D4 s.t. D1 = ( ( X- 5) 2 + (Y-10 ) 2 ).5 D2 = ( ( X- 10) 2 + (Y-5 ) 2 ).5 D3 = ( ( X- 0) 2 + (Y-12 ) 2 ).5 D4 = ( ( X- 12) 2 + (Y-0 ) 2 ).5 D1, D2, D3, D4, X, Y >= 0

6 Nonlinear Programming One-Variable Unconstrained Example: Max Z = f(x) s.t. nothing Or Max Z = x - (2x 2 + x 4 ) First determine if the concave (or convex for Min problem). f(x) is concave if the second derivative is <= 0 for all values of x. f’(x) = 3 – 4x – 4x 3 f’’(x) = – 4 – 12x 2 Where does optimum occur? 3 – 4x – 4x 3 = 0

7 Nonlinear Programming One-Variable Unconstrained An approximate graph of x and Z is as follows: Z = x - (2x 2 + x 4 ) Z x

8 Nonlinear Programming One-Variable Unconstrained How do you solve for x? 3 – 4x – 4x 3 = 0

9 Nonlinear Programming Multi-Variable Unconstrained Example: Max Z = f(x) s.t. nothing Or Max Z = 2x 1 x 2 + 2x 2 – x 1 2 – 2x 2 2 For a concave function (convex when minimizing), use an approach whereby you move in a direction of steepest ascent. In other words, if f(x) is the surface area of a 3 dimensional graph then move in a direction that has the steepest angle. Move as far in the steepest direction until you are no longer ascending. Then re-evaluate the steepest ascent at that point. This procedure is called the gradient search procedure.

10 Nonlinear Programming Multi-Variable Unconstrained Gradient Search procedure: Initialization: select some initial point x’, and some . Go to the stopping rule. 1)Set x j = x ’ j + t(  f /  x j ) x=x’ for all values of j then substitute these expressions into the expression f(x). 2)This expression of f(x) is in terms of t. Find the value of t * that maximizes f(x) over t >= 0. 3)ReSet x’ = x’ + t * (  f /  x j ) x=x’. Go to stopping rule. Stopping rule: evaluate if | (  f /  x j ) x=x’ | <=  for each j. If so, stop. Else, go to step 1.

11 Nonlinear Programming Multi-Variable Unconstrained Example Gradient Search procedure: Z = 2x 1 x 2 + 2x 2 – x 1 2 – 2x 2 2  f /  x 1 = 2x 2 – 2x 1  f /  x 2 = 2x – 4x 2 Initialization: set x’ 1, x’ 2 = 0. 1)Set x 1 = x ’ 1 + t(  f /  x 1 ) = 0 + t(2*0 – 2*0) = 0. Set x 2 = x ’ 2 + t(  f /  x 2 ) = 0 + t(2*0 + 2 – 4*0) = 2t. f(x 1, x 2 ) = 2*0* 2t +2*2t – 0*0 – 2*2t*2t = 4t – 8t 2. 2)f’(x 1, x 2 ) = 4 – 16t. Let 4 – 16t = 0 then t* = ¼. 3)ReSet x’ 1 = x ’ 1 + t*(  f /  x 1 ) = 0 + ¼(2*0 – 2*0) = 0. x’ 2 = x ’ 2 + t*(  f /  x 2 ) = 0 + ¼(2*0 + 2 – 4*0) = ½. Stopping rule:  f /  x 1 = 1,  f /  x 2 = 0.

12 Nonlinear Programming Multi-Variable Unconstrained Example Gradient Search procedure: Z = 2x 1 x 2 + 2x 2 – x 1 2 – 2x 2 2  f /  x 1 = 2x 2 – 2x 1  f /  x 2 = 2x – 4x 2 Iteration 2: x’ 1 = 0 x’ 2 = ½. 1)Set x = (0,1/2) + t(1,0) = (t,1/2). f(t,1/2) = 2*t* 1/2 +2*1/2 – t*t – 2*1/2*1/2 = t – t 2 + ½. 2)f’(t,1/2) = 1 - 2t. Let 1 – 2t = 0 then t* = ½. 3)ReSet x’ = (0,1/2) + ½ (1,0) = (½, ½). Stopping rule:  f /  x 1 = 0,  f /  x 2 = 1.

13 Nonlinear Programming Multi-Variable Unconstrained Example Gradient Search procedure: Z = 2x 1 x 2 + 2x 2 – x 1 2 – 2x 2 2  his iterative process continues until the values of the gradient are <= some .

14 Nonlinear Programming Multi-Variable Constrained Category - Convex Programming Example: Max Z = 5x 1 + 8x 2 – x 1 2 – 2x 2 2 { Non-linear} s.t. 3x 1 + 2x 2 <= 6 { Convex feasible region} x 1, x 2 >= 0


Download ppt "Nonlinear Programming Consider the following math program: Max Z = K*L st 4K + L <= 8 K,L >= 0 place Winston Fig 2 here Where does the optimal solution."

Similar presentations


Ads by Google