Вы находитесь на странице: 1из 14

Lecture 6

Dynamic Programming
Bruce F. Wollenberg, University of
1
Minnesota
A Dynamic Programming example

We are given a set of cities with


paths between them. The number
next to each path is the cost
of using that path. You are to find
the cheapest path from A to N

Bruce F. Wollenberg, University of


2
Minnesota
The Principle of Optimality

An optimal policy must contain only optimal subpolicies.

A policy is optimal if, at a stated stage, whatever the


preceding decisions may have been, the decisions still
to be taken constitute an optimal policy when the result
of the previous decisions is included.

Bruce F. Wollenberg, University of


3
Minnesota
Optimizing by stages City
Min cost

The vertical dotted lines divide the


cities in our problem into stages
which are numbered from I to V
at the bottom.
{ X i } Are the choices at the end
of each stage, for example
[{ X 3 }= {H, I, J, K}]

Va ( X i , X i + 1)
Is the cost to travel from
City i to city i+1 in stage a
fa ( X i )
Is the minimum cost to arrive at city i at the end of stage a starting
From A
Bruce F. Wollenberg, University of
4
Minnesota
Mathematics of DP

Bruce F. Wollenberg, University of


5
Minnesota
Final Solution

We will use this kind of dynamic programming solution to solve unit commitment
and hydro scheduling problems in later chapters

Bruce F. Wollenberg, University of


6
Minnesota
An allocation problem

Determine X 1, X 2 , X 3 , X 4 to maximize total profit


Bruce F. Wollenberg, University of
7
Minnesota
Solve the allocation in stages

where =
f 2 (U1 ) max [V1 ( X 1 ) + V2 (U1 X 1 )]
X 1 = 0,1,U
, 1
Bruce F. Wollenberg, University of
8
Minnesota
Profits for stage 2 alone

Bruce F. Wollenberg, University of


9
Minnesota
Stage 3

where =
f 3 (U 2 ) max [ f 2 (U1 ) + V3 (U 2 U1 )]
U1 = 0,1,2 ,U
, 2

Bruce F. Wollenberg, University of


10
Minnesota
Profits for stage 3 alone

Bruce F. Wollenberg, University of


11
Minnesota
Stage 4

where =
f 4 ( A) max[ f 3 (U 2 ) + V4 ( A U 2 )]
{U 2 }

Bruce F. Wollenberg, University of


12
Minnesota
Profits for stage 4

Final answer for


We can use this allocation dynamic programming technique A = 10
to find the optimum dispatch for generators that do not conform to the
convex cost function requirement

Bruce F. Wollenberg, University of


13
Minnesota
THANK YOU

Bruce F. Wollenberg, University of


14
Minnesota

Вам также может понравиться