water resources planning and management daene c. mckinney optimization
TRANSCRIPT
Water Resources Planning and Management
Daene C. McKinney
Optimization
ReservoirsHoover Dam
158 m35 km3
2,074 MW
Grand Coulee Dam100 m
11.8 km36,809 MW
Toktogul Dam140 m
19.5 km31,200 MW
Dams
• Masonry dams– Arch dams
• Gravity dams
• Embankment dams• rock-fill and earth-fill dams
• Spillways
Reservoir
Qt Rt
St
K
Rt
K
St
Qt
Example• Allocate reservoir release Rt to 3 users and provide instream flow Qt
Operating Policy Allocation Policy
release Rt
inflow It
storage St
Optimization
• Benefit
• Decision variables
• Objective:
• Constraints:
Optimization model
Simulation
Operating Policy
Allocation Policy
Simulation vs Optimization• Simulation models: Predict response to given design• Optimization models: Identify optimal designs or policies
Modeling Process• Problem identification
– Important elements to be modeled – Relations and interactions between them– Degree of accuracy
• Conceptualization and development– Mathematical description– Type of model – Numerical method - computer code– Grid, boundary & initial conditions
• Calibration– Estimate model parameters– Model outputs compared with actual outputs– Parameters adjusted until the values agree
• Verification– Independent set of input data used – Results compared with measured outputs
Problem identificationand description
Model verification & sensitivity analysis
Model Documentation
Model application
Model calibration & parameter estimation
Model conceptualization
Model development
Data
Present results
Example – Water Users
Allocate release to users and provide instream flow
Obtain benefits from allocation of xi, i = 1,2,3
Bi(xi) = benefit to user i from using amount of water xi
3,2,1)( 2 ixbxaxB iiiiii
0
5
10
15
20
25
30
35
0 1 2 3 4 5 6 7 8 9 10Allocation, x
Ben
efit
, B
B1
B2
B3
Example
• Decision variables:
)(
3
1
2
QRx
subject to
xbxa maximize
ii
3
1iiiii
x
Note: if sufficient water is available the allocations are independent and equal to
How?
8,33.2,3 *3
*2
*1 xxx
• Objective:
• Optimization model:
• Constraint:
3
1iiiii xbxamaximize )( 2
QRxxx 321
3,2,1, ixi
Optimization Problems
Objective function
Decision variables
Constraint set
Optimization Problems
while satisfying constraints
x
f(x)
x*
minimum
x*
x
f(x)
Xa b
X={x: a<x< b}Feasible region
Find the decision variables, x, that optimize (maximize or minimize) an objective function
Example
22221
2121 3),( Minimize xxxxxxxf
032
02
212
211
xxx
f
xxx
f
2
1*2
*1
x
x
01
23
0
1
2
3
-4
-2
0
2
4
6
8
10
F(x1,x2)
X2
X1
Existence of Solutions
• Weierstrass Theorem – Describes conditions on the objective function and the
constraint set so that we are guaranteed that solutions will always exist• Constraint set is compact (closed and bounded)• Objective function is continuous on the constraint set
x*
x
f(x)
Xa b
X={x: a<x< b}Feasible region
Convex Sets
convex
nonconvex
x
y
x
y
If x and y are in the set, then z is also in the set, i.e., don’t leave the set to get from x to y yxz )1( aa
Convex Functions
])1([ yx aaf
)(xf
x y
)( yf
)(xf
)()1()( yx faaf
yx )1( aa x
Line segment joining points on a convex function does not lie below the function
)()1()()]()1()([ yxyx faaffaaff
Linear functions are convex.
Existence of Global Solutions
• Local-Global Theorem (maximization)– Describes conditions for a local solution to be global
• Constraint set is compact and convex• Objective function is continuous on the constraint set and
concave• Then a local maximum is global
x
f(x)
x*
Global maximum
Concave function
X
Solutions – Global or Local?
x
Global Max Local Max
Feasible region: X
f(x)
Global Min
Local Min
Xff
X
xxx
x
)(*)(
and,*
*))(()(*)(
and,*
xxxxx
x
NXff
X
Global Max
Local Max
Solutions
Local - Global Theorem:
1. If X is convex and f(x) is a convex function, then a local minimum is a global minimum
x
f(x)
x*
Global minimum
Convex function
X
x
f(x)
x*
Global maximum
Concave function
X
2. If X is convex and f(x) is a concave function, then a local maximum is a global maximum
Types of Optimization Problems
NonlinearProgram
Linear
Program
)(
)(
subject to
)( minimize
0xg
0xh
x
x
f
0x
bAx
x
subject to
minimize1
n
iii xc
Classic
Program
0xh
x
x
)(
subject to
)( minimize
f
No ConstraintsSingle Decision Variable
• First-order conditions for a local optimum
x
f(x)
x*
Global minimum
Convex function
X• Second-order conditions
for a local optimum
No constraints
Tangent is horizontal
Curvature is upward
Scalar
x
x
)( minimize f
No ConstraintsMultiple Decision Variables
• First-order conditions for a local optimum
• n - simultaneous equations
No constraintsVector
Classical Program
General Form Example
0xh
x
x
)(
subject to
)( minimize
f
02
subject to
21 Minimize
21
22
21
xx
xx
All equality constraints
Single ConstraintMultiple Decision Variables
One constraint
Vector
Single ConstraintMultiple Decision Variables
Lagrangian
First-order conditionsN+1 equations
Example
3tosubject
Minimize
321
313221
xxx
xxxxxx
03
0
0
0
321
213
312
321
xxxL
xxx
L
xxx
L
xxx
L
2
1
1
1
*
*3
*2
*1
x
x
x
]3[
)]([)(),(
321313221
xxxxxxxxx
hfL
xxxLagrangean
First – order conditionsNotice the signs
Example
• Decision variables:
)(
3
1
2
QRx
subject to
xbxa maximize
ii
3
1iiiii
x
Note: if sufficient water is available the allocations are independent and equal to
How?
8,33.2,3 *3
*2
*1 xxx
• Objective:
• Optimization model:
• Constraint:
3
1iiiii xbxamaximize )( 2
QRxxx 321
3,2,1, ixi
Example
Lagrangean
QRxxbxa,xL
ii
3
1iiiii )(
3
1
2
0
02
02
02
321
3333
2222
1111
QRxxxL
xbax
L
xbax
L
xbax
L
3,2,1
2*
i
b
ax
i
ii
3
1
3
1*
1
22
i i
i i
i
b
QRb
a
First – order conditions Notice the signs
Example
3,2,1)( 2 ixbxaxB iiiiii
5.0;5.1;0.1
8;7;6
321
321
bbb
aaa
Q x1 x2 x3 R
Total Downstream
Flow 5.00 0.18 0.45 2.36 5.64 2.00 2.00 8.00 1.00 1.00 4.00 4.00 2.00 2.00
10.00 1.55 1.36 5.09 2.91 2.00 2.00 15.00 2.91 2.27 7.82 0.18 2.00 2.00 16.00 3.00 2.33 8.00 0.00 2.00 2.67 20.00 3.00 2.33 8.00 0.00 2.00 6.67
i
i
x
B
Q
NB
Equal marginal benefits (slopes)
for all users
0
5
10
15
20
25
30
35
0 1 2 3 4 5 6 7 8 9 10Allocation, x
Be
ne
fit,
B
B1
B2
B3
x 1*x 2* x 3*
Release Allocation RuleAllocation rule tells you the amount of released
water allocated to each use
Classical ProgrammingVector Case – Multiple Constraints
Lagrangian
First-order conditions N+M equations
M constraintsVector
0xh
x
x
)(
subject to
)( minimize
f
m
iii
)(hfL1
)(),( xxx
0
)...( 11
1
j
mm
jj
m
i j
ii
jj
x
h
x
h
x
f
x
h
x
f
x
L
0xhλ
)(L N equations
M equations
Example
0,edunrestrict
10
5
subject to
,
4 minimize
21
21
1
21
121
xx
xx
x
x x
xxxZ
)10()5(4
),(
2122311121
xxxxxxx
L
x
010
05
02
04
014
212
231
1
313
212
2121
xxL
xxL
xx
L
xx
L
xx
L
solution?validathisIs
5,5
:Suppose
21 xx
From Revelle, C. S., E. E. Whitlach, and J. R. Wright, Civil and Environmental Systems Engineering, Prentice Hall, Upper Saddle River, 1997
Nonlinear Program
General Form Example
)(
)(
subject to
)( minimize
0xg
0xh
x
x
f
0,0
32
subject to
1xln Maximize
21
21
21
xx
xx
x
Reservoir with Power Plant
Hoover Dam
earliest known dam - Jawa, Jordan - 9 m high x1 m wide x 50 m long, 3000 BC
Reservoir with Power Plant
Qt Rt
St
K
Et
Rt
K
St
EtHt
Qt
Reservoir with Power
Tt
RHkE
SHSHH
KS
SRQS
E
ttt
ttt
t
tttt
T
tt
,...,1
2
)()(
tosubject
Maximize
1
1
1
K
Qt Rt
St
Et
Qt Inflows (L3/time period)St Storage volume (L3)K Capacity (L3)Rt Release (L3 /period)Et Energy (kWh)Ht Head (L)k Coefficient (efficiency, units)
Maximize power production given capacity and inflows
Nonlinear