Nonlinear Programming (NLP) Operation Research December 29, 2014 RS and GISc, IST, Karachi.

Post on 12-Jan-2016

220 views 0 download

transcript

Nonlinear Programming (NLP)Nonlinear Programming (NLP)

Operation ResearchOperation ResearchDecember 29, 2014December 29, 2014

RS and GISc, IST, KarachiRS and GISc, IST, Karachi

IntroductionIntroduction

• In LP, the goal is to maximize or minimize a linear function subject to linear constraints

• But in many real-world problems, either– objective function may not be a linear function, or – some of the constraints may be nonlinear

• Functions having exponents, logarithms, square roots, products of variables, and so on are nonlinear

NLPNLP

• Optimization problems that involve nonlinear functions are called nonlinear programming (NLP) optimization

• Solution methods are more complex than linear programming methods

• Solution techniques generally involve searching a solution surface for high or low points requiring the use of advanced mathematics

• NLPs that do not have any constraints are called unconstrained NLPs

Optimality Conditions: Unconstrained optimizationOptimality Conditions: Unconstrained optimization

• Can be solved using calculus

• For Z=f(X), the optimum occurs at the point where f '(X) =0 and f’''(X) meets second order conditions

– A relative minimum occurs where f '(X) =0 and f’''(X) >0

– A relative maximum occurs where f '(X) =0 and f’''(X) <0

Concavity and Second DerivativeConcavity and Second Derivative

f’’(x)<0 f’’(x)>0 f’’(x)<0 f‘’(x)>0

local max andglobal max

local max

local min local min and global min

Solution process is straightforward using calculus:

f'(x) = -2x + 9 Set this equal to zero and obtain x = 4.5

f''(x) = -2 which is negative at x = 4.5 (or at any other x-value) so we have indeed found a maximum ratherthan a minimum point

So the function is maximized when x = 4.5, with a maximum value of -4.52 + 9(4.5) + 4 = 24.25.

66

Example: An unconstrained problem Example: An unconstrained problem

ProblemProblem• One problem is difficulty in distinguishing

between a local and global minimum or maximum point

Local maximum

Global maximum

This is trickier: a value x whose first derivative is zero and whose second derivative is negative is not necessarily the solution point! It could be a local maximum point rather than the desired global maximum point.

Feasible region

Solution point

In the case of this constrained optimization problem basic calculus is of no value, as the derivative at the solution point is not equal to zero

88

ProblemsProblems

• Solutions to NLPs are found using search procedures

• Search can fail!!!

NLP Example: Searches Can Fail!NLP Example: Searches Can Fail!

Maximize f(x) = x3 - 30x2 + 225x + 50

1010

The correct answer is that the problem is unbounded. There is no solution point!

Solvers may converge to a local maximum

1111

Profit function, Z, with volume independent of price:

Z = vp - cf - vcv

where v = sales volume

p = price

cf = unit fixed cost

cv = unit variable cost

Add volume/price relationship:

v = 1,500 - 24.6p

Figure 1 Linear Relationship of Volume to Price

Example

1212

Profit, Z = 1,696.8p - 24.6p2 - 22,000

Figure 2 The Nonlinear Profit Function

With fixed cost (cf = $10,000) and variable cost (cv = $8):

1313

The slope of a curve at any point is equal to the derivative of the curve’s function.

The slope of a curve at its highest point equals zero.

Figure 3 Maximum profit for the profit function

Optimal Value of a Single Nonlinear Function= Maximum Point on a Curve

1414

Z = 1,696.8p - 24.6p2 -22,000

dZ/dp = 1,696.8 - 49.2p

= 0

p = 1696.8/49.2

= $34.49

v = 1,500 - 24.6p

v = 651.6 pairs of jeans

Z = $7,259.45 Figure 4 Maximum Profit, Optimal Price, and Optimal Volume

Optimal Value of a Single Nonlinear FunctionSolution Using Calculus

1515

If a nonlinear problem contains one or more constraints it

becomes a constrained optimization model

A nonlinear programming model has the same general form

as the linear programming model except that the objective

function and/or the constraint(s) are nonlinear.

Solution procedures are much more complex and no

guaranteed procedure exists for all NLP models.

Constrained Optimization in Nonlinear ProblemsDefinition

1616

Effect of adding constraints to nonlinear problem:

Figure 5 Nonlinear Profit Curve for the Profit Analysis Model

Constrained Optimization in Nonlinear ProblemsGraphical Interpretation (1 of 3)

1717Figure 6 A Constrained Optimization Model

Constrained Optimization in Nonlinear ProblemsGraphical Interpretation (2 of 3)- First constrained p<= 20

1818

Figure 7 A Constrained Optimization Model with a Solution Point Not on the Constraint Boundary

Constrained Optimization in Nonlinear ProblemsGraphical Interpretation (3 of 3) Second constrained p<= 40

1919

Unlike linear programming, solution is often not on the

boundary of the feasible solution space.

Cannot simply look at points on the solution space boundary

but must consider other points on the surface of the

objective function.

This greatly complicates solution approaches.

Solution techniques can be very complex.

Constrained Optimization in Nonlinear ProblemsCharacteristics

2020

Centrally locate a facility that serves several customers or other facilities in order to minimize distance or miles traveled (d) between facility and customers.

di = sqrt[(xi - x)2 + (yi - y)2]

Where:(x,y) = coordinates of proposed facility(xi,yi) = coordinates of customer or location facility i

Minimize total miles d = diti

Where:di = distance to town i

ti =annual trips to town i

Facility Location Example ProblemProblem Definition and Data (1 of 2)

2121

Coordinates Town x y Annual Trips Abbeville Benton Clayton Dunnig Eden

20 10 25 32 10

20 35 9

15 8

75 105 135 60 90

Facility Location Example ProblemProblem Definition and Data (2 of 2)

Facility Location Example Problem: Using Excel SolverFacility Location Example Problem: Using Excel Solver

Excel SolverExcel Solver

2424Figure 13

Facility Location Example ProblemSolution Using Excel

2525

Facility Location Example ProblemSolution Map

di = sqrt[(xi - x)2 + (yi - y)2]

dA=sqrt[(20- 20.668)2 + (20- 15.473)2]

dA=4.57........................................ dE=6.22

d = diti

d = 4.57(75)+................................+90(13.02)

d = 5583.8 total annual distance

2626Rescue Squad Facility Location

Facility Location Example ProblemSolution Map

X = 20.668, Y = 15.473

More ExamplesMore Examples