You are on page 1of 18

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

BUS 321001: 321001: Management Science


Lecture 17: Non-Linear Programming
Modeling Examples

Objectives

Know how to model non-linear programs (NLPs) (Ch. 11.2)

Applications of NLP to location problems, portfolio management, and regression

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Linear Programming Model


Maximize c1 x1 + c2 x 2 + ..... + cn x n subject to a11x1 + a12 x2 + ... +a1n xn b1 a21x1 + a22 x2 + ... +a2n xn b 2 am1x1 + a m 2 x 2 + ... +amn xn bm x1 , x2 , ..., xn 0
ASSUMPTIONS:
Proportionality Assumption

Objective function Constraints

Additivity Assumption

Objective function Constraints

What is a Non-Linear Program?

maximize Subject to

3 sin x + xy + y3 - 3z + log z x2 + y 2 = 1 x + 4z 2 z 0

A non-linear program is permitted to have nonlinear constraints or objectives. A linear program is a special case of non-linear programming!

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Non-Linear Programs (N LP)


Let x = ( x1 , x2 ,, xn ) Max f ( x) g i ( x) bi , i = 1, 2,, m

Nonlinear objective function f(x) and/or Nonlinear constraints gi(x). Today: we will present several types of non-linear programs.

Unconstrained Facility Location


This is the warehouse location problem with a single warehouse that can be located anywhere in the plane.
y 16 14 12 10 8 6 4 2 0 0 2 4 6 8 10 12 14 16

Loc. A: (8,2) B: (3,10) C: (8,15) D: (14,13) P: ?

Demand 19 7 2 5

C (2) D (5) (7) B P ?

A (19)
x

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

An N LP

Costs proportional to distance; known daily demands.

d(P,A) = d(P,D) =

( x 8) 2 + ( y 2 ) 2 ( x 14)2 + ( y 13)2

minimize 19 d(P,A) + + 5 d(P,D) subject to: P is unconstrained

Here are the objective values for 55 different locations.


350 300
Objective value

x=0 x=2 x=4 x=6 x=8 x = 10 x = 12 values for y

250 200 150 100 50 0

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Facility Location. What happens if P must be within a specified region?


y 16 14 12 10 8 6 4 2 0 0 2 4 6 8 10 12 14 16 A (19) x B P ? (7) C (2) D (5)

The model
Minimize

19 ( x 8) 2 + ( y 2) 2

+ +

5 ( x 14)2 + ( y 13)2
Subject to x 7 5 y 11 x + y 24

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

0-1 integer programs as N LPs


minimize subject to

S j cj xj Sj aij xj = bi

for all i

xj is 0 or 1 for all j

is nearly equivalent to minimize subject to

Sj cj xj + 106 Sj xj (1- xj). Sj aij xj = bi for all i


0 xj 1 for all j

Some comments on non-linear models

The fact that non-linear models can model so much is perhaps a bad sign

How can we solve non-linear programs if we have trouble with integer programs? Recall, in solving integer programs we use techniques that rely on the integrality.

Fact: some non-linear models can be solved, and some are WAY too difficult to solve. More on this later.

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Another Example: Machine Values

Buy a machine and keep it for t years, and then sell it. (0 t 10)

All values are measured in $ million Cost of machine = 1.5 Revenue = 4(1 - .75t) Salvage value = 1/(1 + t)

How long should we keep the machine?


Machine values
4.5 4 3.5 3 2.5 2 1.5 1 0.5 0
0.2 1.8 2.6 3.4 4.2 5.8 6.6 7.4 8.2

Millions of dollars

revenue salvage total

Time

9.8

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Non-linearities Because of Time


Discount rates Decreasing value of equipment over time

wear and tear, improvements in technology

Tax implications Salvage value

Non-linearities in Pricing

The price of an item may depend on the number sold


quantity discounts (small sellers) price elasticity (monopoly)

Complex interactions because of substitutions:

Lowering the price of GM automobiles will decrease the demand for the competitors

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Non-linearities because of congestion


The time it takes to go from Lincoln Park to IIT by car depends non-linearly on the congestion. As congestion increases just to its limit, the traffic sometimes comes to a near halt.

Non-linearities because of penalties

Consider any linear equality constraint: e.g., 3x1 + 5x2 + 4x3 = 17

Suppose it is a soft constraint and we permit solutions violating it. We can then write: 3x1 + 5x2 + 4x3 - y = 17 And we may include a term of 10y2 in the objective function.

This adds flexibility to the solution by discouraging violation of our goals

Copyright @ Jiong Sun

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Portfolio Optimization

In the following slides, we will show how to model portfolio optimization as NLPs The key concept is that risk can be modeled using non-linear equations Since this is one of the most famous applications of non-linear programming, we cover it in much more detail

Risk vs. Return

In finance, one needs to trade-off risk and return.


For a given rate of return, one wants to minimize risk. For a given rate of risk, one wants to maximize return.

Return is modeled as expected value. Risk is modeled as variance (or standard deviation).

Copyright @ Jiong Sun

10

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Expectations Add

Suppose that X and Y are random variables E(X + Y) = E(X) + E(Y) Interpretation:

Suppose that the expected return in one year for Stock 1 is 9%. Suppose that the expected return in one year for Stock 2 is 10% If you put $100 in Stock 1, and $200 in Stock 2, your expected return is $9 + $20 = $29.

Variances do not add (at least not simply)


Suppose that X and Y are random variables Var(aX + bY) = a2 Var(X) + b2 Var(Y) + 2ab Cov(X, Y) Example. The risk of investing in umbrellas and sunglasses is less than the risk of either investment by itself. In general: n Var(X1 + X2 + + Xn) = i =1Var ( X i ) + i < j 2Cov ( X i , X j )

Copyright @ Jiong Sun

11

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Reducing risk

Diversification is a method of reducing risk, even when investments are positively correlated (which they often are). If only two investments are made, then the risk reduction depends on the covariance.

Portfolio Selection (contd)

Two Methods are commonly used:

Min s.t.

Risk Expected Return Bound

Max Expected Return - q (Risk) where q reflects the tradeoff between return and risk.

Copyright @ Jiong Sun

12

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Portfolio Selection Example

There are 3 candidate assets for our portfolio, X, Y and Z. The expected returns are 30%, 20% and 8% respectively (if possible we would like at least a 12% return). Suppose the covariance matrix is:
X Y Z X Y Z 3 1 0.5 1 2 0.4 0.5 0.4 1

What are the variables? Let x,y,z be percentage of portfolio of each asset.

Portfolio Selection Example


Min s.t.

3 x 2 + 2 y 2 + z 2 + 2 xy xz 0.8 yz
1.3 x + 1.2 y + 1.08 z 1.12 x + y + z =1 x, y, z 0

Max s.t.

1.3x + 1.2 y + 1.08 z (3x 2 + 2 y 2 + z 2 + 2 xy xz 0.8 yz)

x + y + z =1 x, y, z 0

Copyright @ Jiong Sun

13

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

More on Portfolio Selection

There can be institutional constraints as well, especially for mutual funds.

No more than 15% in the energy sector Between 20% to 25% high growth At most 3% in any one firm etc. We end up with a large non-linear program. The unconstrained version becomes the CapM model in finance.

Regression
Estimate for Midterm = x * HW3 + y Midterm = x * HW3 + y + residual x 0.6 y 40 HW3 91 80 61 88 86 56 60 87 50

Find the best linear fit for estimating the midterm grade from the homework grades

Estimate Midterm 1 94.6 89 88 97.5 76.6 58.5 92.8 92 91.6 93.5 73.6 87 76 99 92.2 85 70 67

Residual -5.6 9.5 -18.1 -0.8 1.9 13.4 23 -7.2 -3 sum of squares

Residual squared 31.36 90.25 327.61 0.64 3.61 179.56 529 51.84 9 1222.87

Copyright @ Jiong Sun

14

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Writing regression as an N LP

Minimize

Sj (rj)2
Minimize Sj (rj)2 subject to rj = Hj x + y Mj for each j

subject to
r1 = (91x + y) 89 r2 = (80x + y) 97.5 r3 = (61x + y) 58.5 r9 = (50x + y) 67

In an optimization framework, one can constrain coefficients.

Midterm 2 vs Homeworks (2002)


100 90
Midterm Grade

80 70 60 50 40 30 30 40 50 60 70 80 90 100 Avg of last 3 homeworks

r2 =.082

Copyright @ Jiong Sun

15

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Midterm 1 vs. homework 3 (2001)


100 90
midterm grades

80 70 60 50 40 40 50 60 70 80 90 100 homework 3 grades

r2 =.29

An application of regression to finance

A famous application in Finance of determining the best linear fit is determining the b of a stock. CAPM assumes that the return of a stock s in a given time period is
rs = + b rm + e, rs = return on stock s in the time period rm = return on market in the time period b = a 1% increase in stock market will lead to a b% increase in the return on s (on average)

Copyright @ Jiong Sun

16

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Regression, and estimating b


Return on Stock S vs. Market Return
80.00% 60.00% 40.00%
Stock

20.00%

0.00% -40.00% -20.00% 0.00% 20.00% 40.00% 60.00% 80.00% What is the best linear fit for -20.00% Market -40.00% -60.00%

this data? What does one mean by best?

Regression, and estimating b


Return on Stock S vs. Market Return
80.00% 60.00% 40.00%
Stock

20.00%

0.00% -40.00% -20.00% 0.00% 20.00% 40.00% 60.00% 80.00% -20.00% Market value b is the slope of the The -40.00% -60.00%

regression line. Here it is around .6 (lower expected gain than the market, and lower risk.)

Copyright @ Jiong Sun

17

BUS321 Management Science

Lecture 17 NLP - Modeling Non-linear Programs

Solving N LPs by Excel Solver

Summary

Applications of NLP to location problems, portfolio management, and regression Non-linear programming is very general and very hard to solve Special case of convex minimization NLP is easier, because a local minimum is a global minimum

Copyright @ Jiong Sun

18

You might also like