Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nonlinear Programming

Similar presentations


Presentation on theme: "Nonlinear Programming"— Presentation transcript:

1 Nonlinear Programming
Consider the following math program: Max Z = K*L st K + 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 <= 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 <= 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 - (2x2 + x4) 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 – 4x3 f’’(x) = – 4 – 12x2 Where does optimum occur? 3 – 4x – 4x3 = 0

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

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

9 Nonlinear Programming
Multi-Variable Unconstrained Example: Max Z = f(x) s.t. nothing Or Max Z = 2x1x2 + 2x2 – x12 – 2x22 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 e. Go to the stopping rule. Set xj = x’j + t(df / dxj)x=x’ for all values of j then substitute these expressions into the expression f(x). This expression of f(x) is in terms of t. Find the value of t* that maximizes f(x) over t >= 0. ReSet x’ = x’ + t* (df / dxj)x=x’ . Go to stopping rule. Stopping rule: evaluate if | (df / dxj)x=x’ | <= e for each j. If so, stop. Else, go to step 1.

11 Nonlinear Programming
Multi-Variable Unconstrained Example Gradient Search procedure: Z = 2x1x2 + 2x2 – x12 – 2x22 df / dx1 = 2x2 – 2x1 df / dx2 = 2x1 + 2 – 4x2 Initialization: set x’1, x’2 = 0. Set x1 = x’1 + t(df / dx1) = 0 + t(2*0 – 2*0) = 0. Set x2 = x’2 + t(df / dx2) = 0 + t(2* – 4*0) = 2t. f(x1 , x2) = 2*0* 2t +2*2t – 0*0 – 2*2t*2t = 4t – 8t2. f’(x1 , x2) = 4 – 16t. Let 4 – 16t = 0 then t* = ¼. ReSet x’1 = x’1 + t*(df / dx1) = 0 + ¼(2*0 – 2*0) = 0. x’2 = x’2 + t*(df / dx2) = 0 + ¼(2*0 + 2 – 4*0) = ½. Stopping rule: df / dx1 = 1, df / dx2 = 0.

12 Nonlinear Programming
Multi-Variable Unconstrained Example Gradient Search procedure: Z = 2x1x2 + 2x2 – x12 – 2x22 df / dx1 = 2x2 – 2x1 df / dx2 = 2x1 + 2 – 4x2 Iteration 2: x’1 = 0 x’2 = ½ . 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 – t2 + ½. f’(t,1/2) = 1 - 2t. Let 1 – 2t = 0 then t* = ½ . ReSet x’ = (0,1/2) + ½ (1,0) = (½, ½). Stopping rule: df / dx1 = 0, df / dx2 = 1.

13 Nonlinear Programming
Multi-Variable Unconstrained Example Gradient Search procedure: Z = 2x1x2 + 2x2 – x12 – 2x22 This iterative process continues until the values of the gradient are <= some e.

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


Download ppt "Nonlinear Programming"

Similar presentations


Ads by Google