Static and Dynamic Optimization

advertisement
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Static and Dynamic Optimization
Course Introduction
Niels Kjølstad Poulsen
Informatics and Mathematical Modelling
build. 321, room 016
The Technical University of Denmark
email: nkp@imm.dtu.dk
phone: +45 4525 3356
L1
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Dynamic Optimization
What is Dynamic Optimization?
Dynamic Optimization has 3 ingredients:
Some dynamics. Here described by a state space model.
A performance index (cost function, objective function). In our case it is a
summation (or integral) of contribution over a period of time of fixed or free length
(might be a part of the optimization).
Eventually some constraints (on the decisions or on the states)
Lets have a look at some examples:
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Optimal pricing
Optimal pricing
We are producing a product (brand A) and have to determine its price ui > u (u being
the production cost).
0 1
2
N
There is a competitor product B and a problem. If the price is to high the share of the
marked xi (0 ≤ xi ≤ 1) will quickly be too small.
Objective:
Max J where J =
N−1
X
i=0
A
´
`
Mxi ui − u
q
1−x
B
x
p
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Optimal pricing
How does the marked share evolve? - we need a model!
Transition probability A−>B
q
p
Transition probability B−>A
1
1
Attraction prob.
Escape prob.
B −> A
A −> B
0
0
price
price
Dynamics:
xi+1
A→A
B→A
`
´
`
´
= 1 − p[ui ] xi + q[ui ] 1 − xi
NKP - IMM - DTU
x0 = x 0
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Optimal pricing
Recap Optimal Pricing
Dynamics:
`
´
`
´
xi+1 = 1 − p(ui ) xi + q(ui ) 1 − xi
x0 = x 0
Objective:
Max J where
J=
N−1
X
i=0
`
´
Mxi ui − u
Notice: This is a discrete time model. No constraints. The length of the period (the
horizon, N) is fixed.
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Optimal pricing
If ui = u + 5 (u = 6, N = 10) we get J = 9 (approx).
0.25
0.2
x
0.15
0.1
0.05
0
0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
9
10
12
10
u
8
6
4
2
0
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Optimal pricing
Optimal pricing (given correct model): J = 26 (approx).
1
0.8
x
0.6
0.4
0.2
0
0
1
2
3
4
5
6
7
8
9
10
12
10
u
8
6
4
2
0
0
1
2
3
NKP - IMM - DTU
4
5
6
7
8
9
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Optimal pricing
Free Dynamic Optimization
Dynamics (described by a state space model):
xi+1 = fi (xi , ui )
x0 = x 0
Objective (to optimize the index):
J = φN (xN ) +
N−1
X
Li (xi , ui )
i=0
Here N and x 0 are fixed (given), J, φ and L are scalars. x and f are n-dimensional
vector and vector function and u is a vector of decisions.
Notice: no constraints (except given by the dynamics).
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Inventory control
Stock
Dynamics:
xi+1 = xi + ui − si
Stock :
Production:
Sale:
Order:
xi
ui
si
wi
x0 = x 0
0 ≤ xi ≤ x̄
0 ≤ ui ≤ ū
0 ≤ si ≤`xi
´
si = Min xi , wi
Notice: constraints on decisions and states.
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Goal:
to avoid situation with no stock
to reduce stock charge
to obtain an even production.
Objective (index to be maximized):
J=
N−1
X
i=0
`
´
p si − c ui − k xi − h Max wi − si , 0
where p, c, k and h are constants (prices).
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Constrained Dynamic Optimization
Dynamics (described by a state space model):
xi+1 = fi (xi , ui )
x0 = x 0
Objective (to optimize the index):
J = φN (xN ) +
N−1
X
Li (xi , ui )
i=0
Constraints:
g(xi , ui ) ≤ Ci
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Variations of the problem
Dynamic optimization with:
Terminal constraints (take the system from one place to another).
Constraints (on ui and xi within the horizon).
Continuous time problems
Open final time (Minimum time problems).
Stochastic elements (orders in the inventory problem).
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Minimum drag nose shape (Newton)
Find the shape i.e. r (x) of a axial symmetric nose, such that the drag is minimized.
θ(x) is the angle between the velocity direction and the local tangent to the nose.
D = 2πq
Z
l
Cp (θ)rdr
q=
0
1 2
ρV
2
Cp (θ) = 2sin(θ)2 for θ ≥ 0
dynamic pressure
y
θ
Flow
a
x
V
l
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
y
θ
Flow
a
x
V
l
Dynamic:
∂r
= −u
∂x
r0 = a
tan(θ) = u
Cost function (drag coefficient):
Z l
D
ru 3
Cd =
= 2rl2 + 4
dx
2
2
qπa
0 1+u
NKP - IMM - DTU
≤1
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
1
0.8
0.6
0.4
r//a
0.2
0
−0.2
.750
.321
.165
−0.4
Cd = .098
−0.6
−0.8
−1
0
0.5
1
1.5
NKP - IMM - DTU
2
x/a
2.5
3
3.5
Static and Dynamic Optimization (02711)
4
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Free Dynamic Optimization (C)
Find a function ut t ∈ [0; T ] which takes the system system
ẋ = ft (xt , ut )
from its initial state x 0 along trajectories such that the performance index
Z T
Lt (xt , ut ) dt
J = φT [xT ] +
0
is minimized.
NKP - IMM - DTU
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Min. Time Orbit Transfer
Trust direction programme for minimum time transfer from Earth orbit to Jupiter orbit.
2
1.5
JUPITER ORBIT
1
SUN
y/ro
0.5
0
−0.5
EARTH ORBIT
−1
−1.5
−6
−5
−4
−3
−2
−1
0
1
x/ro
ṙ = u
u̇ =
1
v2
− 2 + a sin(θ)
r
r
NKP - IMM - DTU
v̇ = −
uv
+ a cos(θ)
r
Static and Dynamic Optimization (02711)
Dynamic Optimization
Free Dynamic Optimization
Variations of the problem
Inventory control
Minimum drag
Min. Time Orbit Transfer
Min. Time Orbit Transfer
2
1.5
JUPITER ORBIT
1
SUN
y/ro
0.5
0
−0.5
EARTH ORBIT
−1
−1.5
−6
−5
−4
−3
−2
−1
0
1
x/ro
2
3 2
r
d 4
6
u 5=4
dt
v
u
2
3
7
v
− r12 + a sin(θ) 5
r
uv
− r + a cos(θ)
NKP - IMM - DTU
2
3
Initial conditions
4 Terminal conditions 5
J=T
Static and Dynamic Optimization (02711)
Download