You are on page 1of 13

ECI 273 Term Paper

UC Davis

Oroville Reservoir Multi-Objective


Optimization
By Nicole Stephanie Osorio

Abstract: Uneven distribution of water resources in time and space magnified the
water shortage problem in some areas. For example, in California, most precipitation
occurs in the north while majority of the demand lies in the central and southern part
of the state which also receives the least annual rainfall. Establishing multi-objective
models and applying effective optimization algorithms is then paramount to optimize
California’s limited water resources. The study develops the non-dominated sorting
genetic algorithm (NSGA) II model and applies the hedging policy in a State Water
Project (SWP) owned reservoir, Oroville dam, based in Butte County, Oroville
California. The study explores a multi-objective reservoir operation (MORO) using
the NSGA II with two objectives of maximizing reliability and minimizing shortage
cost. Results propose a set of candidate policies through a Pareto front to optimize
objective functions with respect to the two-point hedging policy.

Keywords: Multi-objective Optimization; Reservoir Operation; Oroville Dam;


Hedging Policy; NSGA II

1.0 Introduction

As society progresses, the economy develops along with population growth. As a


result, water shortage problems and water supply and demand imbalance have
become more prominent. Reservoirs then are key water resources infrastructure for
development and management. And as water resources systems become more
complex due to competing objectives and increasing regulations, it is necessary for
stakeholders and management agencies to collaborate to maximize water benefits.
SWP manages Oroville dam which operates towards flood control, power
generation, environmental requirements, and water supply. Thus, meeting single-
objective operations concerned only with water supply or hydropower generation
cannot meet actual needs.

Additionally, the problem of optimizing single and multiple reservoir systems is non-
linear, non-convex, and constrained (Scola et al. 2011). There are also many factors
involved in operating multipurpose reservoirs like Oroville Dam that it is realistic for
multi-objective optimization versions to be proposed. Currently, CalSim II is a
simulation model of the Central Valley Project (CVP) and SWP storage distribution
systems that utilizes linear programming (LP) given user-defined constraints and
weights. However, model users express general frustration with CalSim II’s LP
solver. They contend that using LP solvers provides little information on the
infeasibility locations that even a modeler may need many days to debug a run. The
solver also sometimes produces non-unique solutions and running identical
scenarios on different computers can generate varying results (Ferreira et al. 2005).

Due to increasing technological advances, evolutionary algorithms (EAs) have


become more popular in reservoir operation optimization. EAs include artificial
neural networks, genetic algorithm (GA), particle swarm optimization, ant colony
optimization, honey bee mating optimization, and more. (Sun et al. 2018). MOEAs
have also been successfully applied to the MORO problem to obtain a set of Pareto-
optimal solutions in a single run, showing the best trade-off solutions among
N. Osorio / Oroville Reservoir Multi-objective Optimization

competing objectives. A solution is considered Pareto-optimal or nondominated if no


other solution gives a better value for one objective without degrading performance
in at least another objective (Guilani et al. 2014).

The NSGA II algorithm is applied to the Oroville reservoir system in Oroville,


California. The same algorithm also was applied to the multipurpose Bhadra
reservoir system in India also considering two objectives of minimizing irrigation
deficits and maximizing hydropower generation (Reddy and Kumar 2006). Results
showed that NSGA II was able to generate a better Pareto front in terms of optimizing
objective functions of maximizing reliability and minimizing shortages compared to
those of Pareto Envelope-based Selection Algorithm (PESA) II and Strength Pareto
Evolutionary Algorithm (SPEA) II (Azari et al. 2018).

The simplest reservoir policy operation is called “standard operation policy” (SOP)
which strives to meet a target demand. In practice, most operators do not use SOP
and hedging instead is applied. Hedging, a reduction in water supply to save
reservoir water to mitigate future water deficits in cases of extended drought periods,
is an important reservoir policy. Draper and Lund (2003) listed the two-point hedging
rule as one of the most common policies. The two-point hedging consists of a line
(slope <1) connecting a first point, ℎ" , somewhere up from the origin on the shortage
part of the SOP rule to a second point, ℎ# , on the delivery target line. This strategy
reduces releases abruptly below demand to maintain some storage in the cast of an
extended, anticipated drought (Felfelani et al. 2013).

Figure 1: Types of Hedging Rules (Felfelani et al. 2013)

There are only few studies on multi-objective reservoir optimization (MORO) to


balance the objectives of maximizing deliveries and minimizing shortage costs (Sun
et al. 2018). Therefore, the goal of this paper is to apply MORO to Oroville Dam and
Lake Oroville and establish the bi-objectives between minimizing shortage and
maximizing reliability and obtain a set of two-point hedging policy decision variables
to optimize the objective functions.
N. Osorio / Oroville Reservoir Multi-objective Optimization

2.0 Methods

2.1 Study Area

The study area is located in northern California around the city of Oroville in Butte
County. The area’s two main facilities of focus are the Oroville Dam and Lake
Oroville. Oroville Dam is the tallest earth-fill dam, at 770 feet, in the United States.
It also forms the Lake Oroville with a 3.5 million acre-feet (MAF) (Islam et al. 2011).
capacity. Oroville Dam and Lake lie in the foothills of the Sierra Nevada and are
one mile downstream of the junction of the Feather River’s major tributaries.

Figure 2: SWP and Oroville Complex (Yang et. al 2015)

2.1 Multi-Objective Optimization Formulation

Reservoir operations usually manage conflicting objectives. The SWP operates the
Oroville Dam to provide water supply, hydropower, flood control, and fisheries flows.
This paper will focus on two objectives of maximizing reliability and minimizing
shortage cost.

2.1.1 Demand Estimates

Estimating monthly demands for Lake Oroville required analysing historical release
data. Oroville dam daily release data was downloaded from California Data
Exchange Center (CDEC 2012) using sensor code 23 at ORO station ID. Releases
from 2000-2018 water year were considered to simplify the analysis.

Figure 4 displays a monthly release in thousand acre-feet (TAF) chart. The spike at
around month 200 is due to the 2017 Oroville spillway incident. Python was the
programming language used to calculate the mean of the corresponding data. This
mean was found to be approximately 500 TAF/month. The following value will be
one of the inputs for the multi-objective reservoir control Python script.
N. Osorio / Oroville Reservoir Multi-objective Optimization

Figure 3: Monthly Oroville Releases in TAF

2.1.2 Objective Functions and Decision Variables

The multi-objective reservoir control script consists of two objective functions.


:
𝑆ℎ𝑜𝑟𝑡𝑎𝑔𝑒 𝐶𝑜𝑠𝑡 = 𝐽0 = 1 𝑎2𝐷 − 𝑅(𝑡)8
9 (1)

𝑅𝑒𝑙𝑖𝑎𝑏𝑖𝑙𝑖𝑡𝑦 = 𝐽? = 1 2𝑆(𝑡) + 𝑄(𝑡)8 𝑠𝑜 𝑆(𝑡) + 𝑄(𝑡) > ℎ#


9 (2)

Where:

𝐷 = 𝑇𝑎𝑟𝑔𝑒𝑡 𝑌𝑖𝑒𝑙𝑑
𝑅(𝑡) = 𝑅𝑒𝑙𝑒𝑎𝑠𝑒 𝑎𝑡 𝑡𝑖𝑚𝑒𝑠𝑡𝑒𝑝 𝑡
𝑎, 𝑏 = 𝑐𝑜𝑠𝑡 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟𝑠 𝑤ℎ𝑒𝑟𝑒 𝑏 > 1.0 (𝑎 = 0.50, 𝑏 = 2.5 𝑖𝑛 𝑡ℎ𝑖𝑠 𝑝𝑎𝑝𝑒𝑟)
𝑆(𝑡) = 𝑆𝑡𝑜𝑟𝑎𝑔𝑒 𝑎𝑡 𝑡
𝑄(𝑡) = 𝐼𝑛𝑓𝑙𝑜𝑤 𝑎𝑡 𝑡

ℎ" = 1𝑠𝑡 𝑝𝑜𝑖𝑛𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑡𝑤𝑜 − 𝑝𝑜𝑖𝑛𝑡 ℎ𝑒𝑑𝑔𝑖𝑛𝑔 𝑟𝑢𝑙𝑒


ℎ# = 2𝑛𝑑 𝑝𝑜𝑖𝑛𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑡𝑤𝑜 − 𝑝𝑜𝑖𝑛𝑡 ℎ𝑒𝑑𝑔𝑖𝑛𝑔 𝑟𝑢𝑙𝑒

The script is formulated to maximize reliability and minimize shortage costs with
respect to the hedging policy. In this case, the decision variables are ℎ" and ℎ# . The
hedging policy determines the releases at each time step while optimizing the two
objective functions. When demands are not met, the shortage at a certain timestep
incurs a higher value than if the demand at that point was met. As a result, each time
there is a shortage value, found in Equation 1, there is an incurred cost. Large, rare
shortages cost more per unit of water than smaller, more frequent shortages. Thus,
it is sensible to incur small shortages throughout the year to avoid major ones the
following year. This concept is also called hedging.

Parameter a is set to 0.50 while b is 2.5. The user can modify these values as they
fit. For this paper, the values consider the fact that the Oroville reservoir is the SWP’s
N. Osorio / Oroville Reservoir Multi-objective Optimization

largest reservoir at 3.5 million acre-feet (MAF) and the Hyatt Pumping Plant, located
in the bedrock beneath Oroville Dam (Figure 2 and Figure 3) has a combined rated
output of 714,500 KW of electricity. Failure to meet demands can have a detrimental
impact on the SWP’s municipal and industrial (M&I), agricultural (Ag), and fish and
wildlife (F&W) objectives and hydropower generation.

Equation 2 maximizes the reliability objective function. Whenever water available


(Storage and Inflow) is greater than ℎ# , releases meet the demand and thus the
reliability increases. When water available is less than ℎT , the releases are set to the
amount of water remaining in the reservoir.

The last case is when available water is in between ℎT and ℎ# , the release is equal
to as follows:

(𝐷 − ℎ" )
𝑅𝑒𝑙𝑒𝑎𝑠𝑒 = (𝑆(𝑡) + 𝑄(𝑡) − ℎ" ) + ℎ"
ℎ# − ℎ" (3)

2.2 Non-Dominated Sorting Genetic Algorithm (NSGA) II

NSGA II (Deb et al. 2002) is one of the most popular MOEAs with three special
characteristics. These are its fast, non-dominated sorting approach, fast crowded
distance estimation procedure, and simple crowded comparison operator.

The Platypus library (Hadka 2015) is used to implement the NSGA II evolutionary
algorithm in Python.

2.3 Python Code

Oroville Python code (Appendix A) input parameters values were reservoir capacity,
estimated monthly demand, and cost function coefficients (Section 2.1.2).

Gross storage Oroville capacity is 3.5 MAF. The estimated monthly demand was
found in Section 2.1.1 as 500 TAF/month. The estimation code can be found at
Appendix B.

3.0 Results and Discussion

Figure showed the NSGA II Pareto front for the Oroville MORO problem after 10000
iterations. Figure 5 shows that reliability degrades as average shortage costs
decreases.

Figure 6 utilizes lighter colours with lower shortage costs. Optimal values of ℎT are
around 160 TAF while those of ℎ# lie around 3500 TAF. Figure 7 also depicts higher
reliabilities with lighter colours. However, ℎT have less of an impact on reliabilities
compared to that of ℎ# values.

Figure 8 highlights the difficulty of choosing the optimal 2-point hedging policy. This
is since the lowest shortage costs exist around higher ℎ# values of 3000 TAF and
above while the highest reliabilities are found with ℎ# values around 1500 TAF and
below.
N. Osorio / Oroville Reservoir Multi-objective Optimization

Figure 4: Non-dominated solutions of NSGA II in the 10,000th iteration

Figure 5: Hedging points and average shortage cost contour map


N. Osorio / Oroville Reservoir Multi-objective Optimization

Figure 6: Hedging points and reliability contour map

Figure 7: Hedging points scatterplot against shortage cost and reliability contour
maps
N. Osorio / Oroville Reservoir Multi-objective Optimization

4.0 Conclusions and Future Work

The developed model in this study which is based on the NSGA II is appropriately
able to solve complex, nonlinear problems. The model also presents optimum
solutions to apply the hedging policy in a multipurpose reservoir like Lake Oroville.

MOEA applications can make reservoir operations more efficient, making full use of
reservoir capacity and improving comprehensive benefits of the reservoir. This paper
proposes a model of a MORO problem to maximize reliability and minimize shortage
costs. The conclusions are as follows:

1. The Oroville reservoir NSGA II model is reasonable in theory and can be


modified to improve comprehensive benefits of the reservoir. Future work
can incorporate maximizing hydropower at Hyatt and Thermalito Power
Plants and minimizing temperature downstream target exceedance at
Feather River similar to research conducted in Folsom Reservoir (Field and
Lund 2007). With four objectives, visualization methods such as N-
dimensional scatterplots, parallel-coordinate plots, and scatterplot matrices
can be applied to communicate complex results to stakeholders (Guilani et
al. 2014).
2. NSGA II hedging rule optimization results can be applied to a MORO
problem which provides a set of non-dominated solutions that reasonably
reach convergence and are evenly distributed. Future work can incorporate
MOEA at incremental scales to improve the versatility of or complement
common California water resources models such as CalSim II. Additionally,
applying the goal-seeking hedge policy by Felfelani et al. (2013) can also
result in a better outcome compared to that of the two-point hedging rule.
3. The use of the NSGA II-based model shows that maximizing reliability and
minimizing shortages are in conflict. As reservoir operators strive more
delivery reliability, shortage costs can increase when there is not enough
reservoir storage in drought and dry periods. The study contributes a set of
candidate hedging policies that can aid SWP dam operators in balancing
reducing shortage costs and increasing reliabilities.
N. Osorio / Oroville Reservoir Multi-objective Optimization

Appendix A: Main Python Code

# MAIN CODE

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from platypus.algorithms import NSGAII
from platypus.core import Problem
from platypus.types import Real

cfs_to_taf = 2.29568411*10**-5 * 86400 / 1000

# Set some parameters


K = 3538 # capacity, TAF
D = 300 # target yield, TAF/month
a = 0.50
b = 2.5 # cost function parameters

# data setup

df = pd.read_csv('ORO_DAILY_2000-2018_INF_cfs.csv', index_col=[0],
parse_dates=True) # loads daily inflow data Oroville Dam
df.drop(df.columns[df.columns.str.contains('unnamed',case=False)], axis=1,
inplace=True) # removes unnamed column
df["INFLOW"] = pd.to_numeric(df["INFLOW"], errors='coerce')
Q = ( cfs_to_taf * df["INFLOW"]).resample('M').sum().values # resampled daily
inflow to monthly
T = len(Q)

# same function, but now returns 2 objectives


def simulate(x):
S = np.zeros(T)
R = np.zeros(T)
cost = np.zeros(T)
h0 = x[0]
hf = x[1]

S[0] = K # start simulation full


reliability = 0

for t in range(1,T):

# new storage: mass balance, max value is K


S[t] = min(S[t-1] + Q[t-1] - R[t-1], K)

# determine R from hedging policy


W = S[t] + Q[t]
if W > hf:
R[t] = D
reliability += 1.0/T
elif W < h0:
R[t] = W
else:
R[t] = (D-h0)/(hf-h0)*(W-h0)+h0

shortage = D-R[t]
N. Osorio / Oroville Reservoir Multi-objective Optimization

cost[t] = a*shortage**b

return [cost.mean(), reliability]

# Problem(number of decisions, number of objectives)


problem = Problem(2, 2)
problem.types[0] = Real(0,D)
problem.types[1] = Real(D,K+D)
problem.directions[1] = Problem.MAXIMIZE
problem.function = simulate

algorithm = NSGAII(problem)

# optimize the problem using 10000 function evaluations


algorithm.run(10000)

# just plotting below here ~~~~~~~~~~~~~


# convert data to numpy first..
obj = np.array([s.objectives for s in algorithm.result])
x = np.array([s.variables for s in algorithm.result])

# to make a contour plot...


h0s = np.arange(0,D,5)
hfs = np.arange(D,K+D,5)
X,Y = np.meshgrid(h0s, hfs)
costs = np.zeros((len(h0s),len(hfs)))
rels = np.zeros((len(h0s),len(hfs)))
i,j = 0,0

# fill in matrices for contour plot


for i,h0 in enumerate(h0s):
for j,hf in enumerate(hfs):
costs[i,j],rels[i,j] = simulate([h0,hf])

# SHORTAGE COLORMAP
# Colormap of Shortage Cost vs h0 and hf
%config InlineBackend.figure_format = 'svg'
plt.contour(X,Y,costs.T, 50, cmap=plt.cm.autumn_r)
plt.colorbar()
plt.xlabel(r'$h_0$')
plt.ylabel(r'$h_f$')
plt.title('Average Shortage Cost ($)')
plt.show()

# RELIABILITY COLORMAP
plt.contour(X,Y,rels.T, 50, cmap=plt.cm.OrRd_r)
plt.colorbar()
plt.xlabel(r'$h_0$')
plt.ylabel(r'$h_f$')
plt.title('Reliability')
plt.show()

# h0 and hf SCATTERPLOT
plt.scatter(x[:,0],x[:,1], s=30, color='k', zorder=5)
plt.xlabel(r'$h_0$')
N. Osorio / Oroville Reservoir Multi-objective Optimization

plt.ylabel(r'$h_f$')

plt.show()

# PARETO FRONT
plt.scatter(obj[:,0],obj[:,1], s=30, color='k')
plt.xlabel('Shortage Cost')
plt.ylabel('Reliability')

plt.show()

# DETAILED CONTOUR MAP AND SCATTER PLOT


plt.contour(X,Y,costs.T, 50, cmap=plt.cm.cool)
plt.contour(X,Y,rels.T, 50, cmap=plt.cm.Reds)
plt.scatter(x[:,0],x[:,1], s=30, color='k', zorder=5)
plt.xlabel(r'$h_0$')
plt.ylabel(r'$h_f$')
N. Osorio / Oroville Reservoir Multi-objective Optimization

Appendix B: Outflow Estimation Python Code

# OUTFLOW ESTIMATION

# release data

dfrel = pd.read_csv('ORO_DAILY_2000-2018_REL_cfs.csv', index_col=[0],


parse_dates=True) # loads daily inflow data Oroville Dam
dfrel.drop(dfrel.columns[dfrel.columns.str.contains('unnamed',case=False)], axis=1,
inplace=True) # removes unnamed column
dfrel["OUTFLOW"] = pd.to_numeric(dfrel["OUTFLOW"], errors='coerce') # dfrel is
cfs/day
O = (cfs_to_taf * dfrel.OUTFLOW).resample('M').sum().values # O has been
resampled to TAF/month
O = np.round(O,2)

# monthly release graph

plt.plot(O)
plt.xlabel('Months from 10/2000')
plt.ylabel('Monthly Oroville Release (TAF)')

#calculate mean
np.mean(O) # estimated monthly demand at Oroville

# daily release graph

plt.plot(dfrel.OUTFLOW)
plt.xlabel('Year')
plt.ylabel('Daily Oroville Release (cfs)')
N. Osorio / Oroville Reservoir Multi-objective Optimization

REFERENCES

Azari, A., Hamzeh, S., and Naderi, S., Multi-Objective Optimization of the Reservoir
System Operation by Using the Hedging Policy, Water Resources Management:
An International Journal, Published for the European Water Resources
Association (EWRA), Springer; European Water Resources Association (EWRA),
vol. 32(6), pages 2061-2078, (2018).
CDEC. “California Data Exchange Center – Query Tools.” California Data Exchange
Center http://cdec.water.ca.gov/dynamicapp/selectQuery, 2012. (Mar. 18, 2019).
Deb, K., et. al. A fast and elitist multiobjective genetic algorithm: NSGA-II, IEEE
Trans. on Evol. Comp.,6(2): 182–197, (2002).
Draper, A.J., and Lund, J.R., Optimal hedging and carryover storage value. J Water
Resour Plan Manage. 137(1): 113-122, (2003).
Felfelani, F., Movahed, AJ., Zarghami, M., Simulating hedging rules for effective
reservoir operation by using system dynamics: a case study of Dez Reservoir,
Iran. Lake Reservoir Manage 29(2):126–140, (2013).
Ferreira, I.C., Tanaka, S.K., Hollinshead, S.P., Lund, J.R., Musings on a model:
CalSim II in California’s water community. San Francisco Estuary and Watershed
Science. Vol. 3, Issue 1 (March 2005), Article 1., (2005).
Field, R., & Lund, J. R., Multi-objective optimization of Folsom Reservoir operation.
In Operating Reservoirs in Changing Conditions (pp. 205-214), (2006).
Guilani, M., Herman J.D., Castelleti, A., and Reed, R., Many-objective reservoir
policy identification and refinement to reduce policy inertia and myopia in water
management, Water Resour. Res., 50, 3355-3377, doi:10.1002/2013WR014700,
(2014).
Hadka, D., Platypus: A Free and Open Source Python Library for Multiobjective
Optimization, (2015).
Islam, N., et al. “CalLite: California Central Valley water management screening
model.” J. Water Resour. Plann. Manage., 10.1061, (2011).
Reddy, M.J. and Kumar, Optimal Reservoir Operation Using Multi-Objective
Evolutionary Algorithm, Water Resour Manage 20: 861., (2006).
Scola, L. A., Neto, O. M., Takahashi, R. H. C., and Cerqueira, S. A. A. G., Multi-
objective optimal multiple reservoir operation, in Proc. IEEE Congress in
Evolutionary Computation, 2011, pp. 1927–1933, (2011).
Sun, X., Luo, J., Xie, J., Multi-Objective Optimization for Reservoir Operation
Considering Water Diversion and Power Generation Objectives. Water;
10(11):1540, (2018).
Yang, T., Gao, X., Sellars, S. L., and Sorooshian, S., Improving the multi-objective
evolutionary optimization algorithm for hydropower reservoir operations in the
California Oroville–Thermalito complex. Environmental Modelling & Software, 69,
262-279, (2015).
Zhao, T., Cai X., and Yang, D., Effect of streamflow forecast uncertainty on real-time
reservoir operation. Adv Water Resour. 34(4): 495-504, (2011).

You might also like