NLP 2016 Intro
NLP 2016 Intro
(NLP)
a 21x1 + a 22 x 2 + ... +a 2n xn b 2
am1 x1 + a m 2 x 2 + ... +amn xn b m
x1 , x2 , ..., xn 0
Constraints
Additivity Assumption
Objective function
Constraints
maximize
Subject to
f ( x)
gi ( x) bi , i 1, 2, , m
Location
Demand
14
A: (8,2)
19
B: (3,10)
10
C: (8,15)
D: (14,13)
C (2)
16
D (5)
12
(7)
B
P ?
6
4
P:
A (19)
2
0
x
0
10
12
14
16
An NLP
d(P,A) =
( x 8) ( y 2)
2
d(P,D) =
( x 14)2 ( y 13)2
minimize
19 d(P,A) + + 5 d(P,D)
350
300
x= 0
250
x= 2
200
x= 4
x= 6
150
x= 8
100
x = 10
50
x = 12
0
values for y
(2)
14
D (5)
12
(7)
10
B
P ?
6
4
A (19)
2
0
x
0
10
12
14
16
8
The model
Minimize
19 ( x 8)2 ( y 2)2
5 ( x 14) ( y 13)
2
Subject to
+ +
2
x 7
5 y 11
x + y 24
10
11
Nonlinear
Programs:
12
Minimize
subject to
( x 14)2 ( y 15)2
(x - 8)2
x
x
x +y
+ (y - 9)2 49
2
13
24
13
y
18
16
14
12
10
8
6
4
2
0
x
0
10 12 14 16 18
14
C
B
z = f(x)
max f(x)
s.t. 0 x 1
x
1
15
16
P
14
12
10
8
6
4
y
W
2
10
12
14
17
18
19
(x+y)/2
It is convex if
the entire line
segment is
always in S.
S
20
B C
B C
B C
21
g(y) = f(y)
g(z) = f(z)
g(y/2 + z/2) = f(y)/2 + g(z)/2
f(x)
f(z)
g(x)
f(y)/2 +
f(z)/2
f(y)
x
y
(y+z)/2
22
Convex Functions
Convex Functions: f(l y + (1- l)z) l f(y) + (1- l)f(z)
for every y and z and for 0l.
e.g., l = 1/2
f(x)
We say strict
convexity if sign
Line joining any points is < for 0<l<.
is above the curve
f(z)
f(y)/2 +
f(z)/2
f(y)
x
y
(y+z)/2
23
Concave Functions
Concave Functions: f(l y + (1- l)z) l f(y) + (1- l)f(z)
for every y and z and for 0 l.
e.g., l = 1/2
We say strict
concavity if sign
is < for 0<l<.
x
y
(y+z)/2
24
f(-x)
-x
If f(x) is convex,
then f(-x) is
convex.
25
If f(x) is convex,
then K - f(x) is
concave.
26
f(x) = x2.
f(x) = 2x, f(x) = 2
-4
-3
-2
-1
3.5
2.5
2
1.5
1
0.5
0
f(x) = -1/x,
f(x) =
1/x2
-0.5 0
0.5
1.5
2.5
-1
-1.5
-2
27
f(x)+g(x)
7
6
5
4
3
2
1
f(x)
-3
g(x)
0
-2
-1
3 28
max[f(x), g(x)]
7
6
5
4
3
2
1
f(x)
-3
g(x)
0
-2
-1
3 29
f(x) = 4x + 7
f(x) = 4x2 13
f(x) = ex
f(x) = |x|
30
y
f(x)
31
32
y
f(x)
The local
minimum is
a global
minimum
x
33
34
35
36