Академический Документы
Профессиональный Документы
Культура Документы
Management Science
Issue 8. Non-linear
Introduction to
Table of Contents
Chapter 10 (Nonlinear Programming)
Introduction to
Example:
minimize:
z = x12 + x22
subject to:
x1 x2 = 3
x2 3
Issue 8. Non-linear
Introduction to
A mathematical program
A mathematical program is an optimization
problem in which the objective and
constraints are given as mathematical
functions and functional relationships.
optimize:
Issue 8. Non-linear
Introduction to
b1
b2
b3
bm
Linear programs
A mathematical program is linear if f(x1, x2, x3,
, xn) and each gi(x1, x2, x3, , xn), i = (1, 2, ,
m) are linear in each of their arguments:
Integer programs
An integer program is a linear program
with the additional restriction that the
input variables be integers.
It is not necessary that the coefficients in
the arguments f(x) and gi(x) and the
constants bi also be integers, but they
frequently may be.
Issue 8. Non-linear
Introduction to
with linear
subject to: x1 x2 = 3
constraints, quadratic
x2 3
objective function, n
=
2
variables,
c
=
1,
11
Issue 8. Non-linear
Introduction to
Nonlinear Formulas
SUMPRODUCT(D4:D6, C4:C6)
[(D1 + D2) / D3] * C4
IF(D2 >= 2, 2*C3, 3*C4)
SUMIF(D1:D6, 4, C1:C6)
SUM(D4:D6)
2*C1 + 3*C4 + C6
C1 + C2 + C3
SUMPRODUCT(C4:C6,
C1:C3)
[(C1 + C2) / C3] * D4
IF(C2 >= 2, 2*C3, 3*C4)
SUMIF(C1:C6, 4, D1:D6)
ROUND(C1)
MAX(C1, 0)
MIN(C1, C2)
ABS(C1)
SQRT(C1)
C1 * C2
C1 / C2
C1 ^2
Data cells are located in D1:D6 and changing cells are in C1:C6.
Issue 8. Non-linear
Introduction to
Introduction to
Introduction to
Weekly
Profit
($)
Weekly
Profit
($)
1200
3000
2500
900
2000
600
1500
1000
300
500
2
Productionratefordoors
Issue 8. Non-linear
Introduction to
2
4
Productionrateforwindows
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
Profit
$16
$24
$28
$30
$33
Profit vs. Level of Activity
Profit
$35
$30
$25
$20
$15
$10
$5
$0
0
Issue 8. Non-linear
Introduction to
10
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
<=
Maximum
5
A Simple NLP
2
3
4
5
6
7
Issue 8. Non-linear
x=
0.371
Profit = 0.5x5-6x4+24.5x3-39x2+20x
=
$3.19
Introduction to
<=
Maximum
5
A Simple NLP
2
3
4
5
6
7
Issue 8. Non-linear
x=
3.126
Profit = 0.5x5-6x4+24.5x3-39x2+20x
=
$6.13
Introduction to
<=
Maximum
5
A Simple NLP
2
3
4
5
6
7
Issue 8. Non-linear
x=
5.000
Profit = 0.5x5-6x4+24.5x3-39x2+20x
=
$0.00
Introduction to
Issue 8. Non-linear
Introduction to
<=
<=
<=
Hours
Available
4
12
18
Plant 1
Plant 2
Plant 3
Units Produced
Issue 8. Non-linear
Doors
$300
Windows
$500
Windows
6
Introduction to
Hours
Used
2
12
18
Total Profit
$3,600
The gross profit per door sold is about $375, and the gross
profit per window is about $700. Therefore, the net profits are
as follows:
Net profit for doors = $375D $25D2
Net profit for windows = $700W ($662/3)W2
Introduction to
Weekly
profit
($)
1,800
Weekly
profit
($)
1,600
1,200
1,200
1,000
1,000
800
800
600
600
400
400
200
200
0
1,400
D
2
4
0
2
4
6
ProductionratefordoorsProductionrateforwindows
Issue 8. Non-linear
Introduction to
Spreadsheet Formulation
Issue 8. Non-linear
Introduction to
Productionrateforwindows 6
5
3
5
(3,4)=optimalsolution
14
28
4
Profit=$2,800
3
Feasible
region
Profit=$2,708
Profit=$2,600
Profit=$2,500
Issue 8. Non-linear
2
3
Productionratefordoors
Introduction to
Portfolio Selection
It is now common practice for professional managers
of large stock portfolios to use computer models
based on nonlinear programming to guide them.
Investors are concerned about both the expected
return and the risk.
One way of formulating their approach is as a
nonlinear version of a cost-benefit trade-off problem:
Minimize: Risk
subject to: Expected return Minimum acceptable level
Introduction to
Stock
1
Risk
(Standa
Joint Risk
Expect
rd
Pair
per Stock
ed
Deviati
of
(Covarianc
Return
on)
Stocks
e)
21%
25%
1 and 2
0.040
30
45
1 and 3
0.005
2 and 3
0.010
Issue 8. Non-linear
Introduction to
Algebraic Formulation
minimize:
Risk = (0.25S1)2+(0.45S2)2+(0.05S3)2+2(0.04)S1S2+2(0.005)S1S3+2(0.01)S2S3
subject to:
(21%)S1 + (30%)S2 + (8%)S3 18%
S1 + S2 + S3 = 100%
and
S1 0, S2 0, S3 0.
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
Introduction to
Regula
r
Time
Overti
me
Doors
Window
s
Total
Regula
r
Time
Overti
me
$300
$200
500
100
(and 3D + 2W 18)
Issue 8. Non-linear
Introduction to
Weekly
profit
($)
1,800
1,500
Weekly
profit
($)
1,100
900
3
4
Productionratefordoors
Issue 8. Non-linear
Introduction to
3
Productionrateforwindows
Introduction to
Issue 8. Non-linear
Introduction to
Profit
Profitgraph
Approximation
Levelofactivity
Issue 8. Non-linear
Introduction to
Advantages of Separable
Programming
Introduction to
Introduction to
Regula
r
Time
Overti
me
Doors
Window
s
Produc
t
Issue 8. Non-linear
Gross Unit
Profit
Total
Regula
r
Time
Overti
me
Marketin
g
Costs
$375
$275
$25D2
700
300
662/3W2
Introduction to
Gross
Profit
Marketin
g
Costs
Profit
Incremen
tal
Profit
$0
$0
$0
375
25
350
350
750
100
650
300
1,125
225
900
250
1,400
400
1,000
100
Issue 8. Non-linear
Introduction to
Gross
Profit
Marketin
g
Costs
Profit
Increme
ntal
Profit
$0
$0
$0
700
662/3
6331/3
6331/3
1,400
2662/3
1,1331/3
500
2,100
600
1,500
3662/3
2,400
1,0662/3
1,3331/3
1662/3
2,700
1,6662/3
1,0331/3
300
3,000
2,400
600
4331/3
Issue 8. Non-linear
Introduction to
Separable Programming
Spreadsheet Model
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
Introduction to
0.371
5
<=
3
Maximum
5
Starting
Point
x
Solution
x *
0
1
2
3
4
5
0.371
0.371
0.371
3.126
3.126
3.126
5.000
$3.19
Issue 8. Non-linear
Introduction to
Profit
$3.19
$3.19
$3.19
$6.13
$6.13
$6.13
$0.00
Introduction to
Introduction to
Introduction to
Spreadsheet Model
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Return
2.38%
-18.12%
4.95%
-4.08%
-1.83%
13.91%
-5.73%
-17.82%
11.90%
-1.53%
-3.01%
23.11%
51.00%
-14.51%
10.67%
24.46%
6.66%
10.66%
16.99%
5.69%
3.15%
-0.99%
-4.56%
17.48%
Beat
Market?
No
No
Yes
Yes
No
Yes
No
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
Yes
Market
(NYSE)
8.45%
-12.53%
4.38%
-9.32%
-0.93%
3.31%
-0.91%
-0.40%
9.70%
-8.54%
7.38%
1.31%
18.11%
-12.83%
1.04%
12.05%
2.81%
7.42%
16.14%
1.59%
6.80%
2.26%
3.54%
5.28%
Sum
100%
100%
Year
2001
2001
2001
2001
2000
2000
2000
2000
1999
1999
1999
1999
1998
1998
1998
1998
1997
1997
1997
1997
1996
1996
1996
1996
Portfolio
Issue 8. Non-linear
AOL
-3.02%
-37.55%
32.00%
15.37%
-35.14%
1.46%
-21.37%
-11.36%
45.82%
-5.40%
-25.17%
89.52%
177.96%
6.18%
53.89%
50.96%
19.96%
35.61%
30.90%
27.82%
-6.34%
-18.86%
-21.87%
49.33%
BA
16.35%
-39.56%
0.07%
-15.34%
2.55%
54.71%
10.98%
-8.44%
-2.48%
-2.83%
29.83%
4.21%
-4.92%
-23.00%
-14.51%
6.51%
-10.10%
2.59%
7.60%
-7.39%
12.70%
8.46%
0.58%
10.53%
F
-8.54%
-28.49%
-11.80%
21.28%
-7.00%
3.66%
-6.39%
-13.83%
6.10%
-10.96%
-0.44%
-3.41%
24.87%
-20.34%
-8.94%
33.46%
7.62%
18.75%
21.12%
-2.71%
3.20%
-3.47%
-5.82%
19.05%
PG
8.77%
14.71%
2.54%
-19.80%
17.07%
18.06%
0.00%
-48.20%
16.87%
6.38%
-10.02%
7.26%
28.38%
-21.89%
7.93%
5.72%
15.57%
-2.21%
23.09%
6.62%
10.39%
7.59%
6.93%
2.11%
MCD
-1.64%
0.30%
1.92%
-21.91%
13.37%
-8.35%
-11.87%
-7.29%
-6.79%
5.17%
-9.24%
17.98%
28.69%
-13.50%
15.00%
25.65%
0.26%
-1.42%
2.25%
4.13%
-4.22%
1.34%
-2.60%
6.37%
0%
<=
20.0%
<=
100%
0%
<=
20.0%
<=
100%
0%
<=
20.0%
<=
100%
0%
<=
20.0%
<=
100%
0%
<=
20.0%
<=
100%
Number of Quarters
Beating the Market
14
Introduction to
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
Issue 8. Non-linear
Introduction to
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Return
10.20%
-24.12%
7.02%
-10.53%
-0.86%
33.43%
1.31%
-19.56%
12.11%
-0.78%
7.76%
22.03%
40.51%
-16.81%
5.39%
15.40%
2.82%
7.78%
16.24%
3.45%
8.06%
2.72%
-2.22%
15.88%
Beat
Market?
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Market
(NYSE)
8.45%
-12.53%
4.38%
-9.32%
-0.93%
3.31%
-0.91%
-0.40%
9.70%
-8.54%
7.38%
1.31%
18.11%
-12.83%
1.04%
12.05%
2.81%
7.42%
16.14%
1.59%
6.80%
2.26%
3.54%
5.28%
Sum
100%
100%
Year
2001
2001
2001
2001
2000
2000
2000
2000
1999
1999
1999
1999
1998
1998
1998
1998
1997
1997
1997
1997
1996
1996
1996
1996
Portfolio
Issue 8. Non-linear
AOL
-3.02%
-37.55%
32.00%
15.37%
-35.14%
1.46%
-21.37%
-11.36%
45.82%
-5.40%
-25.17%
89.52%
177.96%
6.18%
53.89%
50.96%
19.96%
35.61%
30.90%
27.82%
-6.34%
-18.86%
-21.87%
49.33%
BA
16.35%
-39.56%
0.07%
-15.34%
2.55%
54.71%
10.98%
-8.44%
-2.48%
-2.83%
29.83%
4.21%
-4.92%
-23.00%
-14.51%
6.51%
-10.10%
2.59%
7.60%
-7.39%
12.70%
8.46%
0.58%
10.53%
F
-8.54%
-28.49%
-11.80%
21.28%
-7.00%
3.66%
-6.39%
-13.83%
6.10%
-10.96%
-0.44%
-3.41%
24.87%
-20.34%
-8.94%
33.46%
7.62%
18.75%
21.12%
-2.71%
3.20%
-3.47%
-5.82%
19.05%
PG
8.77%
14.71%
2.54%
-19.80%
17.07%
18.06%
0.00%
-48.20%
16.87%
6.38%
-10.02%
7.26%
28.38%
-21.89%
7.93%
5.72%
15.57%
-2.21%
23.09%
6.62%
10.39%
7.59%
6.93%
2.11%
MCD
-1.64%
0.30%
1.92%
-21.91%
13.37%
-8.35%
-11.87%
-7.29%
-6.79%
5.17%
-9.24%
17.98%
28.69%
-13.50%
15.00%
25.65%
0.26%
-1.42%
2.25%
4.13%
-4.22%
1.34%
-2.60%
6.37%
0%
<=
19.7%
<=
100%
0%
<=
52.0%
<=
100%
0%
<=
0.2%
<=
100%
0%
<=
26.6%
<=
100%
0%
<=
1.6%
<=
100%
Number of Quarters
Beating the Market
19
Introduction to
2.
The complexity of the objective function does not matter. As long as the
function can be evaluated for a given candidate solution (to determine the level
of fitness), it does not matter if the function has kinks, discontinuities, or many
local optima.
By evaluating whole populations of candidate solutions, Evolutionary Solver
keeps from getting trapped at a local optimum. Even if the whole population
evolves toward a locally optimal solution, mutation allows the possibility of
getting unstuck.
It can take much longer that standard Solver to find a final solution.
Evolutionary Solver does not perform well on models that have many
constraints.
The best solution found is typically not optimal (although it may be very close).
Issue 8. Non-linear
Introduction to
Nonlinear Programming
Consider the following model for a
nonlinear programming problem:
maximize:
Profit = 0.5x5 6x4 + 24.5x3 39x2 + 20x
subject to:
0x5
Issue 8. Non-linear
Introduction to
<=
Maximum
5
A Simple NLP
2
3
4
5
6
7
Issue 8. Non-linear
x=
0.371
Profit = 0.5x5-6x4+24.5x3-39x2+20x
=
$3.19
Introduction to
<=
Maximum
5
A Simple NLP
2
3
4
5
6
7
Issue 8. Non-linear
x=
3.126
Profit = 0.5x5-6x4+24.5x3-39x2+20x
=
$6.13
Introduction to
<=
Maximum
5
A Simple NLP
2
3
4
5
6
7
Issue 8. Non-linear
x=
5.000
Profit = 0.5x5-6x4+24.5x3-39x2+20x
=
$0.00
Introduction to
Issue 8. Non-linear
Introduction to
Line
any
Line joining
joining any
twotwo
points
is on or
curve
points
is below
on orthe
below
the curve
A Concave Function
Issue 8. Non-linear
Introduction to
Line
joining
anypoints
two
Line joining
any two
is on oris
above
points
on the
orcurve
above
the curve
A Convex Function
Issue 8. Non-linear
Introduction to
Introduction to
30
Issue 8. Non-linear
60
90
120
Labor Hours
Introduction to
150
180
<=
<=
Available
180
540
Benches
$85
Tables
$200
Wood Cost/lb.
$2
Regular
Overtime
Sunday
Labor Cost
(per hour)
$8
$12
$16
Hours
Available
120
30
30
Production
Benches
45
Tables
0
Revenue
Wood Cost
Labor Cost
Profit
$3,825.00
$1,080.00
$1,140.00
$1,605.00
Issue 8. Non-linear
Introduction to
30
Issue 8. Non-linear
60
90
120
Labor Hours
Introduction to
150
180
Separable Programming
Spreadsheet
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<=
<=
Available
135
540
Benches
$85
Tables
$200
Regular
Overtime
Sunday
Labor Cost
(per hour)
$8
$12
$16
Hours
Available
120
30
30
Production
Benches
45
Tables
0
Labor Used
Regular Hours
120
Overtime Hours
15
Weekend Hours
0
Revenue
Wood Cost
Labor Cost
Profit
Issue 8. Non-linear
<=
<=
<=
$3,825.00
$1,080.00
$1,140.00
$1,605.00
Introduction to
120
30
30
Advertising Example
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$48
$65
$9,000
$23,000
1.2
Decision Variable:
Advertising
$122,949
Quarter
Units Sold
Q1
14994
Sales Revenue
Cost of Sales
Gross Margin
$974,610
$719,712
$254,898
$154,949
Profit
$99,949
Introduction to
Sales Force
2
14000
12000
10000
8000
6000
4000
2000
0
0
50000
100000
Advertising
Issue 8. Non-linear
Introduction to
150000
200000
A
1
2
3
4
5
6
7
8
9
10
11
Issue 8. Non-linear
Seasonality =
Sales Force =
Advertising Level
$0
$50,000
$100,000
$150,000
$200,000
1.2
9000
Sales Level
2,817
9,805
13,577
16,509
18,993
Introduction to
Slope
0.1398
0.0754
0.0586
0.0497
$50,000
$50,000
$0
$0
$100,000
<=
<=
<=
$50,000
$50,000
$50,000
$48
$65
$9,000
$23,000
1.2
Advertising ($0-$50,000)
Advertising ($50,000-$100,000)
Advertising ($100,000-$150,000)
Advertising ($150,000-)
Quarter
Units Sold
Sales Revenue
Cost of Sales
Gross Margin
$882,505
$651,696
$230,809
$132,000
Profit
$98,809
Issue 8. Non-linear
Introduction to
Total Advertising
Evolutionary Solver
The standard Solver has difficulty with
problems that are
Highly nonlinear
Are not smooth (have kinks in the objective)
Have discontinuities (the objective jumps in value)
Have many local optima (many hills and valleys)
Issue 8. Non-linear
Introduction to
Premium Solver
Included on the textbook CD is the
Premium Solver. After installing, a new
button (Premium) is added to Solver.
Issue 8. Non-linear
Introduction to
Premium Solver
Clicking on the Premium button switches to Premium
Solver, which gives the option of three different solvers.
Standard GRG Nonlinear is equivalent to the regular Solver without
choosing Assume Linear Model.
Standard Simplex LP is equivalent to the regular Solver with
choosing Assume Linear Model.
Standard Evolutionary uses a genetic evolutionary algorithm that is
only available with Premium Solver.
Issue 8. Non-linear
Introduction to
Introduction to
$10.00
100499
9.80
500999
9.70
1,0009,999
Issue 8. Non-linear
Introduction to
9.60
Introduction to
Spreadsheet Model
A
1
2
3
4
5
6
7
8
9
10
11
12
13
Order Quantity
1
<=
1000
<=
20,000
Price
$9.60
Purchasing
Ordering
Holding
Total
Annual Cost
$192,000
$400
$2,000
$194,400
Price
$10.00
$9.80
$9.70
$9.60
$9.50
Annual Demand
Ordering Cost
Annual Holding Cost
20,000
$20
$4
Issue 8. Non-linear
Introduction to
Solution (Q*)
1,000
500
447
500
1,000
10,000
1,000
Introduction to
Cost
$194,400
195,800
197,789
195,800
194,400
210,040
194,400
10
100
447 500
1000
10,000
Issue 8. Non-linear
Introduction to
A
1
2
3
4
5
6
7
8
9
10
11
12
13
Order Quantity
1
<=
1000
<=
20,000
Price
$9.60
Purchasing
Ordering
Holding
Total
Annual Cost
$192,000
$400
$2,000
$194,400
Price
$10.00
$9.80
$9.70
$9.60
$9.50
Annual Demand
Ordering Cost
Annual Holding Cost
20,000
$20
$4
Issue 8. Non-linear
Introduction to
Introduction to
Introduction to