Abstract
Decisionmakers are increasingly willing to consider the uncertainty associated with model predictions of the economic, environmental, or social impacts associated with possible decisions. Information on uncertainty does not make decisionmaking easier, but to ignore it is to ignore reality. Incorporating what is known about the uncertainty of input parameters and variables used in optimization and simulation models can help in quantifying the uncertainty in the resulting model output. This chapter outlines and illustrates some approaches for doing this.
Keywords
 Joint Probability
 Volume Unit
 Storage Volume
 Chance Constraint
 Unconditional Probability
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Download chapter PDF
Decisionmakers are increasingly willing to consider the uncertainty associated with model predictions of the economic, environmental, or social impacts associated with possible decisions. Information on uncertainty does not make decisionmaking easier, but to ignore it is to ignore reality. Incorporating what is known about the uncertainty of input parameters and variables used in optimization and simulation models can help in quantifying the uncertainty in the resulting model output . This chapter outlines and illustrates some approaches for doing this.
7.1 Introduction
Water resource planners and managers work in an environment of change and uncertainty. Water supplies are always uncertain, if not in the short term at least in the long term. Water demands and the multiple purposes and objectives water serve tend to change over time, and these changes cannot always be predicted. Many of the parameters of models used to predict the multiple hydrologic, economic, environmental, ecological, and social impacts are also uncertain. Indeed, models used to predict these impacts are, at least in part, based on many uncertain assumptions. This uncertainty associated with planning and managing cannot be avoided (WWAP 2012).
To the extent that probabilities can be included where appropriate in models and their inputs at least some of the uncertainty of their outputs can be identified and quantified. These models are called probabilistic or stochastic models. Most probabilistic models provide a range of possible values for each output variable along with their probabilities. Stochastic models attempt to model the random processes that occur over time, and provide alternative time series of outputs along with their probabilities. In other cases sensitivity analyses (solving models under different assumptions) can be carried out to estimate the impact of any uncertainty on the decisions being considered. In some situations uncertainty may not significantly impact the decisions that should be made. In other situations it will. Sensitivity analyses can help guide efforts needed to reduce that uncertainty. Model sensitivity and uncertainty analysis are discussed in more detail in the next chapter.
This chapter is divided into two main sections. The first section introduces a number of approaches to probabilistic optimization and simulation modeling . Probabilistic models will be developed and applied to some of the same water resources management problems used to illustrate deterministic modeling in previous chapters. These modeling methods could be, and have been, applied to numerous other water resources planning and management problems as well. The purpose here, however, is simply to illustrate some of these commonly used approaches to probabilistic modeling and show how they can be applied to water resources system design and operating problems.
7.2 Generating Values from Known Probability Distributions
As discussed in the previous chapter, variables whose values cannot be predicted with certainty are called random variables. Often inputs to hydrologic simulation models are observed or synthetically generated values of rainfall or streamflow. Other examples of such random variables could be evaporation losses, point and nonpoint source wastewater discharges , demands for water, spot prices for energy that may impact the amount of hydropower to produce, etc. Random processes are considered stationary if the statistical attributes of the process are not changing. If there is no serial correlation in the spatial or temporal sequence of observed values, then such stationary random processes can be characterized by single probability distributions. These probability distributions are often based on past observations of the values of the random variable. These past observations or measurements are used either to define the probability distribution itself or to estimate parameter values of an assumed type of distribution.
Let R be a random variable whose probability density distribution, f _{ R }(r), is as shown in Fig. 7.1. This distribution indicates the probability or likelihood of an observed value of the random variable R being between any two values of r on the horizontal axis. For example, the probability of an observed value of R being between 0 and r* is p*, the shaded area to the left of r* in Fig. 7.1. The entire area under a probability density distribution, as shown in Fig. 7.1, is 1.
Integrating this function over the entire range of r, converts the density function to a cumulative distribution function, F _{ R }(r*), ranging from 0 to 1, as illustrated in Fig. 7.2.
Given any value of p* from 0 to 1, one can find its corresponding random variable value r* from the inverse of the cumulative distribution function.
From the distribution shown in Fig. 7.1 it is obvious that the likelihood of different values of the random variable varies; values in the vicinity of r* are much more likely to occur than are values at the tails of the distribution. A uniform distribution is one that looks like a rectangle; any value of the random variable between its lower and upper limits is equally likely. Using Eq. 7.2, together with a series of uniformly distributed (all equally likely) values of p* over the range from 0 to 1 (i.e., along the vertical axis of Fig. 7.2), a corresponding series of random variable values, r*, associated with any distribution can be generated. These random variable values will have a cumulative distribution as shown in Fig. 7.2, and hence a density distribution as shown in Fig. 7.1, regardless of the types or shapes of those distributions. The mean and variance of the distributions will be maintained.
The mean and variance of continuous distributions are
The mean, variance and serial correlations of discrete distributions having possible values denoted by r _{ i } with probabilities p _{ i } are
If a time series of T random variable values, r _{ t }, generated from the distribution of the same stationary random variable , R, exist, then the serial or autocorrelations of r _{ t } and r _{ t+k } in this time series for any positive integer k are
The probability density and corresponding cumulative probability distributions can be of any shape, not just those named distributions commonly found in probability and statistics books.
The process of generating a time sequence t = 1, 2, … of inputs, r _{ t }, from the probability distribution of a random variable R where the lag 1 serial correlation , ρ _{ R }(1) = ρ, is to be preserved is a little more complex. The expected value of the random variable R _{ t+1} depends on the observed value, r _{ t }, of the random variable R _{ t }, together with the mean of the distribution, E[R], and the correlation coefficient ρ. If there is no correlation (ρ is 0), the expected value of R _{ t+1} is the mean of the population, E[R]. If there is perfect correlation (ρ is 1), the expected value of R _{ t+1} is r _{ t }. In general, the expected value of R _{ t+1} given an observed value r _{ t } of R _{ t } is
The variance of the random variable R _{ t+1} depends on the variance of the distribution, Var[R], and the lag one correlation coefficient, ρ.
If there is perfect correlation (ρ = 1) the process is deterministic and there is no variance. The value for r _{ t+1} is r _{ t }. If there is no correlation, i.e., serial correlation does not exist (ρ = 0), the generated value for r _{ t+1} is its mean, E[R], plus some randomly generated deviation from a normal distribution having a mean of 0 and a standard deviation of 1, denoted as N(0, 1). In this case the value r _{ t+1} is not dependent on r _{ t }.
When the serial correlation is more than 0 but less than 1, then both the correlation and the standard deviation (the square root of the variance) influence the value of r _{ t+1}. A sequence of random variable values from a multivariate normal distribution that preserves the mean, E[R], overall variance, Var[R], and lag one correlation ρ, can be obtained from Eq. 7.10.
The term N(0, 1) in Eq. 7.10 is a random number generated from a normal distribution having a mean of 0 and a variance of 1. The process involves selecting a random number from a uniform distribution ranging from 0 to 1, and using it in Eq. 7.2 for a N(0, 1) distribution to obtain a value of random number for use in Eq. 7.10. This positive or negative number is substituted for the term N(0, 1) in Eq. 7.10 to obtain a value r _{ t+1}. This is shown on the graph in Fig. 7.3.
Simulation models that have random inputs, such as a series of r _{ t } values, will generally produce random outputs. After many simulations, the probability distributions of each random output variable value can be defined. These then can be used to estimate reliabilities and other statistical characteristics of those output distributions. This process of generating multiple random inputs for multiple simulations to obtain multiple random outputs is called Monte Carlo simulation .
7.3 Monte Carlo Simulation
To illustrate Monte Carlo simulation, consider the allocation problem involving three firms, each of which receives a benefit, B _{ i }(x _{ it }), from the amount of water, x _{ it }, allocated to it in each period t. This situation is shown in Fig. 7.4. Monte Carlo simulation can be used to find the probability distribution of the benefits to each firm associated with the firm’s allocation policy.
Suppose the policy is to keep the first two units of flow in the stream, to allocate the next 3 units to Firm 3, and the next 4 units to firms 1 and 2 equally. The remaining flow is to be allocated to each of the three firms equally up to the limits desired by each firm, namely 3.0, 2.33, and 8.0, respectively. Any excess flow will remain in the stream. The plots in Fig. 7.5 illustrate this policy. Each allocation plot reflects the priorities given to the three firms and the users further downstream.
A simulation model can now be created. In each of a series of discrete time periods t, the flows Q _{ t } are drawn from a probability distribution, such as from Fig. 7.2 using Eq. 7.2. Once this flow is determined, each successive allocation, x _{ it }, is computed. Once an allocation is made it is subtracted from the streamflow and the next allocation is made based on that reduced streamflow, in accordance with the allocation policy defined in Fig. 7.5. After numerous time steps the probability distributions of the allocations to each of the firms can be defined.
Figure 7.6 shows a flow chart for this simulation model.
Having defined the probability distribution of the allocations, based on the allocation policy, one can now consider each of the allocations as random variables , X _{1}, X _{2}, and X _{3} for firms 1, 2 and 3, respectively.
7.4 Chance Constrained Models
For models that include random variables it may be appropriate in some situations to consider constraints that do not have to be satisfied all the time. Chance constraints specify the probability of a constraint being satisfied, or the fraction of the time a constraint has to apply. Consider, for example, the allocation problem shown in Fig. 7.4. For planning purposes, the three firms may want to set allocation targets , not expecting to have those targets met 100% of the time. To insure, for example, that an allocation target, T _{ i }, of firm i will be met at least 90% of the time, one could write the chance constraint
In this constraint, the allocation target T _{ i } is an unknown decision variable, and X _{ i } is a random variable whose distribution has just been computed and is known.
To include chance constraints in optimization models , their deterministic equivalents must be defined. The deterministic equivalents of these three chance constraints in Eq. 7.11 are
where \( x_{it}^{0. 10} \) is the particular value of the random variable X _{ i } that is equaled or exceeded 90% of the time. This value is shown on the probability distribution for X _{ i } in Fig. 7.7.
To modify the allocation problem somewhat, assume the benefit obtained by each firm is a function of its target allocation and that the same allocation target applies in each time period t. The equipment and labor used in the firm is presumably based on the target allocations . Once the target is set assume there are no benefits gained by excess allocations of water. If the benefits obtained are to be based on the target allocations, rather than the actual allocations, then the optimization problem is one of finding the values of the three targets that maximize the total benefits obtained with a reliability of, say, at least 90%.
Subject to:
where Q _{ t } is the random streamflow variable upstream of all diversion sites. If the same unconditional probability distribution of Q _{ t } applies for each period t then only one Eq. 7.14 is needed.
Assuming the value of the streamflow, \( q_{t}^{0.10} \), that is equaled or exceeded 90% of the time, is greater than 2 (the amount that must remain in the stream), the deterministic equivalent of chance constraint Eq. 7.14 is
The value of the flow that is equaled or exceeded 90% of the time, \( q_{t}^{0.10} \), can be obtained from the cumulative distribution of flows as illustrated in Fig. 7.8.
Assume this 90% reliable flow is 8. The deterministic equivalent of the chance constraint Eq. 7.14 for all periods t is simply T _{1} + T _{2} + T _{3} ≤ 6. The optimal solution of the chance constrained target allocation model, Eqs. 7.13 and 7.15, is, as seen before, T _{1} = 1, T _{2} = 1, and T _{3} = 4. The next step would be to simulate this problem to see what the actual reliabilities might be for various sequences of flows q _{ t.}
7.5 Markov Processes and Transition Probabilities
Time series correlations can be incorporated into models using transition probabilities. To illustrate this process, consider the observed flow sequence shown in Table 7.1.
The estimated mean , variance and correlation coefficient of the observed flows shown in Table 7.1 can be calculated using Eqs. 7.16, 7.17 and 7.18.
The probability distribution of the flows in Table 7.1 can be approximated by a histogram. Histograms can be created by subdividing the entire range of random variable values, e.g., flows, into discrete intervals. For example, let each interval be 2 units of flow. Counting the number of flows in each interval and then dividing those interval counts by the total number of counts results in the histogram shown in Fig. 7.9. In this case, just to compare this with what will be calculated later, the first flow, q _{1}, is ignored.
Figure 7.9 shows a uniform unconditional probability distribution of the flow being in any of the possible discrete flow intervals. It does not show the possible dependency of the probabilities of the random variable value, q _{ t+1}, in period t + 1 on the observed random variable value, q _{ t }, in period t. It is possible that the probability of being in a flow interval j in period t + 1 depends on the actual observed flow interval i in period t.
To see if the probability of being in any given interval of flows is dependent on the past flow interval one can create a matrix. The rows of the matrix are the flow intervals i in period t. The columns are the flow intervals j in the following period t + 1. Such a matrix is shown in Table 7.2. The numbers in the matrix are based on the flows in Table 7.1 and indicate the number of times a flow in interval j followed a flow in interval i.
Given an observed flow in an interval i in period t, the probabilities of being in one of the possible intervals j in the next period t + 1 must sum to 1. Thus each number in each row of the matrix in Table 7.2 can be divided by the total number of flow transitions in that row (the sum of the number of flows in the row) to obtain the probabilities of being in each interval j in t + 1 given a flow in interval i in period t. In this case there are 10 flows that followed each flow interval i, hence by dividing each number in each row of the matrix by 10 defines the transition probabilities P _{ ij }.
These conditional or transition probabilities, shown in Table 7.3, correspond to the number of transitions shown in Table 7.2.
Table 7.3 is a matrix of transition probabilities. The sum of the probabilities in each row equals 1. Matrices of transition probabilities whose rows sum to one are also called stochastic matrices or firstorder Markov chains .
If each row’s probabilities were the same, this would indicate that the probability of observing any flow interval in the future is independent of the value previous flows. Each row would have the same probabilities as the unconditional distribution shown in Fig. 7.9. In this example the probabilities in each row differ, showing that low flows are more likely to follow low flows, and high flows are more likely to follow high flows. Thus the flows in Table 7.1 are positively correlated, as indeed has already determined from Eq. 7.18.
Using the information in Table 7.3, one can compute the probability of observing a flow in any interval at any period on into the future given the present flow interval. This can be done one period at a time. For example assume the flow in the current time period t = 1 is in interval i = 3. The probabilities, PQ_{ j,2}, of being in any of the three intervals in the following time period t + 1 are the probabilities shown in the third row of the matrix in Table 7.3.
The probabilities of being in an interval j in the following time period t = 3 is the sum over all intervals i of the joint probabilities of being in interval i in period t = 2 and making a transition to interval j in period t = 3.
The last term in Eq. 7.20 is the transition probability , from Table 7.3, that in this example remains the same for all time periods t. These transition probabilities, Pr{Q _{ t+1} in interval j  Q _{ t } in interval i} can be denoted as P _{ ij }.
Referring to Eqs. 7.19, 7.20 can be written in a general form as
This operation can be continued to any future time period. Table 7.4 illustrates the results of such calculations for up to six future periods, given a present period (t = 1) flow in interval i = 3.
Note that as the future time period t increases, the flow interval probabilities are converging to the unconditional probabilities, in this example 1/3. 1/3, 1/3, as shown in Fig. 7.9. The predicted probability of observing a future flow in any particular interval at some time in the future becomes less and less dependent on the current flow interval as the number of time periods increases between the current period and that future time period.
When these unconditional probabilities are reached, PQ_{ it } will equal PQ_{ i,t+1} for each flow interval i. To find these unconditional probabilities directly, Eq. 7.21 can be written as
Equation 7.22 along with Eq. 7.23 can be used to calculate all the unconditional probabilities PQ_{ i } directly.
Conditional or transition probabilities can be incorporated into stochastic optimization models of water resource systems.
7.6 Stochastic Optimization
To illustrate the development and use of stochastic optimization models consider first the allocation of water to a single user. Assume the flow in the stream where the diversion takes place is not regulated and can be described by a known probability distribution based on historical records. Clearly the user cannot divert more water than is available in the stream. A deterministic model would include the constraint that the diversion x cannot exceed the available water Q. But Q is a random variable. Some discrete value, q, of the random variable Q will have to be selected, knowing that there is some probability that in reality, or in a simulation model , the actual flow may be less than the selected value q. Hence if the constraint x ≤ q is binding (x = q), the actual allocation may be less than the value of the allocation or diversion variable x produced by the optimization model.
If the value of x affects one of the system’s performance indicators, e.g., the net benefits, B(x), to the user, a more accurate estimate of the user’s net benefits will be obtained from considering a range of possible allocations x, depending on the range of possible values of the random flow Q. One way to do this is to divide the known probability distribution of flows q into discrete ranges, i, each range having a known probability PQ_{ i }. Designate a discrete flow q _{ i } for each range. Associated with each known flow q _{ i } is an unknown allocation x _{ i }. Now the deterministic constraint x ≤ q can be replaced with the set of constraints x _{ i } ≤ q _{ i } and the term B(x) in the original objective function can be replaced by its expected value , \( \sum\nolimits_{i} {{\text{PO}}_{i} B(x_{i} )} \).
Note, when dividing a continuous known probability distribution into discrete ranges, the discrete flows q _{ i } selected to represent each range i having a given probability PQ_{ i }, should be selected so as to maintain at least the mean and variance of that known distribution as defined by Eqs. 7.5 and 7.6.
To illustrate this consider a slightly more involved example involving the allocation of water to consumers upstream and downstream of a reservoir. Both the policies for allocating water to each user and the reservoir release policy are to be determined. This example problem is shown in Fig. 7.10.
If the allocation of water to each user is to be based on a common objective, such as the minimization of the total sum, over time, of squared deviations from prespecified target allocations , each allocation in each time period will depend in part on the reservoir storage volume.
Consider first a deterministic model of the above problem, assuming known flows Q _{ t } and upstream and downstream allocation targets UT_{ t } and DT_{ t } in each of T withinyear periods t in a year. Assume the objective is to minimize the sum of squared deviations of actual allocations, u _{ t } and d _{ t }, from their respective target allocations, UT_{ t } and DT_{ t } in each withinyear period t.
The constraints include:

(a)
Continuity of storage involving initial storage volumes S_{ t }, net inflows Q _{ t } − u _{ t }, and releases R _{ t }. Assuming no losses

(b)
Reservoir capacity limitations. Assuming a known active storage capacity K,
Allocation restrictions for each period t:
Equations 7.25 and 7.28 could be combined to eliminate the release variable R _{ t } since in this problem knowledge of the total release in each period t is not required. In this case Eq. 7.25 would become an inequality.
The solution for this model, Eqs. 7.24–7.28, would depend on the known variables (the targets UT_{ t } and DT_{ t }, flows Q _{ t } and reservoir capacity K). It would identify the particular upstream and downstream allocations and reservoir releases in each period t. It would not provide a policy that defines what allocations and releases to make for a range of different inflows and initial storage volumes in each period t. A backwardmoving dynamic programming model can provide such a policy. This policy will identify the allocations and releases to make based on various initial storage volumes, S _{ t }, as well flows, Q _{ t }, as discussed in Chap. 4.
This deterministic discrete dynamic programming allocation and reservoir operation model can be written for different discrete values of storage volumes S _{ t } from 0 ≤ S _{ t } ≤ capacity K as
There are three variables to be determined at each stage or time period t in the above dynamic programming model. These three variables are the allocations u _{ t } and d _{ t } and the reservoir release R _{ t }. Each decision involves three discrete decision variable values. The functions \( F_{t}^{n} \left( {S_{t} ,Q_{t} } \right) \) define the minimum sum of squared deviations given an initial storage volume S _{ t } and streamflow Q _{ t } in time period or season t with n time periods remaining until the end of reservoir operation.
One can reduce this threedecision variable model to a single variable model by realizing that for any fixed discrete initial and final storage volume states, there can be a direct tradeoff between the upstream and downstream allocations given the particular streamflow in each period t. Increasing the upstream allocation will decrease the resulting reservoir inflow and this in turn will reduce the release by the same amount. This reduces the amount of water available to allocate to the downstream use.
Hence for this example problem involving these upstream and downstream allocations, a local optimization can be performed at each time step t for each combination of storage states S _{ t } and S _{ t+1}. This optimization finds the allocation decision variables u _{ t } and d _{ t } that
where
This local optimization can be solved to identify the u _{ t } and d _{ t } allocations for each feasible combination of S _{ t } and S _{ t+1} in each period t.
Given these optimal allocations, the dynamic programming model can be simplified to include only one discrete decision variable, either R _{ t } or S _{ t+1}. If the decision variable S _{ t+1} is used in each period t, the releases R _{ t } in those periods t do not need to be considered. Thus the dynamic programming model expressed by Eq. 7.29 can be written for all discrete storage volumes S _{ t } from 0 to K and for all discrete flows Q _{ t } as
where the functions u_{ t }(S _{ t }, S _{ t+1}) and d _{ t }(S _{ t }, S _{ t+1}) have been determined using Eqs. 7.30–7.32.
As the total number of periods remaining, n, increases, the solution of this dynamic programming model will converge to a steady or stationary state. The best final storage volume S _{ t+1} given an initial storage volume S _{ t } will likely differ for each withinyear period or season t, but for a given season t it will be the same in successive years. In addition, for each storage volume S _{ t }, streamflow, Q _{ t }, and withinyear period t the difference between \( F_{t}^{n + T} \left( {S_{t} ,Q_{t} } \right) \) and \( F_{t}^{n} \left( {S_{t} ,Q_{t} } \right) \) will be the same constant regardless of the storage volume S _{ t }, flow Q _{ t } and period t. This constant is the optimal, in this case minimum, annual value of the objective function, Eq. 7.24.
There could be additional limits imposed on storage variables and release variables, such as for flood control storage or minimum downstream flows, as might be appropriate in specific situations.
The above deterministic dynamic programming model (Eq. 7.33) can be converted to a stochastic model . Stochastic models consider multiple discrete flows as well as multiple discrete storage volumes, and their probabilities, in each period t. A common way to do this is to assume that the sequence of flows follow a firstorder Markov process . Such a process involves the use of transition or conditional probabilities of flows as defined by Eq. 7.20.
To develop these stochastic optimization models it is convenient to introduce some additional indices or subscripts. Let the index k denote different initial storage volume intervals. These discrete intervals divide the continuous range of storage volume values from 0 to the active reservoir capacity K. Each S _{ kt } is a discrete storage volume that represents the range of storage volumes in interval k at the beginning of each period t.
Let the index l denote different final storage volume intervals. Each S _{l,t+1} is a discrete volume that represents the storage volume interval l at the end of in each period t or equivalently at the beginning of period t + 1. As previously defined, let the indices i and j denote the different flow intervals, and each discrete q _{ it } and q _{ j,t+1} represent the flows in those flow intervals i and j in periods t and t + 1, respectively.
These subscripts and the volume or flow intervals they represent are illustrated in Fig. 7.11.
With this notation it is now possible to develop a stochastic dynamic programming model that will identify the allocations and releases that are to be made given both the initial storage volume, S _{ kt }, and the flow, q _{ it }. It follows the same structure as the deterministic models defined by Eqs. 7.30–7.32, and 7.33.
To identify the optimal allocations in each period t for each pair of feasible initial and final storage volumes S _{ kt } and S _{l,t+1}, and inflows q _{ it,} one can solve Eqs. 7.34–7.36.
where
The solution to these equations for each feasible combination of intervals k, i, l, and period t defines the optimal allocations that can be expressed as u _{ t }(k, i) and d _{ t }(k, i, l).
The stochastic version of Model 7.33, again expressed in a form suitable for backward moving discrete dynamic programming, can be written for different discrete values of S _{ kt } from 0 to K and for all q _{ it } as
Each \( P_{ij}^{t} \) in the above recursive equation is the known conditional or transition probability of a flow q _{ j,t+1} within interval j in period t + 1 given a flow of q _{ it } within interval i in period t.
The sum over all flow intervals j of these conditional probabilities times the \( F_{t + 1}^{n  1} \left( {S_{l,t + 1} ,q_{j,t + 1} } \right) \) values is the expected minimum sum of future squared deviations from allocation targets with n − 1 periods remaining given an initial storage volume of S _{ kt } and flow of q _{ it } and final storage volume of S _{ l,t+1}. The value \( F_{t}^{n} \left( {S_{kt} ,q_{it} } \right) \) is the expected minimum sum of squared deviations from the allocation targets with n periods remaining given an initial storage volume interval of S _{ kt } and flow interval of q _{ it }. Stochastic models such as these provide expected values of objective functions.
Another way to write the recursion equations of this model, Eq. 7.37, is by using just the indices k and l to denote the discrete storage volume variables S _{ kt } and S _{ l,t+1} and indices i and j to denote the discrete flow variables q _{ it } and q _{ j,t+1}:
The steadystate solution of this dynamic programming model will identify the preferred final storage volume S _{ l,t+1} in period t given the particular discrete initial storage volume S _{ kt } and flow q _{ it }. This optimal policy can be expressed as a function ℓ that identifies the best interval l given intervals k, i and period t.
All values of l given k, i, and t, defined by Eq. 7.39, can be expressed in a matrix, one for each period t.
Knowing the best final storage volume interval l given an initial storage volume interval k and flow interval i, the optimal downstream allocation, d _{ t }(k, i), can, like the upstream allocation, be expressed in terms of only k and i in each period t. Thus knowing the initial storage volume S _{ kt } and flow q _{ it } is sufficient to define the optimal allocations u _{ t }(k, i) and d _{ t }(k, i), final storage volume S _{l,t+1,} and hence the release R _{ t }(k, i).
7.6.1 Probabilities of Decisions
Knowing the function l = ℓ(k, i, t) permits a calculation of the probabilities of the different discrete storage volumes, allocations, and flows. Let

PS _{ kt } = the unknown probability of an initial storage volume S _{ kt } being within some interval k in period t.

PQ_{ it } = the steadystate unconditional probability of flow q _{ it } within interval i in period t.

P _{ kit } = the unknown probability of the upstream and downstream allocations u _{ t }(k, i) and d _{ t }(k, i) and reservoir release R _{ t }(k, i) in period t.
As previously defined

\( P_{ij}^{t} \) = the known conditional or transition probability of a flow within interval j in period t + 1 given a flow within interval i in period t.
These transition probabilities \( P_{ij}^{t} \) can be displayed in matrices, similar to Table 7.3, but as a separate matrix (Markov chain ) for each period t.
The joint probabilities of an initial storage interval k, an inflow in the interval i, P _{ kit } in each period t must satisfy two conditions. Just as the initial storage volume in period t + 1 is the same as the final storage volume in period t, the probabilities of these same respective discrete storage volumes must also be equal. Thus
where the sums in the right hand side of Eq. 7.41 are over only those combinations of k and i that result in a final volume interval l. This relationship is defined by Eq. 7.39 (l = ℓ(k, i, t)).
While Eq. 7.41 must apply, it is not sufficient. The joint probability of a final storage volume in interval l in period t and an inflow j in period t + 1 must equal the joint probability of an initial storage volume in the same interval l and an inflow in the same interval j in period t + 1. Multiplying the joint probability P _{ kit } times the conditional probability \( P_{ij}^{t} \) and then summing over all k and i that results in a final storage interval l defines the former, and the joint probability P _{ l,j,t+1} defines the latter.
Once again the sums in Eq. 7.42 are over all combinations of k and i that result in the designated storage volume interval l as defined by the policy ℓ(k, i, t).
Finally, the sum of all joint probabilities P _{ kit } in each period t must equal 1.
Note the similarity of Eqs. 7.42 and 7.43 to the Markov steadystate flow Eqs. 7.22 and 7.23. Instead of only one flow interval index considered in Eqs. 7.22 and 7.23, Eqs. 7.42 and 7.43 include two indices, one for storage volume intervals and the other for flow intervals. In both cases, one of Eqs. 7.22 and 7.42 can be omitted in each period t since it is redundant with that period’s Eqs. 7.23 and 7.43, respectively.
The unconditional probabilities PS _{ kt } and PQ_{ it } can be derived from the joint probabilities P _{ kit }.
Each of these unconditional joint or marginal probabilities, when summed over all their volume and flow indices, will equal 1. For example
Note that these probabilities are determined based only on the relationships among flow and storage intervals as defined by Eq. 7.39, l = ℓ(k, i, t) in each period t, and the Markov chains defining the flow interval transition or conditional probabilities, \( P_{ij}^{t} \). It is not necessary to know the actual discrete storage values representing those intervals. Thus assuming any relationship among the storage volume and flow interval indices, l = ℓ(k, i, t) and a knowledge of the flow interval transition probabilities \( P_{ij}^{t} \), one can determine the joint probabilities P _{ kit } and their marginal or unconditional probabilities PS_{ kt }. One does not need to know what those storage intervals are to calculate their probabilities. (Amazing, isn’t it?)
Given the values of these joint probabilities P _{ kit }, the deterministic model defined by Eqs. 7.24–7.28 can be converted to a stochastic model to identify the best storage and allocation decision variable values associated with each storage interval k and flow interval i in each period t.
The constraints include

(a)
Continuity of storage involving initial storage volumes S _{ kt }, net inflows q _{ it } − u _{ kit }, and at least partial releases d _{ kit }. Again assuming no losses:
Reservoir capacity limitations.
Allocation restrictions.
7.6.2 A Numerical Example
A simple numerical example may help to illustrate how these stochastic models can be developed without getting buried in detail. Consider, for simplicity, two withinyear periods each year. The random flows Q _{ t } in each period t are divided into two intervals. These flow intervals are represented by discrete flows of 1 and 3 volume units per second in the first period and 3 and 6 volume units per second in the second period. Their transition probabilities are shown in Table 7.5.
Assuming equal withinyear period durations, these three discrete flow rates are equivalent to about 16, 47 and 95 million volume units per period.
Assume the active storage volume capacity K in the reservoir equals 50 million volume units. This capacity can be divided into different intervals of storage. For this simple example assume three storage volume intervals represented by 10, 25, and 40 million volume units. Assume the allocation targets remain the same in each period at both the upstream and downstream sites. The upstream allocation target is approximately 2 volume units per second or 30 million volume units in each period. The downstream allocation target is approximately 5 volume units per second or 80 million volume units in each period.
With these data we can use Eqs. 7.34–7.36 to determine the allocations that minimize the sum of squared deviations from targets and what that sum is, for all feasible combinations of initial and final storage volumes, and flows. Table 7.6 shows the results of these optimizations. These results will be used in the dynamic programming model to determine the best final storage volumes given initial volumes and flows.
With the information in Tables 7.5 and 7.6, the dynamic programming model, Eq. 7.38 or as expressed in Eq. 7.51, can be solved to find the optimal final storage volumes given an initial storage volume and flow. The iterations of the recursive equation, sufficient to reach a steady state, are shown in Table 7.7.
This process can continue until a steadystate policy is defined. Table 7.8 summarizes the next five iterations. At this stage, the annual differences in the objective values associated with a particular state and season have come close to a common constant value.
While the differences between corresponding \( F_{t}^{n + T} \;{\text{and}}\;F_{t}^{n} \) have not yet reached a common constant value to the nearest unit deviation (they range from, 3475.5 to 3497.1 for an average of 3485.7), the policy has converged to that shown in Tables 7.8 and 7.9.
Given this policy, the probabilities of being in any of these volume and flow intervals can be determined by solving Eqs. 7.42–7.45. Table 7.10 shows the results of these equations applied to the data in Tables 7.5 and 7.8. It is obvious that if the policy from Table 7.9 is followed, the steadystate probabilities of being in storage interval 1 in period 1 and in interval 3 in period 2 are 0.
Multiplying these joint probabilities by the corresponding SD_{ kit } values in the last column of Table 7.6 provides the annual expected squared deviations, associated with the selected discrete storage volumes and flows. This is done in Table 7.11 for those combinations of k, i, and l that are contained in the optimal solution as listed in Table 7.9.
The sum of products of the last two columns in Table 7.11 for each period t equals the expected squared deviations in the period. For period t = 1 the expected sum of squared deviations are 1893.3 and for t = 2 they are 1591.0. The total annual expected squared deviations are 3484.3. This compares with the expected squared deviations derived from the dynamic programming model, after nine iterations, ranging from 3475.5 to 3497.1 (as calculated from data in Table 7.8).
The policy for reservoir releases is a function not only of the initial storage volumes, but also of the current inflow, i.e., the total water available in the period. Reservoir release rule curves now must become twodimensional. However, the inflow for each period usually cannot be predicted at the beginning of each period. Thus the reservoir release policy has to be expressed in a way that it can be followed without knowledge of the current inflow. One way to do this is to compute the expected value of the release for each discrete storage volume, and show it in a release rule. This is done in Fig. 7.12. The probability of each discrete release associated with each discrete river flow is the probability of the flow itself. Thus in period 1 when the storage volume is 40, the expected release is 46(0.41) + 56(0.59) = 52. These discrete expected releases can be used to define a continuous range of releases for the continuous range of storage volumes from 0 to full capacity, 50. Figure 7.12 also shows the hedging that might take place as the reservoir storage volume decreases.
These and modifications of these policies can be simulated to determine improved release rules. Simulation modeling is the subject of the following chapter.
7.7 Summary
This chapter has introduced some approaches for including risk into optimization and simulation models. The discussion began with ways to obtain values of random variables whose probability distributions are known. These values, for example streamflows or parameter values , can be inputs to simulation models . Monte Carlo simulation involves the use of multiple simulations using these random variable values to obtain the probability distributions of outputs, including various system performance indicators.
Two methods were reviewed for introducing random variables along with their probabilities into optimization models . One involves the use of chance constraints . These are constraints that must be met, as all constraints must be, but now with a certain probability. As in any method there are limits to the use of chance constraints. These limitations were not discussed, but in cases where chance constraints are applicable, and if their deterministic equivalents can be defined, they are probably the only method of introducing risk into otherwise deterministic models that do not add to the model size.
Alternatively, the range of random variable values can be divided into discrete ranges. Each range can be represented by a specific or discrete value of the random variable. These discrete values and their probabilities can become part of an optimization model. This was demonstrated using transition probabilities incorporated into both linear and dynamic programming models.
The examples used in this chapter to illustrate the development and application of stochastic optimization and simulation models are relatively simple. These and similar probabilistic and stochastic models have been applied to numerous water resources planning and management problems. They can be a much more effective screening tool than deterministic models based on the mean or other selected values of random variables . But sometimes they are not. Clearly if the system being analyzed is very complex, or just very big in terms of the number of variables and constraints, the use of deterministic models for a preliminary screening of alternatives prior to a more precise probabilistic screening is often warranted.
Reference
WWAP (United Nations World Water Assessment Programme) World Water Development Report 4. (2012). Managing water under uncertainty and risk (867 pp). Paris: UNESCO.
Additional References (Further Reading)
Bassson, M. S., Allen, R. B., Pegram, G. G. S., & van Rooyen, J. A. (1994). Probabilistic management of water resource and hydropower systems. Highlands Ranch, CO: Water Resources Publications.
Birge, J. R., & Louveaux, F. (1997). Introduction to stochastic programming. NY: Springer.
DeGroot, M. H. (1980). Optimal statistical decisions. NY: McGrawHill.
Dempster, M. A. H. (1980). Stochastic programming. London: Academic Press.
Dorfman, R., Jacoby, H. D., & Thomas, H. A., Jr. (1972). Models for managing regional water quality. Cambridge, MA: Harvard University Press.
Ermoliev, Y. (1970). Methods of stochastic programming. Moscow: Nauka. (in Russian).
Ermoliev, Y., & Wets, R. (Eds.). (1988). Numerical techniques for stochastic optimization. Berlin: Springer.
Heyman, D. P., & Sobel, M. J. (1984). Stochastic models in operations research, Volume II. Stochastic optimization. NY: McGrawHill.
Hillier, F. S., & Lieberman, G. J. (1990). Introduction to stochastic models in operations research. NY: McGrawHill.
Howard, R. A. (1960). Dynamic programming and Markov processes. Cambridge, MA: MIT Press.
Hufschmidt, M. M., & Fiering, M. B. (1966). Simulation techniques for design of waterresource systems. Cambridge, MA: Harvard University Press.
Loucks, D. P., Stedinger, J. S., & Haith, D. A. (1981). Water resource systems planning and analysis. Englewood Cliffs, NJ: Prentice Hall.
Maass, A., Hufschmidt, M. M., Dorfman, R., Thomas, H. A., Jr., Marglin, S. A., & Fair, G. M. (1962). Design of waterresource systems. Cambridge, MA: Harvard University Press.
Prékopa, A. (1995). Stochastic programming. Dordrecht, NL: Kluwer Academic Publishers.
Raiffa, H., & Schlaifer, R. (1961). Applied statistical decision theory. Cambridge, MA: Harvard University Press.
ReVelle, C. (1999). Optimizing reservoir resources. NY: Wiley.
Ross, S. M. (1983). Introduction to stochastic dynamic programming. NY: Academic Press.
Somlyódy, L., & Wets, R. J B. Stochastic optimization models for lake eutrophication management. Operations Research, 36, 660–681.
Wets, R. J B. (1989). Stochastic programming. In G. L. Nemhauser, A. H. G. Rinnooy Kan, & M. J. Todd (Eds.), Handbooks in Operations Research and Management Science (Vol. 1, pp. 573–629). NorthHolland, Amsterdam: Elsevier Science Publishers.
Wurbs, R. A. (1996). Modeling and analysis of reservoir system operations. Upper Saddle River, NJ: Prentice Hall.
Author information
Authors and Affiliations
Corresponding authors
Exercises
Exercises

7.1
Can you modify the deterministic discrete DP reservoir operating model to include the uncertainty, expressed as \( P_{ij}^{t} \), of the inflows, as in Exercise 6.25?
(Hints: The operating policy would define the release (or final storage) in each season as a function of not only the initial storage but also the inflow. If the inflow changes, so might the release or final storage volume. Hence you need to discretize the inflows as well as the storage volumes. Both storage and inflow are state variables . Assume, for this model, you can predict with certainty the inflow in each period at the beginning of the period. So, each node of the network represents a known initial storage and inflow value. You cannot predict with certainty the following period’s flows, only their probabilities. What does the network look like now?

7.2
Assume that there exist two possible discrete flows Q _{ it } into a small reservoir in each of two periods t each year having probabilities P _{ it }. Find the steadystate operating policy (release as a function of initial reservoir volumes and current period’s inflow) for the reservoir that minimizes the expected sum of squared deviations from storage and release targets. Limit the storage volumes to integer values that vary from 3 to 5. Assume a storage volume target of 4 and a release target of 2 in each period t. (Assume only integer values of all states and decision variables and that each period’s inflow is known at the beginning of the period.) Find the annual expected sum of squared deviations from the storage and release targets.
Period, t  Flows, Q _{ it }  Probabilities, P _{ it }  

i = 1  i = 2  i = 1  i = 2  
1  1  2  0.17  0.83 
2  3  4  0.29  0.71 
This is an application of Exercise 6.27 except the flow probabilities are independent of the previous flow.

7.3
Develop a linear model for defining the optimal joint probabilities of predefined discrete initial storage volumes, discrete inflows, and discrete final storage volumes in a reservoir in each period t. Let values of the index k represent the different discrete initial storage volumes, S _{ kt }. Similarly, let the index i represent the inflows, Q _{ it }, and the index l represent the final storage volumes, S _{l,t+1}, in period t. Let the index j represent the discrete inflows, Q _{ j,t+1}, and m represent the discrete final storage volumes, S _{ m,t+2}, in period t + 1. Let PR_{ kilt } be the unknown joint probability of a discrete initial storage, S _{ kt }, an inflow, Q _{ it }, and a final storage volume, S _{l,t+1}, in period t. It is also the probability of a release associated with a particular combination of k, i, and l in period t. The objective is to maximize the expected net benefits, however, measured. The net benefits associated with any combination represented by k, i, and l in period t is B _{ kilt }. These net benefits and the conditional inflow probabilities. \( P_{ij}^{t} = \Pr \left\{ {Q_{j,t + 1} Q_{it} } \right\}, \) are known. Show how the optimal operating policy can be determined once the values of the joint probabilities, PR_{ kilt }, are known.
The same policy can be found by DP. Develop a DP model to find the optimal operating policy.

7.4
Referring to Exercise 7.3, instead of defining a final volume subscript l and m for computing joint probabilities PR_{ kilt }, assume that subscripts d and e were used to denote different reservoir release volumes. How would the linear programming model developed be altered to include d and e in place of l and m? How would the dynamic programming recursion equation be altered?

7.5
Given joint probabilities PR_{ kilt } found from Exercise 7.3, how would one derive the probability distribution of reservoir releases and storage volumes in each period t?

7.6
Assume that the streamflow Q at a particular site has cumulative distribution function F _{ Q }(q) = q/(1 + q) for q ≥ 0. The withdrawal x at that location must satisfy a chance constraint of the form Pr[x ≥ Q] ≤ 1 − α. Write the deterministic equivalent for each of the following chance constraints :

7.7
Monte Carlo Simulation :
Consider the symmetric triangular probability density function that ranges from 0 to 10 whose mean and most likely value is 5

(a)
Generate values of x that come from this distribution.
To do this you need to

Determine the equations of the cumulative distribution.

Generate uniformly distributed random values of probabilities p.

For each p find corresponding value of x. The inverse of the cumulative probability function FX(x) denoted as \( {\text{FX}}^{  1} \left( p \right) \).

Using this inverse function, generate a series of 100 random variable values x that would have a probability distribution as shown above.

(b)
Calculate the mean, variance , and standard deviation of this distribution based on the random values you computed. What is the effect on these statistics of increasing the number of sample values of the random variable, say from 100 to 1000 to 9000?

(c)
Calculate and compare with the true mean and variance.

(d)
Next, suppose these random values of X are flows entering a reservoir having a capacity of 6. The purpose of the reservoir is to release a target flow of 5 in each time period. Simulate the operation of the reservoir assuming that if there is insufficient water to meet the target release of 5, release what is available, leaving an empty reservoir. Find the mean, variance, and standard deviation of reservoir storage and release values.

(e)
Finally assume the reservoir releases are to be allocated to three water users whose target allocations are 3, 2.33, and 8. Actual allocations should not exceed these target allocations. Make the allocations such that in each time period the maximum percentage deficit allocation is minimized. Find the mean , variance and standard deviation of each user’s percentage deficit allocations.
Rights and permissions
Open Access This chapter is distributed under the terms of the Creative Commons AttributionNonCommercial 4.0 International License (http://creativecommons.org/licenses/bync/4.0/), which permits any noncommercial use, duplication, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the work's Creative Commons license, unless indicated otherwise in the credit line; if such material is not included in the work’s Creative Commons license and the respective action is not permitted by statutory regulation, users will need to obtain permission from the license holder to duplicate, adapt or reproduce the material.
Copyright information
© 2017 The Author(s)
About this chapter
Cite this chapter
Loucks, D.P., van Beek, E. (2017). Modeling Uncertainty. In: Water Resource Systems Planning and Management. Springer, Cham. https://doi.org/10.1007/9783319442341_7
Download citation
DOI: https://doi.org/10.1007/9783319442341_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 9783319442327
Online ISBN: 9783319442341
eBook Packages: EngineeringEngineering (R0)