previous page - dl.mozh.org

29
above as a discrete time optimal control problem. Equations (16.1) (16.2), and (16.3) are examples of objective functions for the minimization of the deviations of concentrations from the desired range of values, the minimization of the pump operation times and the minimization of the energy cost, respectively. Equations (16.9) (16.10), and (16.11) define typical hydraulic equality constraints and water-quality inequality constraints. The inequality constraints are bounds in the state variables: pressure, tank elevation, and nodal contaminant concentrations. Equation (16.8) is the bound constraint for the control variable, the duration of pumping during a time period. 16.4 SOLUTIONMETHODSANDAPPLICATIONS FOR WATER-QUALITY PURPOSES This section describes two methods of determining the optimal operation of water distri- bution systems for water-quality purposes. These methodologies are based on describing the operation as a discrete-time optimal-control problem that can be used to determine the optimal operation schedules for the pumps in distribution systems. One method is based a mathematical programming approach, the other method is based on a simulated annealing approach. The following sections describe the two methods and present sample applications with comparisons. 16.4.1 Mathematical Programming Approach The solution algorithm used in the mathematical programming approach is a reduction technique, similar to the algorithms used for ground-water management (Wanakule et al. 1986), for water distribution system design (Lansey and Mays, 1989), operation of pumping stations in water distribution systems (Brion and Mays, 1991), optimal flood control operation (Unver and Mays, 1990), and optimal determination of fresh water inflows to bays and estuaries (Bao and Mays, 1994a, 1994b). In all these applications, the optimal solution of the problem is obtained by using nonlinear optimization code linked to a hydraulic simulation code. The mathematical approach reformulates the problem using an optimal control framework that results in linking a simulation code, EPANET (Rossman, 1994), with an optimization code, GRG2 (Lasdon and Waren, 1986), to find the optimal solution. The decision variables are partitioned into control variables and state variables in the formulation of the reduced problem. The control variables are the amount of time that the pump operates during each time period. The series of period operating times results in a pump operation schedule. The control variable values (pump operation schedule) are determined by the optimizer, and they are given as input to the simulator, which solves for the state variables (pressure, water quality, and tank levels). Hence, the state variables are obtained as implicit functions of the control variables. This results in a large reduction in the number of constraints as the equality constraints are solved by the simulator and only the inequality bound constraints of the hydraulics and water quality are left to be solved by the optimizer. Improvements in the objective function of NLP problems are obtained by changing the control variables of the reduced problem. NLP codes restrict the step size by which the control-variables change so that the control-variable bounds are not violated. The state variables, which are implicit functions of control variables, are not considered in the determination of step size. If the bounds of the state variables are violated, more iterations Previous Page

Upload: others

Post on 06-May-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Previous Page - dl.mozh.org

above as a discrete time optimal control problem. Equations (16.1) (16.2), and (16.3) areexamples of objective functions for the minimization of the deviations of concentrationsfrom the desired range of values, the minimization of the pump operation times and theminimization of the energy cost, respectively. Equations (16.9) (16.10), and (16.11) definetypical hydraulic equality constraints and water-quality inequality constraints. Theinequality constraints are bounds in the state variables: pressure, tank elevation, and nodalcontaminant concentrations. Equation (16.8) is the bound constraint for the controlvariable, the duration of pumping during a time period.

16.4 SOLUTIONMETHODSANDAPPLICATIONSFOR WATER-QUALITY PURPOSES

This section describes two methods of determining the optimal operation of water distri-bution systems for water-quality purposes. These methodologies are based on describingthe operation as a discrete-time optimal-control problem that can be used to determine theoptimal operation schedules for the pumps in distribution systems. One method is baseda mathematical programming approach, the other method is based on a simulatedannealing approach. The following sections describe the two methods and present sampleapplications with comparisons.

16.4.1 Mathematical Programming Approach

The solution algorithm used in the mathematical programming approach is a reductiontechnique, similar to the algorithms used for ground-water management (Wanakule et al.1986), for water distribution system design (Lansey and Mays, 1989), operation of pumpingstations in water distribution systems (Brion and Mays, 1991), optimal flood controloperation (Unver and Mays, 1990), and optimal determination of fresh water inflows to baysand estuaries (Bao and Mays, 1994a, 1994b). In all these applications, the optimal solutionof the problem is obtained by using nonlinear optimization code linked to a hydraulicsimulation code.

The mathematical approach reformulates the problem using an optimal controlframework that results in linking a simulation code, EPANET (Rossman, 1994), with anoptimization code, GRG2 (Lasdon and Waren, 1986), to find the optimal solution. Thedecision variables are partitioned into control variables and state variables in theformulation of the reduced problem. The control variables are the amount of time that thepump operates during each time period. The series of period operating times results in apump operation schedule. The control variable values (pump operation schedule) aredetermined by the optimizer, and they are given as input to the simulator, which solves forthe state variables (pressure, water quality, and tank levels). Hence, the state variables areobtained as implicit functions of the control variables. This results in a large reduction inthe number of constraints as the equality constraints are solved by the simulator and onlythe inequality bound constraints of the hydraulics and water quality are left to be solvedby the optimizer.

Improvements in the objective function of NLP problems are obtained by changing thecontrol variables of the reduced problem. NLP codes restrict the step size by which thecontrol-variables change so that the control-variable bounds are not violated. The statevariables, which are implicit functions of control variables, are not considered in thedetermination of step size. If the bounds of the state variables are violated, more iterations

Previous Page

Page 2: Previous Page - dl.mozh.org

will be needed to obtain a feasible solution. The penalty function method is used toovercome this problem. The state variable-bound constraints are included in the objectivefunction as penalty terms. The application of this technique is also beneficial because itreduces the size of the problem and the number of the constraints.

Many kinds of penalty functions can be used to incorporate the bound constraints intothe objective function. In this application, two different penalty functions, the bracket andthe augmented lagrangian, are used.

The bracket penalty function penalty method (Li and Mays, 1995; Reklaitis, et al.1983) uses a simple penalty function which has the following form:

PBj (V.,,/?,.) = R. 2 FmUi(O, tyl (16.12)i *- -*

The augmented Lagrangian method (Fletcher, 1975) uses the following penaltyfunction:

pAj (V,,̂ ,.) = L 2 Oji min [0, (v, - |)f- L 2 ̂ . (16.13)

where the index j is the representation of H for pressure head, C = concentration, and y= water-storage-height bound constraints. The index i is a one-dimensional representationof the double index (&, t) for the pressure-head penalty term, (n, t) is for the concentrationpenalty term, and (5, t) is for the storage bound penalty term. PBj and PAj define thebracket and the augmented Lagrangian penalty functions for bound constraint j,respectively. V7, i is the violation of the bound constraint j. Rj is a penalty parameter usedin the bracket penalty method, and o.,. and JA.,,. are the penalty weights and Lagrangianmultipliers used in the augmented Lagrangian method, respectively. (See Sakarya, 1998,for a detailed description of the bracket and the augmented Lagrangian penalty-functionmethods and the methods to update the penalty function parameters).

The violation of the pressure head constraint is defined as

V** = min|"(#to -Jttfa), (H\t - Hto)j (16.14)

Similarly, the violations of the substance concentration and the water-storage-heightbound constraints can be defined.

The reduced problem for minimizing the deviations of the concentrations from theupper and lower bounds is

Min L1 = PJV^F0) + P»(VWFH) + PfV^FJ (16.15)

subject to

O=^ D^ Af p = 7,..., Pandt= 7,..., T (16.16)

where P0 P№ and Py define the bracket or augmented penalty terms associated with theconcentration, pressure head, and storage bound constraints, respectively, depending on thepenalty function method used. Similarly, F0 FH, and Fy define the penalty functionparameters which are the penalty parameters for the bracket penalty method or the penaltyweights and the Lagrangian multipliers for the augmented Lagrangian penalty method,associated with the concentration, pressure head, and storage bound constraints, respectively.

For minimizing pump operation time, the reduced objective function is subjected tothe same constraint defined by Eq. (16.16), and has the following form.

Page 3: Previous Page - dl.mozh.org

P T

Min L77 = 2 E DP< + PdVc,nt>Fc) + PH(VH^H) + W^ (16.17)p=7 f=7

The reduced objective function for the minimization of pump energy is defined asp T UC O 746PP

Min L777 = 2 E * FFF ^ DP< + P<fVc*,Fc) + JV*WfisJ + P/V^/y (16.18)p=7 f=7 ^rr/rt

subject to the constraint defined by Eq. (16.16).The solution of the final form of the problem is obtained by the two-step optimization

procedure described in Brion and Mays (1991), Lansey and Mays (1989), Mays (1997)and Wanakule et al. (1986). Finite difference approximations were used to calculate thederivatives of the objective function with respect to the control variables, the pumpoperation times. These derivatives are the reduced gradients that the optimization codeneeds to find the optimal solution. Figure 16.4 shows the flowchart of the optimization

Choose objective function andpenalty method. Initialize penaltyparameters and pump durations

Run EPANET to compute statevariables using current values of

control variables

Form new problem using currentvalues of penalty parameters

Run GRG2 to compute searchdirection, optimum step size, and

improved values of control variables

Run EPANET to obtain statevariables using current values of

control variables

Input system data

Updatepenaltyfunction

parameters

Overall optimal?

Stop

FIGURE 16.4 Flow chart of the optimization model.

Optimal withCurrent values of penalty. Function parameters? .

Page 4: Previous Page - dl.mozh.org

model. Initially, the original objective function and the penalty method are chosendepending on the case being considered. The optimization procedure is divided into innerand outer levels. The outer level-code selects values for the penalty function parameters,which are Lagrangian multipliers and penalty weights for the augmented Lagrangianpenalty functions, and penalty parameters for the bracket penalty function associated withthree terms in the objective function. The fixed Lagrangian multipliers and fixed penaltyparameters are programmed into GRG2, and the inner-level optimization is made linkingGRG2 and EPANET. GRG2 finds a set of the control variables Dpt, which is the trialpump-operation schedule. Using the trial pump operation schedule, the objective functionis evaluated. If there is little or no improvement from the previous trial schedule, the pumpschedule is adopted as optimum. If there is significant change, the outer-level loop iscarried out to update the penalty function parameters. The GRG2 Lagrangian multipliersand fixed-penalty parameters are updated, and a new GRG2-EPANET optimization iscarried out again to find a new pump operation schedule. The procedure is repeated untilthe Lagrangian and penalty function parameters are not updated (i.e. the overall optimumis found), the iteration limit of the outer loop is reached, or no improvements are achievedfor some predefined consecutive iterations.

During the solution procedure, GRG2 needs the values of reduced objective functionand the reduced gradients while searching for the optimum solution. For each iterationstep in the inner loop, GRG2 changes the control variables and provides a new pumpoperation schedule. The gradients are found using finite elements.

A simplified method is used to reduce the number of EPANET calls. The main idea ofthis simplified method is that if the maximum change in the control variables betweenconsecutive iterations is small, the change that occurs in the state variables also is small.Thus, if the maximum change in the control variables between consecutive iterations issmaller than a specified limit, the change in the values of the state variables also will besmall. EPANET will not be called at that iteration to calculate the state variables, and theprevious values will be used.

16.4.2 Simulated Annealing Approach

Simulated annealing is a combinatorial optimization method that uses the Metropolisalgorithm to evaluate the acceptability of alternate arrangements and slowly converge toan optimum solution. The method does not require derivatives and is flexible enough toconsider many different objective functions and constraints. Simulated annealing usesconcepts from statistical thermodynamics and applies them to combinatorial optimizationproblems. Kirkpatrick et al. (1983) explained the simulated annealing methodology andapplied the method to the "traveling salesman" and computer design problems.Kirkpatrick (1984) provided additional insights and applications, including graphicalpartitioning, which is useful in the electronics industry for the design of circuits.Dougherty and Marryott (1991) applied simulated annealing to groundwater remediation.

Combinatorial optimization requires that the decision variables be restricted to a set ofdiscrete values. The set of all possible combinations is called the configuration space. Forexample, consider a pump that operates for 6-h divided into 1-h periods, where the pumpcan either be on or off for any period. The number of pump-operation combinations is 26

= 64. A pump that operates for 24-h divided into 1-h periods has 224 = 16,777,216combinations. The 6-h example can be solved by trial and error, but the 24-h example istoo large to solve by trial and error. For large combinatorial optimizations problems,simulated annealing provides a manageable solution strategy.

Page 5: Previous Page - dl.mozh.org

Kirkpatrick et al. (1983) explained how the Metropolis algorithm was developed toprovide a statistically based mathematical simulation of a system of atoms at a hightemperature that cools slowly to its ground energy state. If an atom is given a small randomchange, there will be a change in system energy AE. If AE < O, the new configuration is ata lower energy state and is accepted. If AE1 > O, the decision to change the systemconfiguration to a higher energy state is treated probabilistically and is calculated by

P(AE) = exp(-AE/fcfl T) (16.19)

where T = temperature and kB = Boltzmann constant. A random number that isdistributed evenly between O and 1 is chosen. If the number is smaller than P(AE), the newhigher energy configuration is accepted; otherwise, it is discarded and the oldconfiguration is used to generate the next arrangement. Reviewing Eq. (16.19), it can beseen that for extremely high temperatures, P(AE) approaches 1 and nearly all higher-energy system configurations will be accepted. As the system cools and the temperaturedecreases, P(AE) will become a smaller number and fewer higher-energy configurationsare accepted. When the system nears its bottom temperature, P(AE) will be so low that theprobability of accepting a higher-energy configuration will be small. The Metropolisalgorithm simulates the random movement of atoms in a water bath at temperature T.By using Eq. (16.19), the system becomes a Boltzmann distribution. Figure 16.5 showsthe flowchart of the Metropolis algorithm.

Kirkpatrick et al. (1983) again used a physical analogy to describe the annealingprocess applied to engineering problems. They replaced kBT by an "effectivetemperature" T. The "effective temperature" for a pump optimization problem, is a scalarnumber that consists of the pump energy cost and penalties for violation of systemconstraints (such as high or low pressure or extreme chemical concentrations). First, thesystem being optimized is "melted" by choosing a high "effective temperature" then thetemperature is lowered slowly until the system "freezes." The process is carried out ateach temperature until the system reaches a "steady state." The "annealing schedule" isthe number of trial system rearrangements tested at each temperature and the sequencesof temperatures.

FIGURE 16.5 Metropolis algorithm.

Accept E(new) Reject E(new)

R.N.: Test No.Test No. R.N.> Test No.

Generate Random Numberbetween O and 1 (R. N.)

Calculate Boltzman ValueTest No. = exp[-AE/T]

Page 6: Previous Page - dl.mozh.org

By using the Metropolis algorithm, simulated annealing differs from iterativeimprovement because transitions out of local optimum are always possible even at lowtemperatures, whereas iterative improvement is likely to get stuck in a local optimum.This prevents the solution from becoming anchored into a local minimum. After asufficient number of trials at a given temperature, the system is considered to be inequilibrium. The temperature is then lowered gradually, which slowly reduces thelikelihood that a new a configuration with a higher cost is accepted. The process continueuntil the process has cooled sufficiently, which can be determined by the number of trialswithout accepting a "better configuration" or, as is often the case with real engineeringproblems, until a reasonable amount of computer time is used.

The analogy of annealing metals infers that the atoms are the same and there is asingle basement energy level. Real engineering systems have constraints that interferewith each other, and is no configuration is likely to meet every constraint. Kirkpatrick etal, (1983) used the example of a system of bipolar magnets that could attract or repeleach other. Such systems are a class of Hamiltonians, and the interference betweenconstraints is defined as frustration. No single configuration can satisfy all theinteractions simultaneously. This implies that there are many ground-states of nearlyequal energy. Usually, the ground state energies are extremely low compared to theoriginal random state and, when the process ends, transferring from one state intoanother requires considerable rearrangement.

Annealing-type optimization has several implications. Even in the presence of frustra-tion, significant improvements can be expected over the random starting arrangement.Because many good, near-optimal solutions, should be available, a stochastic searchprocedure, such as annealing, should have a good chance of finding some ground states. Noone ground state is expected to be significantly better than the others; therefore, searchingfor the absolute optimum solution is not useful.

Entropy is a measure of the variation of energy at a given temperature. At highertemperatures, the variation in energy is significant. The variation declines dramatically asthe temperatures are lowered. This implies that the annealing process should not get"stuck" because transitions out of an energy state are always possible. Also, the process isa form of "adaptive divide-and-conquer." Gross features of the eventual solution appear atthe higher temperatures, with fine details developing at low temperatures, (Kirkpatricketal.,1983).

The requirements for applying simulated annealing to an engineering problem are (1)a concise representation of the configuration of the decision variables, (2) a scalar costfunction, (3) a procedure for generating rearrangements of the system, (4) a controlparameter (T) an annealing schedule, and (5) a criterion for termination (Dougherty andMarryott, 1991).

16.4.3 Development of Cost Function

The cost function for a given configuration is used in place of energy of a system of atoms.The cost function should include the cost of pumping and penalties for violations of thestorage tank level, pressure, and water-quality bounds. The pumping cost is calculated foreach period for each pump running and is a function of the pump flow rate, head, pumpefficiency, and electricity rate during that period. The cost of violations of the pressure andwater quality bounds are calculated using penalty functions. By adjusting the penaltyfunctions, the optimization problem can be adjusted to bias one constraint over anotherconstraint. The temperature T can be considered to be a control parameter that has thesame units as the cost function.

Page 7: Previous Page - dl.mozh.org

The pump cost function can be described as

COSTp^ = *2gp'ryP''' (16-20)pt ^rrpt

where K = unit conversion factor, Qpt = flow from pump p during period r, TDHpt =operating-point total dynamic head for pump p during period t, Pt = the power rate per Kwh during period t, Dpt = length of time that pump operates during period t (either O or1 times the length of the period), and EFFpt is the wire to water efficiency of pump p.

Storage tanks typically have a minimum level to provide emergency fire flow-storage.If the tanks are depleted below this level, fire protection is compromised. The followingpenalty term based on the constraint penalty terms developed by Brion (1990) has beendeveloped to account for this constraint.

P1= Z1MnMO, Vn^-Vj)2 (16.21)

where yst = water level for tank s during period t, ymin^5 = lower bound or the minimumlevel in tank s, and P5 = penalty term for tank low-level constraint for tanks.

Cohen (1982) stated that "optimization of a network over a limited horizon of, say, 24hours has no meaning without the requirement of some periodicity in operation, a simpleway to do that is to constrain the final states to be the same as the initial ones." Aconstraint is developed to generate a cost if the tank levels do not return to their startingelevation.

P2 = Z5 |352 (min[0,l - I y5>1 - ysT|])2 (16.22)

where ysl = water level for tank s at beginning of the simulation during period 1,ysT = water level for tank s at the end of the simulation during the final period T, and P52= penalty term for beginning and ending tank level constraint for tank s.

For a 24-h simulation, the concept of returning tanks to their starting level is somewhataddressed by using a starting configuration in which the pumps supply a volume of waterequal to the sum of the nodal demands. Providing a total volume of pumped water equalto the total volume of the system demands will return the tanks to their original levelexactly if there is only one tank. Even if pumping equals exactly demand, the tanks maynot return to their original level if there are several tanks unless all the tanks are full at thebeginning. Because one tank may "supply" water to another tank during the simulation,the total volume stored will be the same but shifted from one tank to another.

The Cohen condition may be unnecessarily restrictive. The example used to comparethe method involved modifying pump operations for a 24 h period that was repeated for12 days to allow the variations in water quality to overcome the initial conditions. It wasobserved that the tanks exhibited periodic behavior and adjusted themselves until thepumps were supplying a quantity equal to the demands. If the pumps operated for longerperiods, the tanks remained closer to full and the pump heads moved to the left of thesystem curve, reducing the flow. If the pumps operated for shorter periods, the tank levelslowered until the pump operating point moved along the pump operating curve untilpumped flows increased to meet the demands. By running the simulations over severaldays, the pump operation can be scheduled to optimize efficiency and perhaps reduce cost.

A water distribution system needs to deliver water at sufficient pressure to service thesystem's customers but at a pressure that will not damage water systems or customer'sfacilities. The Uniform Plumbing Code sets the normal range of pressure as 15-80 psi(IAPMO, 1994). A city may have a range in a pressure zone from 40 to 80 psi with a 20-psi residual during a fire flow (Malcolm Pirnie, 1996). The water system needs to operatebetween two extreme pressures, p^n and /?max.

Page 8: Previous Page - dl.mozh.org

The constraints and penalty functions for pressure bounds at each node are

P3 = Zfc, Y1 (min[0, pk, - PnJ)' (16.23)

and

P4 = Z,, Y2(min[0, Pmm - pJ)' (16.24)

where P1111n = minimum system pressure bound, pmax = maximum system pressure bound,pkt = pressure at node k during time period f, and ^1 and y2 = penalty terms for minimumand maximum pressure violations, respectively.

The EPANET program (Rossman, 1994) solves distribution systems hydraulically,then routes chemicals or contaminants through the water system during the time period.EPANET also can consider chemical reactions, such as the decay of chlorine, with time.The combination of hydraulic solver and water-quality calculations allows the programto predict the chlorine residual at any node in the system at any time period. A penaltyterm is used to consider violations of upper-and lower-limit free chlorine bounds.

The penalty terms for minimum and maximum free chlorine concentration are:

P5 = 2fa Y3 [min (O, C4, - CnJJ" (16.25)

P6 = Z,, Y4 Un (O, C1^ - CjJ" (16.26)

where C101n = minimum free chlorine concentration, Cmax = maximum free chlorineconcentration, Ckt = chlorine residual concentration at node k during time period f, and ̂ 3

and 74 = penalty terms for minimum and maximum chlorine residual pressure boundviolations, respectively.

The value of n will usually be 2. In cases where the lower concentration bound is moreimportant, a value of n < 1 will place a higher penalty on violations of minimum freechlorine. There also will be a cost term for the amount of chlorine used. The goal is tomeet the chlorine residual bounds while using the smallest amount of chlorine. Not onlywill the operational cost be decreased, but the creation of total trihalomethanes will bereduced as well.

16.4.4 Sample Application

To illustrate the two approaches to solution, the primary zone of the North Marin WaterDistribution System shown in Fig. 16.6 was used (Rossman, 1994, Vasconcelos et al.1996). The system contains 115 pipes, 91 junction nodes, 2 pumps, 3 storage tanks, and2 reservoirs. The minimum and maximum pressures at demand nodes were set at 20 and100 psi, respectively. The desired minimum water storage height in all tanks was 5 ft. Theminimum and maximum allowable concentration limits at all demand nodes were set at50 ng/L and 500 ng/L respectively. The bulk and the wall-rate coefficients used in thesimulation were -0.1 day-1 and -1 ft/day, respectively. The simulation was conductedfor a total of 12 days, and the values at the last day were used to evaluate the objectivefunction and constraints. The unit cost of energy was assumed to be constant at 0.07$/kWh for all time periods, and the efficiency of both pumps was a constant 0.75.

Page 9: Previous Page - dl.mozh.org

FIGURE 16.6 Water distribution system of North Marin Water District zone I(Source: Rossman, 1994).

Table 16.2 lists the optimized solutions obtained by using the mathematical program-ming and the simulated annealing approaches with a 500 pig/L concentration at bothreservoirs, held constant throughout the simulation to minimize pumping time andpumping cost applications. The final results obtained by both approaches had noviolations of any penalty term. Because pump 335 is larger than pump 10, closing pump335 for a certain period of time has more effect than does closing pump 10. Since thestrongest gradient resulted from closing pump 335, it was always closed first for themathematical programming approach, which solves for the optimum solution by usingreduced gradients. The simulated annealing approach had no bias because it randomlychose a pump and a time period to make a change (off to on or on to off). The total pump-operation times obtained from the mathematical programming approach were greater thanthe ones obtained from the simulated annealing approach. However, the total pump-operation times of pump 335 and the total 24-h cost of energy obtained from themathematical programming approach were lower than the ones obtained from the simulatedannealing approach because the mathematical programming approach preferred to close thelarger pump (335) first. The total number of EPANET calls were 425 and 356 forminimizing the pump operation time and pump operation cost, respectively, for themathematical programming approach, whereas 1500 calls were made for both cases whenthe simulated annealing approach was used.

Tankl

Tank!

Tank3Pump 335

Reservoir 4

Reservoir 5

Pump 10

Page 10: Previous Page - dl.mozh.org

TABLE 16.2 Optimized Solutions Obtained by Using Different Solution Approaches for 500 ug/Lof Concentration at Both Reservoirs

Minimize Pump Minimize PumpOperation Time Operation Cost

Mathematical Simulated Mathematical SimulatedProgramming Annealing Programming Annealing

Original objective function 34.47 24.00 399.95 429.53

Concentration violation 0.00 0.00 0.00 0.00

Pressure violation 0.00 0.00 0.00 0.00

Tank water level violation 0.00 0.00 0.00 0.00

Operation time of pump 10 (h) 19.97 5.00 24.00 14.00

Operation time of pump 335 (h) 14.50 19.00 13.62 17.00

Total pump operation time (h) 34.47 24.00 37.62 31.00

Total 24 h energy cost ($) 401.06 433.63 399.95 429.53

Figures 16.7 and 16.8 show the optimal pump operation times for pumps 10 and pump335 obtained by using the mathematical programming approach and the simulatedannealing approach for minimizing pump operation time, respectively. Similarly, theoptimum pump operation times of pumps 10 and 335 obtained by using both approachesfor minimizing pump operation cost, are shown in Figs. 16.9 and 16.10, respectively.

16.4.5 Advantages and Disadvantages of the Two Methods

Both solution approaches are capable of finding the optimum solution for the pumpoperation problem for water-quality purposes. The mathematical programming approachrequires the calculation of the derivatives of the objective function with respect to pumpoperation times (reduced gradients), which makes the simulated annealing approach moreflexible and adaptable.

Because the mathematical programming approach tries to reduce the most costly(larger) pump operation times the result is higher total pump operation times compared tothe simulated annealing approach. There were distinct differences in the total pumpoperation times, whereas similar results were obtained for the total 24-h energy costs.

The mathematical programming approach tries to find one "global optimum" solution,whereas the simulated annealing approach finds many solutions that have total penaltiesclose to each another. The solutions obtained using the mathematical programmingapproach depend on the initial values of the penalty function parameters, which makesfinding the global optimum more difficult. The global optimum solution cannot beguaranteed because convexity of the objective function cannot be proved.

16.5 OPTIMAL SCHEDULING OF BOOSTER DISINFECTION

Water utilities and regulatory agencies often want a detectable disinfectant residual at allpoints of water consumption in a water distribution network. Such a residual can bedifficult to maintain when disinfectant is added at a single location, such as a treatmentplant, because the spatially distributed nature of water storage facilities and consumer

Page 11: Previous Page - dl.mozh.org

Time (hour)

FIGURE 16.7 Optimal operation times of pump 10 used in the North Marin Water District to minimize the pump's operation costs.

Simulated AnnealingMathematical Programming

Page 12: Previous Page - dl.mozh.org

Time (hour)

FIGURE 16.8 Optimal pump operation times of pump 335 used NMWD for minimizing pump operation time.

Simulated AnnealingMathematical Pro jp-aimring

Page 13: Previous Page - dl.mozh.org

Time (hour)

FIGURE 16.9 Optimal operation times of pump 335 used in the North Marin Water District to minimized the pump's operation costs.

Simulated AnnealingMathematical Programming

Page 14: Previous Page - dl.mozh.org

Time (hour)

FIGURE 16.10 Optimal pump operation times of pump 335 used NMWD for minimizing pump operation costs.

Simulated AnnealingMathematical Programming

Page 15: Previous Page - dl.mozh.org

demands leads naturally to a wide distribution in water travel times. Because alldisinfectants that can maintain a residual will react with a variety of inorganic and organiccompounds, they decay over time; thus, the addition of any single disinfectant must besufficient to maintain a detectable residual for the longest travel time. This requirementcan lead to unacceptably high residuals close to the point of addition and to an unevenspatiotemporal residual distribution. Both situations may by undesirable from theperspective of unpleasant tastes and odors or public health (e.g., unpleasant tastes ofexcessive chlorine or chlorinated organic compounds or the health impact of chlorinatedby-products (Bull and Kopfler, 1991).

To address the difficulties of residual maintenance in distribution systems, one may decideto distribute injections of disinfectant to strategic locations in the distribution network. Thispractice of "booster disinfection" has been practiced by utilities for some time. However, itcan be difficult to determine: (1) the best number and locations of disinfectant additions, and(2) the best way to schedule or control the dose at each location over time. These difficultiesarise principally from complex dynamic hydraulics that affect transport of disinfectant,coupled with decay of disinfectant caused by bulk and wall reactions.

This section presents mathematical programming formulations (optimization models)and an associated design approach for locating and scheduling additions of disinfectant indistribution networks. Three formulations are presented. The first formulation attempts toidentify optimal dosage rates of disinfectant at booster stations—in the sense that the totaldisinfectant dosage is a minimum—by assuming that the number of booster stations andtheir locations are known. The resulting LP problem can be solved by the standardsimplex algorithm. The second formulation combines the function of the first formulationwith a determination of the best locations of the booster stations from among a set ofpotential locations. This formulation is a mixed-integer linear programming (MILP)problem with no particular structure and is much more difficult to solve using standardtechniques. The third formulation shows how a pure optimal location problem—whichminimizes the number of booster stations so that the ratio of the minimum to maximumresidual concentrations is controlled—can be expressed as a particular type of integerlinear programming (ILP) problem called the maximum set-covering problem. Doing sois a great advantage because such ILP problems can usually be solved easily andefficiently using the simplex method or heuristics.

All the above formulations share the following characteristics: (1) they assume knowntime-varying network hydraulics (i.e., a known and repeating demand pattern) and first-orderdisinfectant decay kinetics, (2) they consider the dynamic hydraulic behavior in the networkexplicitly and logically to achieve a goal of adequate long-term operation, (3) they effectivelyembed the information and assumptions contained within standard extended-period networkwater-quality models within linear optimal design formulations, and (4) they can be solved inreasonable computer time for practical networks, with the possible exception of the secondformulation above.

Following presentation of the model formulations, solution approaches are discussedalong with a suggested design approach that uses the optimization model formulations inconcert so that the maximum set-covering model is used as a screening model to selectlocations for use by either the optimal location and scheduling (MILP) or optimalscheduling (LP) models. Available software to facilitate development and solution of thesemodels also is discussed.

16.5.1 Background 1: Linear Superposition

In a water distribution system, the monitoring and booster locations coincide with nodesof a dynamic hydraulic and water-quality network model (Boulos et al., 1995; Graymanet. al., 1988; Liou and Kroon, 1987; Rossman and Boulos, 1996; Rossman et al., 1993).

Page 16: Previous Page - dl.mozh.org

The concentration of disinfectant at monitoring node j and time period w, denoted cj(u)[M/L3], generally will depends on the mass injection rate of disinfectant at booster node iand time period fc, denoted u\ [M/T], for all booster locations /and time periods k ^ m (uis the vector of all such mass injection rates). This dependence can be complicated owingto significant time delays for transporting water (and thus disinfectant) between boosterand monitoring nodes and to multiple transport paths between any pair of booster andmonitoring locations. Under certain assumptions that are common to network water-quality simulation models. The principle of linear superposition can be applied to expressthe concentration cj(u) as a linear function of the mass injection rates u. This linearrelationship between injection rates and concentration is a powerful tool for developingpractical optimal design formulations, and it underlies each optimization modelformulation discussed in this section; thus, it is worthwhile to discuss briefly how linearsuperposition can be applied to modeling the dynamics of chlorine concentrations result-ing from dosages at multiple booster stations.

We assume that (1) the water distribution system hydraulics are known and time-varying, (2) disinfectant decay kinetics are first-order with respect to disinfectantconcentrations, and (3) reaction rate coefficients are independent of the booster injectionsif. Boccelli et al. (1998) showed that, under these conditions, transport of disinfectant inwater distribution networks with time-varying hydraulics and disinfectant doses can bedescribed mathematically as a linear dynamic system; thus, the principle of linearsuperposition is applicable (e.g. Luenberger, 1979). They also give a more intuitiveexplanation of linear superposition by way of a simple network example. Using a differentapproach, Zierolf et. al., (1997) derived a recursive expression for cm.(u) by backtrackingthrough the distribution system over all transport paths to find the superimposed impactof all sources of disinfectant. These works show that, for any arbitrarily complicateddistribution system, the monitoring concentration cj(u) can be defined as a linearsummation of individual booster-injection influences:

nb m

<?(«) = 2 E air »* (16-27)i=l k=l

Where af= dcy/dti* ((M/L3)/(M/T)) corresponds to the coefficients of the discretizedimpulse response function (Chow et al., 1988; Oppenheim and Willsky, 1997) describing theeffect of dose u* on the concentration at monitoring node j and time m. The impulse responsecoefficients can be calculated via network water-quality simulation software (see below);once computed, Eq. (16.27) is an accurate mathematical statement of the effect of changesin u on residual concentrations and, because of its simple form, allows development ofefficient mathematical models to optimize dose magnitudes and their locations.

16.5.2 Background 2: Dynamic Network Water-Quality Modelsin a Planning Context

To satisfy engineering objectives, the booster disinfection dosages should maintainadequate disinfectant residuals at all times, much as the hydraulic infrastructure should bedesigned always to maintain minimum pressures. Nevertheless, in a planning context,assumptions about the future variation in dose injections and network hydraulics areneeded to construct practical models for locating and scheduling booster dosages. Suchassumptions are similar in concept to adopting peak demand plus fire flow as a basis forthe design of hydraulic networks. One assumes that networks designed on that basis willoperate in an acceptable manner despite unknown future disturbances (i.e., the actual

Page 17: Previous Page - dl.mozh.org

demands will, in general, never equal the demand scenario assumed for design. However,the assumed scenario is nevertheless useful because it leads to acceptable designs). Theessential problem here is that when using dynamic models as a basis for design (as opposedto steady-state models), one must treat the initial conditions carefully because, although thedynamic water quality response to booster dosing must be reflected in the design, thesedynamics cannot be based on any arbitrary initial conditions. The idea is to make certain thatthe water-quality dynamics are periodic, then base the design on a representative "snapshot"of those periodic dynamics. These conceptual design issues are discussed more fully below,after presentation of the design assumptions and conditions.

We assume that discrete mass injection rates are periodic so that the mass dosagevariation at each booster station has a cycle time T5 = nfa, where ns is the number ofinjection rates contained in one scheduling cycle and Af is the duration of one discrete massinjection period (cycle time is analogous to wavelength). Such an assumption definesperiodic mass dose rates vf such that uf = M^+<?% Vg, k = 1,..., ns. Thus Eq. (16.27)

nb m

cmi(v) = 2 2)°$" v' <16-28)i=l k=l

where the composite impulse response coefficients af?" quantify the response ofconcentration at a monitoring location to a unit periodic dose at a booster station.

If, in addition to injection rates, the aJ™, Vf,fc, are periodic with an impulse responsecycle time T0 = naktm where na is the number of monitoring times contained in oneimpulse-response cycle and Afm is the disinfectant residual-monitoring time step, themonitoring concentration c"j are themselves periodic with a cycle time T0 (Eq. 16.28).Accordingly, the composite impulse response coefficients are assumed to be periodic withcycle time T0, in which case it is sufficient for design purposes to consider only one cycleof these dynamics (this assumption, as well as the conditions under which a^"is periodic,is discussed below). Such a periodicity assumption is one practical solution to theindeterminacy inherent in many long-range planning problems, in which the underlyingprocesses are dynamic and suggest a strong cyclical component.

If the optimal disinfectant concentrations are to be periodic, other characteristics of thesystem must be consistent with such behavior (i.e., merely asserting that residualconcentrations must be periodic does not make them so). First, we have already discussedthat optimal disinfectant doses are assumed to be periodic with a cycle time T5. Intuitively,the monitoring node concentrations could not be periodic if a key driving force—the doseschedules—were not. Second, the hydraulic dynamics obviously play an important role inthe resultant concentration dynamics. Specifically, we assume periodicity of the network'shydraulic dynamics with cycle time Th (i.e., the flow rates, tank elevations, and pressuresare periodic with cycle time Th). Periodic network hydraulics would, on a practical level,require periodic water demands at the network nodes. Of course, the actual demands willdiffer from those assumed for design; thus, the design, if implemented, will performdifferently from model predictions. Again, there is no way completely around thisdifficulty; assumptions about the future are a routine and necessary part of every long-term design or planning problem.

Boccelli et al. (1998) have shown that the monitoring node concentrations and thecomposite impulse response coefficients have a cycle time T0 = r\Ts = \iTh for someintegers TJ, ILI > O. Thus, long-term periodicity of monitoring node concentrations requireslong-term periodicity of both dose schedules and assumed hydraulic dynamics, and therelationship between the independent cycle times T5 and Th is sufficient to determine thecycle time T0. To take a specific example, if hydraulic dynamics are periodic on a 24-hcycle and booster dosages are periodic on a 12-h cycle, then the residual concentrationswill become periodic on a 24-h cycle (n = 2, h = 1).

Page 18: Previous Page - dl.mozh.org

By achieving periodic concentrations of disinfectant assuming periodic dose schedulesand network hydraulics, important dynamic processes are allowed to influence the optimalschedule while maintaining reasonable data requirements. This point is emphasized byconsidering other plausible assumptions about the disinfectant concentration dynamics,and the hydraulic forcing that drives those dynamics. For example, one might assumesteady-state concentrations forced by steady-state hydraulics. Arguably, the assumptionsof dynamic concentrations forced by dynamic hydraulics—even with the pragmaticassumption of periodicity—leads to a more realistic representation of transport and decayof disinfectant in water distribution systems, a point emphasized by some of the resultsBoccelli et al., (1998) discussed.

16.5.3 Optimal Scheduling of Booster-Station Dosages as a LinearProgramming Problem

This section presents a formulation for optimizing booster dose schedules defined by theperiodic dose rates -of, i = 1,..., nb, k = 1,..., ns. The locations of nb booster stations areassumed to be known. The design objective is to minimize the total disinfectant mass rateapplied over one period of the concentration dynamics. This objective is intended as asurrogate for minimizing the formation of disinfection by-products, chemical costs, andobjectionable tastes and odors associated with chlorination of natural waters. However,actual reductions in the formation of disinfection by-products or objectionable tastes andodors cannot be quantified at this time. The mass injections are required to satisfy lowerand upper bound constraints on disinfectant residual at nm monitoring locations and overall time. These constraints are consistent with environmental regulations calling for adetectable residual at all points of consumption to serve as a barrier againstmicrobiological contamination of the distribution system.

The model formulation is stated as the following LP problem:nb Hs

z = min]? 5) Vf <16-29)/=1 k=l

subject tonb ns

cmin ̂ cmfy) = ̂ S 0 "̂ * Vi^ *̂* (16.30)I=I k=l

j = 1,..., /im, m = 1,..., na

vk. ̂ O, i = 1,..., /I4, k = 1,..., ns (16.31)

where c™11 and cmax = minimum and maximum concentration limits within the distributionsystem and na = number of monitoring time periods contained in one period of theconcentration dynamics.

16.5.4 Optimal Location and Scheduling of Booster-Station Dosagesas a Mixed-Integer Linear Programming Problem

This formulation extends the above optimal scheduling model to consider the optimalbooster-station locations. The extension of Eqs. (16.29)-(16.31) yields MILP problem

Page 19: Previous Page - dl.mozh.org

(Hillier and Lieberman, 1980). Once again, the objective is to minimize the total massdose rate during one period of the concentration dynamics:

nb nc

z = min 2 2) ̂ * (1632)1=1 k=i '

subject again to restrictions on the concentrations at monitoring nodes, over all time:n n

cmin ^ cm(v) = ̂ ^) OL*"1 • V* ̂ Cmax (16.33)

i=l k=l

j = l,...nm, m = 1,..., na

Binary variables 8. are introduced to determine whether a new booster station is(8. = 1) or is not (8,. = O) to be built at location i. If there is no booster station at location/, then additional constraints must ensure that the total mass dose is zero at that location:

n

2>f SSM1.^.,* = I9..., nb (16.34)k=i

where M1. is a positive constant equal to an upper bound on the total mass dose at boosterlocation i (assumed to equal the dose for which an entering concentration of c1""1 wouldexit location / at concentration cmax, which can be derived from knowledge of the total flowrate exiting location i over time); thus, when 8. = 1, the total dose at location i isunrestricted, whereas when S1 = O, the total dose is constrained to equal zero. This "bigM" formulation is common in problems involving a facility's location or in "fixed-charge"problems in general, and it is used because it preserves the linearity of the formulation (itdoes not involve any products of S1 and vf, which would result, for example, if instead ofEq. (16.34), one replaced the u? in Eq. (16.33) with the product \)f8f).

A restriction is placed on the total number of booster stations to be built, nb < nb, whichis a surrogate for the cost of installing booster stations:

"i,E 8< ̂ ** (16-35>Z = I

Finally, the variables 6, are restricted in value to zero or one, and again the dose ratesmust be positive:

6,= {0,1},/= 1, ...,nb (16.36)

vf^ O, i = 1,..., nb, k = 1,..., ns (16.37)

The above MILP problem [(Eqs. (16.32)-(16.37)] can be solved by the branch-and-bound technique with the simplex method (e.g., Hillier and Lieberman, 1980). A minormodification of the formulation allows consideration of booster stations that alreadyexist, combined with new potential locations, so that the operation of preexistingfacilities can be optimized simultaneously with the location of new ones. However, thisMILP model is significantly more difficult to solve than the LP scheduling model(solution of the scheduling model is essentially incorporated as a subtask of the branch-and-bound procedure for solving the MILP location model). In practice, it may be thatthe MILP model can be applied only for analysis of large networks if a relatively smallset of potential locations has been determined by experience or other means (i.e., if nb is

Page 20: Previous Page - dl.mozh.org

small—most likely much smaller than the total number of network nodes). Thiscomputational concern leads us to the following formulation of the location model as amaximum set-covering model, which might be used as a method of locating boosterstations in its own right, or as a screening tool to select good potential locations for theMILP formulation.

16.5.5 Optimal Location of Booster Stations as a MaximumSet-Covering Problem

This section shows how the booster-station location problem can be formulated as aclassical integer linear programming (ILP) model called the maximum set-covering(MSC) model. Such a formulation brings with it significant computational advantages, tothe point where medium to large networks can be treated. All network nodes can beconsidered to be potential booster locations, if that is desired, while maintaining acomputationally tractable model. To gain these computational advantages, we give up theability to optimize the dose schedules, preferring instead to treat all booster stations as ifthey would be operated in a rather typical fashion. So, unlike the MILP formulationpresented above, the MSC formulation does not build on the optimal scheduling LP modeldirectly and thus does not combine the two functions of optimal scheduling and optimallocation. For this reason, we suggest that the MSC model be used in concert with eitherthe optimal scheduling or optimal schedulingMocation model formulations presentedabove. This work draws on earlier results in facility location models and, in particular, themaximal covering location model (Church and Revelle, 1974), which also has providedinspiration for models that locate wells in groundwater monitoring networks (Meyer andBrill, 1988).

The basic MSC booster-station location model is relatively simple to statemathematically; we do this first, leaving some of the details and motivation for later.Define a set of indexes of potential booster locations Nj so that booster location i isincluded in Nj if, and only if, disinfectant dosing at i elicits a "significant response" atmonitoring location j and time period m. Thus Nj is the set of indexes of all potentialbooster locations that are assumed to have an effect on residual at monitoring location jand time m. We discuss the precise definition of a "significant response" and thus of thesets Nj below. For now, one can simply assumed that if a booster location elicits a"significant response" at a monitoring location and time, then under reasonable conditionsfor operation of that booster station, an acceptable disinfectant residual can be maintainedat that location and time by operation of only that one booster station.

Again, define the binary variables 8,. to indicate whether a booster station is (S1. = 1)or is not (8; = O) to be constructed at location i. We seek to minimize the number ofbooster stations (a surrogate objective for minimizing the cost of booster stationinstallation and operation) using

">min ̂ &, (16.38)

1=1where nb, again, is the number of potential booster-station locations but is likely to be amuch larger set than would be used in the MILP formulation (e.g., the set of all networknodes might be used as the potential booster locations). In minimizing the number ofbooster stations, we require each monitoring location and time to include a significantresponse from at least one selected booster location. Otherwise, it will be impossible tomaintain the residual concentration at that monitoring point. Mathematically, we have thefollowing constraints:

Page 21: Previous Page - dl.mozh.org

2 5,. > IJ = 1,..., »„, m = 1,..., /I. (16.39)/eA7

Whereas with the above LP and MILP models, the constraints (Eq. 16.39) are writtenfor one cycle of the periodic residual-concentration dynamics. Solution of Eq. (16.38)subject to Eq. (16.39) will yield the minimum number of booster locations that providespatial and temporal "coverage" for the network because the residual concentration ateach monitoring location and time is influenced by at least one selected location.

The coverage set AT is defined, more precisely, to include booster location / if, andonly if, a unit set point concentration at location i elicits a residual concentration responseexceeding a threshold O < T] <. 1 at monitoring location j and time period m. The reasonfor specifying the response in terms of a unit set point concentration is to decouple thedecision about the optimal dose schedules from that about the optimal dose locations. Ifthis decoupling is to be accomplished, one must assume a logical scenario for operationof the booster stations. Here, we define such a scenario as that where each potentialbooster station is operating in an identical manner so that the mass dose schedule appliedleads to a uniform unit exit concentration from the booster station. Such a mode ofoperation would be consistent with a local feedback controller that adjusts the dose rateto maintain a unit set point.

The coverage sets can now be defined in terms of the impulse response coefficients a1?.:

NJ= {/la™ ̂ T]} (16.40)

Where the impulse response coefficients a1?, are defined in a similar fashion as in Sec.16.5.3 except they indicate the periodic concentration response at monitoring location jand time m as a result of a particular periodic mass dosage at booster location i so that aunit set point concentration is maintained at location i at all times.

To attach some meaning to the residual coverage parameter T], we proceed as follows.First, we could just as well define the coverage sets as follows:

NJ1= {ilcj»^cmin} (16.41)

where cj is the concentration that results from maintaining a set point concentration atbooster station location i and cmin, again, is the minimum disinfectant residual allowed ordesired. Furthermore, the maximum residual concentration in the network is the set pointconcentration maintained at the booster locations because of disinfectant decay. Since allbooster stations are assumed to be operating identically (at the same exit set-pointconcentration), let us call this set-point concentration cmax —the maximum anywhere inthe network. Linear superposition then allows us to define the concentration cj in Eq.(16.41) in terms of the impulse response coefficient a1*: cj = a^c™*', substitution inEq. (16.41) and rearranging yields

Af!" = {llaj1 ^ c™n/cmax) (16.42)

Thus, comparing Eqs. (16.40) and (16.42), the residual coverage parameter T] =cmin/cmax has a meaningful interpretation as the ratio of the minimum to maximum residualconcentration in the network—arguably a useful measure of residual variability. In fact, r\is interpreted more accurately as a lower bound on cmin/cmax for booster stations operatedto maintain an identical set point since any set of booster stations satisfying Eq. (16.39)will include at least one booster station for every monitoring location and time so thatajj stTi.

Page 22: Previous Page - dl.mozh.org

The residual coverage parameter will be a key determinant of solutions to the MSCbooster location model. As a mental exercise, one can consider a network where everynode (and thus every monitoring location) is a potential booster location. The optimalMSC solutions for the extreme values of T] = e (where e is an arbitrarily small strictlypositive constant) and TI = 1 are known immediately. When T] = e the solution is aminimal set of booster locations restricted to those associated with network water sources(this is the conventional case where disinfectant is added only at treatment nodes). WhenT] = 1, the solution includes every node in the network, which is the only way to have aperfectly uniform concentration at each monitoring node. Thus, T] will be related to thenumber of booster stations required to achieve "coverage" of the monitoring locations andtimes, and a plot of the optimal number of booster stations (from solution of the MSCproblem) versus the residual coverage parameter TJ indicates the optimal trade off betweenthe variability of disinfectant residual and a measure of residual maintenance costs.

16.5.6 Solution of the Optimization Models

A critical step in solving each optimization model described above is calculation of theappropriate impulse response coefficients. Furthermore, these impulse response coeffi-cients must convey the influence of a periodic dosage on the resulting periodic concentra-tion dynamics. We stress that, as was discussed above, hydraulic and disinfectant-doseperiodicity is a necessary condition for long-term residual concentration periodicity, yetlittle can be said about the time required for the residuals to become periodic (say, in anetwork simulation). Briefly, the dynamic concentrations can be said to consist of twocomponents: nonperiodic dynamics resulting from the initial conditions (initialconcentrations in pipes and reservoirs, as specified in a simulation) and periodic dynamicsfrom the periodic dosages and hydraulics. According to the design approach advocatedhere, the initial conditions are considered to be arbitrary and thus their effect must beignored when computing the impulse response coefficients. Software is available whichaccomplishes this when the response coefficients are calculated via perturbation methods(see Sec. 16.5.7).

The LP scheduling model is relatively straightforward to solve using existing methodsfor general LP problems and, specifically, the simplex method. The size of the problem forpractical networks is within the capability of commercial LP software because the numberof decision variables depends on the selected number of scheduling periods times thenumber of booster stations ns X nb and is otherwise independent of the size of the pipenetwork and system dynamics. However, the size of the constraint set will depend on thepipe network through the number of monitoring locations nm and the impact cycle time Ta

In any case, at least for the most straightforward method of calculating the impulse responsecoefficients, the total efficiency of solution seems to hinge more on the problem setup thanon the actual LP solution. The calculation of composite impulse response coefficients a ̂ "will at least be a significant component of the total computational burden.

Much of what has been said above also applies to solving the MILP scheduling/locationmodel. However, solution by branch-and-bound with the simplex method is far moreintensive computationally, and no reliable methods exist for estimating the solution time apriori. It also is likely that algorithmic options or problem-specific details will greatlyinfluence the computation time. In short, solution is not straightforward, but it is possiblefor practical networks, provided that the number of potential booster locations is not toolarge and that sufficient time is devoted to understanding the effect of algorithmic optionsand tolerances on branch-and-bound performance.

Page 23: Previous Page - dl.mozh.org

The MSC model formulation is a special category of ILP optimization models. Modelsof this type are usually efficient to solve compared with IP models of the same dimensionthat lack any particular structure; it is not unusual that the relaxed solution of an MSCmodel (where the binary variables are allowed to vary continuosly between zero and one,yielding a pure LP problem) is a natural integer solution, in which case the solution isefficient to obtain via the simplex algorithm. Heuristics also have been invented on thebasis of the special form of the constraints. Similar models (in other application contexts)have been solved using LP plus heuristics, LP plus branch-and-bound implicit enumer-ation, and simulated annealing (Church and Revelle, 1974, Meyer and Brill, 1988; Meyeret al., 1994).

16.5.7 Available Software

A computer code called Booster Disinfection Design Algorithms (BDDA) (Uber et al.,1999) has been developed to interface with EPANET (Rossman, 1994), a distributionsystem water-quality model, to produce a specification of the above optimal boosterscheduling, location problems, or both automatically, given a calibrated dynamic networkwater-quality model. The code can produce a specification of the optimization modelformulations in standard MPS format (Murtagh, 1981). This specification of theLP/MILP/MSC problem can then be solved using any available implementation of thesimplex algorithm (LP) or branch-and-bound with the simplex method (MILP/MSC).Alternatively, the code interfaces directly with the CPLEX LP and MILP solution algorithms(CPLEX, 1988) for users of that commercial software. The standard EPANET data filecontains information about the physical and chemical characteristics of the distributionsystem. The BDDA application requires additional information that is relevant to theoptimization model formulation, including potential and existing booster locations, boosterschedule cycle time (T5), number (ns) and length of mass injection intervals for each boosterlocation, monitoring of node locations, and lower and upper residual bounds (c1™" and cmax,respectively).

Figure 16.11 illustrates the steps required to set up the LP optimal schedulingproblem for solution; the MILP and MSC problem setup is similar. First, the networkhydraulics are simulated for use during subsequent water-quality simulations; the cycletime Th is determined from this hydraulic solution. Tn can be determined by values ofT], jji > O so that Ta = r\Ts = ^Tx = \jJTh is a minimum. The matrix generator thencomputes the composite impulse-response coefficients by a straightforwardperturbation method. Each booster location / and periodic dose interval k is selected inturn and is modeled as a periodic source of disinfectant (so that uk

t + Pms = v, Mp s» n).

Because the quantity v is a sufficiently large dose rate, roundoff error is avoided in thecalculation of the impulse response coefficient. The matrix generator uses simulatedconcentrations for the nm monitoring nodes (cj) to calculate the composite impulse-response coefficients corresponding to the periodic mass injections (aff= cy/v, m = M,..., M + na — 1). The value of the time period M is estimated as the time whendifferences in impulse-response coefficient values over successive impact cycles (oflength Ta) are considered to be insignificant (Ia^" - a£m ~"« I s e). Once M has beendetermined (for a particular booster node i and injection period k), the BDDA recordsthe column of the LP coefficient matrix corresponding to vf. This iterative procedurecontinues until all booster locations and injection periods have been analyzed. TheBDDA then adds the neccesary constraint information to the MPS description of the LPproblem for solution by a commercial optimization algorithm, or it interfaces directlywith the appropriate CPLEX modules.

Page 24: Previous Page - dl.mozh.org

FIGURE 16.11 Setup of optimal scheduling of booster disinfection dosages as a linear programmingproblem.

16.5.8 Summary

Optimization model formulations were described for optimal location and scheduling ofbooster disinfection dosages throughout a distribution network and throughout time.Objectives include minimizing the total mass of disinfectant applied at multiple points ina distribution system and minimizing the total number of booster stations constructed.Constraints ensure the maintenance of adequate disinfection residuals at all monitoringnodes and at all times. The key to these formulations is to notice that linear superpositionis applicable to transport of disinfectant in distribution networks, assuming that the futuredynamic hydraulics are known. By assuming periodicity of the hydraulics and requiringthe optimal dose schedules to be periodic, formulations were derived that logicallyincorporate the important influence of disinfectant concentration dynamics into thebooster scheduling and location designs.

Determine Tk byhydraulic simulation

i = 1k = 0

Assign periodicinjections,Uk+pms — $

P = O, 1,...

Simulatedisinfectant

concentrations c J

J= l,...,nm,m = 1,...,Af + n - 1

FALSE

i < n.

Solve LP usingsimplex algorithm

Write LP coefficientmatrix elements for

u*

Add constraint datato LP specification

FALSE

TRUE

TRUE

Page 25: Previous Page - dl.mozh.org

REFERENCES

Alia, P., and P. A. Jarrige, "Optimal Control of the West Parisian Area Water Supply Network,"Proceedings of the 16th Annual Conference of ASCE Water Resources Planning and ManagementDivision, pp. 661-664. 1989,

Awumah, K., and K. Lansey, "Energy Efficient Pump Station Operation with a Pump SwitchingConstraint," Proceedings of the Water Resource Sessions at Water Forum 92, ASCE, pp. 604-609.1992,

Bao, Y. X., and L. W. Mays, "New Methodology for Optimization of Freshwater Inflows toEstuaries," ASCE Journal of Water Resources Planning and Management, 120:199-217, 1994a.

Bao, Y. X., and L. W. Mays, "Optimization of Freshwater Inflows to the Lavaca-Tres Palacios, Texas,Estuary," ASCE Journal of Water Resources Planning and Management, 120:218-236, 1994b.

Boccelli, D., M. Tryby, J. Uber, L. Rossman, M. Zierolf, and M. Polycarpou, "Optimal Schedulingof Booster Disinfection in Water Distribution Systems," ASCE Journal of Water ResourcesPlanning and Management, 124: 1998.

Boulos, P. F, T. Altman, P. Jarrige, and F. Collevati, "Discrete Simulation Approach for Network-Water-Quality Models," ASCE Journal of Water Resources Planning and Management, 121:49-60,1995.

Bree, D. W, D. H. Budenaers, D. N. Morgan, and L. C. Markel, "Improved Methodology for Designand Operation of Water Distribution Systems," Final Technical Report, OWRT Project No. C-6198,Systems Control, Palo Alto, CA, June 1976.

Brion, L. M., "Methodology for Optimal Operation of Pumping Stations in Water DistributionSystems," Doctoral dissertation, University of Texas, Austin, Texas, 1990.

Brion, L. M., and L. W. Mays, "Methodology for Optimal Operation of Pumping Stations in WaterDistribution Systems," ASCE Journal of Hydraulic Engineering, 117(11): 1551-1569, 1991.

Bull, R. J., and R. C. Kopfler, Health Effects of Disinfectants and Disinfection By-products, AmericanWater Works Association Research Foundation, Denver, CO, 1991.

Carpentier, P., and G. Cohen, "Decomposition, Coordination and Aggregation in the Optimal Controlof a Large Water Supply Network," Proceedings of the 9th Triennial IFAC World Congress,Budapest, Hungary, pp. 3207-3212, 1984.

Caves, J. L., and T. C. Earl, "Computer Applications: A Tool for Water Distribution Engineering,"Journal of the American Water Works Association, 75:230-235, 1979.

Cembrano, G., M. Bryds, J. Quevedo, B. Coulbeck, and C. Orr, "Optimization of a Multi-ReservoirWater Network Using a Conjugate Gradient Technique: A Case Study," Proceedings of the 8thINRIA International Conference on Analysis and Optimization of Systems, Antibes, France, pp.987-999, 1988.

Chase, D., and L. Ormsbee, Optimal Pump Operation of Water Distribution Systems with MultipleStorage Tanks, Proceedings of the American Water Works Association Computer SpecialtyConference, American Water Works Association, pp. 205-214, 1989.

Chase, D., and L. Ormsbee, "An Alternate Formulation of Time as a Decision Variable to FacilitateReal-Time Operation of Water Supply Stems," Proceedings of the 18th Annual Conference of theASCE Water Resources Planning and Management Division, pp. 923-927, 1991.

Chase, D., D. Guastella, K. Lai, and L. Ormsbee, "Energy Management for Large-Scale WaterSupply Systems," Proceedings of the AWWA Computer Conference, Los Angeles, CA, April 1994.

Chen, Y., "Application of Time Series Analysis to Water Demand Prediction," in B. Coulbeck and C.Orr, eds., Computer Applications in Water Supply, Vol. 2, Research Studies Press, Somerset, UK,pp. 289-295, 1988a.

Chen, Y, "Simplification of Water Distribution Systems for Optimal Operations," ComputerApplications in Water Supply, Vol. 2, Research Studies Press, Somerset, UK, pp. 208-224, 1988b.

Chow, V. T, D. R. Maidment, and L. W. Mays, Applied Hydrology, McGraw-Hill, New York, pp.204-213, 1988.

Church, R., and C. Revelle, "The Maximal Covering Location Problem," Pap. Reg. Sd. Assoc.,32:101-118, 1974.

Page 26: Previous Page - dl.mozh.org

Clark, R. M., "Applying Water Quality Models," in M. H. Chaudry and L. W. Mays, eds., ComputerModeling of Free-Surface and Pressurized Flows, Kluwer Academic Publishers, Netherlands, pp.581-612, 1994.

Clark, R. M., W. M. Grayman, R. M. Males, and A. Hess, "Modeling Contaminant Propagation inDrinking Water Distribution Systems," ASCE Journal of Environmental Engineering,119(2):349-364, 1993.

Cohen, G., "Optimal Control of Water Supply Networks," in S. G. Tzafestas, ed., Optimization andControl of Dynamic Operational Research Models, Vol. 4, North-Holland Publishing Company,Amsterdam, 1982.

Coulbeck, B., "Optimization of Water Networks," Transactions of the Institute of Measurement andControl, 6:271-279, 1984.

Coulbeck, B., and M. Sterling, "Optimal Control of Water Distribution Systems," Proceedings of theInstitute of Electrical Engineers, 125:1039-1044, 1978.

Coulbeck B., S. Tennant, and C. Orr, "Development of a Demand Prediction Program for Use inOptimal Control of Water Supply," Systems Science, ll(l):59-66, 1985.

Coulbeck, B., M. Bryds, C. Orr, and J. Ranee, "A Hierarchal Approach to Optimized Control of WaterDistribution Systems: Part I. Decomposition," Journal of Optimal Applications and Methods,9(1):51-61, 1988a.

Coulbeck, B., M. Bryds, C. Orr, and J. Ranee, "A Hierarchal Approach to Optimized Control of WaterDistribution Systems: Part n. Lower Level Algorithm," Journal of Optimal Control Applicationsand Methods, 9(2): 109-126, 1988b.

DeMoyer, R., and L. Horowitz, A Systems Approach to Water Distribution Modeling and Control,Lexington Books, Lexington, MA, 1975.

Dougherty, D. C., and R. A. Marryott, "Optimal Groundwater Management - 1. SimulatedAnnealing," Water Resources Research, 27:2493-2508, 1991.

Epp, R., and Fowler, A. G., "Efficient Code for Steady-State Flows in Networks," ASCE Journal ofthe Hydraulics Division, 96(l):43-56, 1970.

Fallside, F., "Computer Techniques for On-line Control of Water Supply Networks," in B. Coulbeckand C. Orr, eds., Computer Applications in Water Supply, Vol. 2, Research Studies Press, Somerset,UK, pp. 313-328 1988.

Fallside, F, and P. Perry, "Hierarchical Organization of a Water-Supply Network," Proceedings of theInstitute of Electrical Engineers, 122:202-208, 1975.

Fletcher, R., "An Ideal Penalty Function for Constrained Optimization," Journal of the Institute ofMathematics and Its Applications, 15:319-342, 1975.

Goldman, F. E., "The Application of Simulated Annealing for Optimal Operation of WaterDistribution Systems," Doctoral dissertation, Department of Civil and Environmental Engineering,Arizona State University, Tempe, 1998.

Grayman, W. M., R. M. Clark, and R. M. Males, "Modeling Distribution-System Water Quality:Dynamic Approach," ASCE Journal of Water Resources Planning & Management, 114:295-312,1988.

Hillier, FS., and G. J. Lieberman, Introduction to Operations Research, Holden-Day, Oakland, CA,pp. 68-91 1980.

Hutchinson, B., "Operational Control of Water Distribution Systems," Proceedings of the 1991American Water Works Association Conference on Computers in the Water Industry, pp. 53-591991.

IAPMO (International Association of Plumbing and Mechanical Officials), Uniform Plumbing, 1994.Jentgen, L. A., and R. Hume, "Applications of a SCADA and Optimum Pump Control System for the

Enhancement of Water Distribution System Operations and Maintenance", Proceedings of the 1989American Water Works Association Conference on Computers in the Water Industry, 459-480,1989.

Joalland, G., and G. Cohen, "Optimal Control of Water Distributions by Two Multilevel Methods,"Automatica, 16(2):83-88, 1980.

Jowitt, P., R. Garrett, S. Cook, and G. Germanopoulos, "Real-Time Forecasting and Control for WaterDistribution," in B. Coulbeck and C. Orr, eds., Computer Applications in Water Supply, Vol. 2,Research Studies Press, Somerset, UK, pp. 329-355 1988.

Page 27: Previous Page - dl.mozh.org

Jowitt, P., and Germanopoulos, G., "Optimal Schaduling in water. Supply Networks" ASCE Journalof Water Resources Planning and Management 118: 406-422, 1992.

Kirkpatrick, S., "Optimization by Simulated Annealing: Quantitative Studies," Journal of StatisticalPhysics, 34:975-986, 1984.

Kirkpatrick, S., C. D. Gelatt, and M. P. Vecchi, "Optimization by Simulated Annealing," Science,220(4598):671-680, 1983.

Lannuzel, P., and L. Ortolano, "Evaluation of Heuristic Program for Scheduling Treatment PlanPumps", Journal of Water Resources Planning and Management, 115:457 -̂71, 1989.

Lansey,K. E., and K. Awumah, "Optimal Pump Operations Considering Pump Switches," ASCEJournal of Water Resources Planning and Management, 120:17-35, 1994.

Lansey, K. E., and L. W. Mays, "Optimization Model for Water Distribution System Design," ASCEJournal of Hydraulic Engineering, 115:1401-1418, 1989.

Lansey, K., and Q. Zhong, "A Methodology for Optimal Control of Pump Stations: Water ResourcesInfrastructure," Proceedings of the 1990 Water Resources Planning and Management SpecialtyConference, 58-61, 1990.

Lasdon, L. S., and A. D. Waren, GRG2 User's Guide, Department of General Business, University ofTexas at Austin, 1986.

Li, G., and L. W. Mays, "Differential Dynamic Programming for Estuarine Management," ASCEJournal of Water Resources Planning and Management, 121:455-462, 1995.

Liou, C. P., and J. R. Kroon, "Modeling the Propagation of Waterborne Substances in DistributionNetworks, Journal of the American Water Works Association, 79(ll):54-58, 1987.

Little, K., and B. McCrodden, "Minimization of Raw Water Pumping Costs Using MILP" ASCEJournal of Water Resources Planning and Management, 115:511-522, 1989.

Luenberger, D. G, Introduction to Dynamic Systems: Theory, Models, and Applications, John Wileyand Sons, New York, NY, pp. 108-112, 1979.

Maidment, D. R., S. Miaou, and M. Crawford, "Transfer Function Models of Daily Urban WaterUse," Water Resources Research, 21:425-432, 1985.

Mays, L. W., Optimal Control of Hydrosystems, Marcel Dekker, New York, 1997.Meyer, P., and E. C. Brill, Jr., "A Method for Locating Wells in a Groundwater Monitoring Network

Under Conditions of Uncertainty," Water Resources Research, 24(8), 1988.Meyer, P., A. Valocchi, and J. W. Eheart, "Monitoring Network Design to Provide Initial Detection of

Groundwater Contamination," Water Resources Research, 30: 1994.Moss, S. M. On Line Optimal Control of a Water Supply Network, Doctoral dissertation, Cambridge

University, Cambridge, UK, 1979.Murtagh, B. Advanced Linear Programming: Computation and Practice, McGraw-Hill, New York,

1981.Oppenheim, A. V., and A. S. Willsky, Signals and Systems, 2nd ed., Prentice-Hall, Englewood Cliffs,

NJ, pp. 77-90 1997.Ormsbee, L., and A. Jain, "A Comparison of Daily Demand Forecast Models for Municipal Water

Use," Proceedings of the 1994 AWWA Computer Conference, Los Angeles, CA, April 1994, pp.Ormsbee, L., and S. Lingireddy, "Nonlinear Heuristic for Pump Operation," ASCE Journal of Water

Resources Planning and Management, 121:302-309, 1995a.Ormsbee, L., and S. Lingireddy, "Pumping System Control Using Genetic Optimization and Neural

Networks," Proceedings of the 7th IFAC/IFORS/IMACS Symposium on Large Scale Systems:Theory and Applications, London, UK, July 11-13, 1995b.

Ormsbee, L., T. Walski, D. Chase, and W. Sharp, "Techniques for Improving Energy Efficiency atWater Supply Pumping Stations," ETL 1110-1-86, U.S. Army Corps of Engineers, Vicksburg, MS,1987.

Ormsbee, L., T. Walski, D. Chase, and W. Sharp, "Methodology for Improving Pump OperationEfficiency," ASCE Journal of Water Resources Planning and Management, 115:148-164, 1989.

Orr, C.H., and B. Coulbeck, "Computer Applications in Water Systems in the U.K.," Proceedings ofthe 16th Annual Conference of the ASCE Water Resource Planning and Management Division, pp.653-656, 1989.

Page 28: Previous Page - dl.mozh.org

Orr, C.H., M. Parkar, and S. Tenant, "Implementation of an On-line Control Scheme for a City WaterSystem," ASCE Journal of Water Resources Planning and Management, 116:709-726, 1990.

Perry, P. R, "Demand Forecasting in Water Supply Networks," ASCE Journal of the HydraulicsDivision, 107:1077-1087, 1981.

Pirnie, Malcolm, Inc., "Peoria Water Master Plan-Technical Memorandum No. 3-Distribution andFlow Model (Draft)" 1996.

Rao, H. S., and D. Bree, Jr., "Extended Period Simulation of Water Systems-Part A," ASCE Journalof the Hydraulics Division, 103(HY2):97-108, 1977.

Reklaitis, G. V., A. Ravidran, and K. M. Ragsdell, Engineering Optimization: Methods andApplications, Wiley Interscience, New York, 1983.

Revelle, C. S., D. P. Loucks, and W. R. Lynn, "A Management Model for Water Quality Control,"Journal of the Water Pollution Control Federation, 39(6): 1967.

Revelle, C. S., D. P. Loucks, and W. R. Lynn, "Linear Programming Applied to Water QualityManagement," Water Resources Management, 4(1): 1-9, 1968.

Rossman, L. A., EPANET Users Guide, Drinking Water Research Division, Risk ReductionEngineering Laboratory, Office of Research and Development, U.S. Environmental ProtectionAgency, Cincinnati, OH, 1994.

Rossman, L. A., and P. F. Boulos, "Numerical Methods for Modeling Water Quality in DistributionSystems: A Comparison," ASCE Journal of Water Resources Planning and Management,122:137-146, 1996.

Rossman, L. A., P. F. Boulos, and T. Altman, "Discrete Volume Element Method for Network Water-Quality Models," ASCE Journal of Water Resources Planning and Management, 119:505-517,1993.

Rossman, L. A., R. M. Clark, and W. M. Grayman, "Modeling Chlorine Residuals in Drinking-WaterDistribution Systems," ASCE Journal of Environmental Engineering, 120:803-820, 1994.

Sabet, M., and O. Helweg, "Cost Effective Operation of Urban Water Supply System Using DynamicProgramming," Water Resource Bulletin, 21(1):75-81, 1985.

Sakarya, A. B., "Optimal Operation of Water Distribution Systems for Water Quality Purposes,"Doctoral dissertation, Department of Civil and Environmental Engineering, Arizona StateUniversity, Tempe, 1998.

Sastri, T, and J. B. Valdes, "Rainfall Intervention for On-line Applications," ASCE Journal of WaterResources Planning and Management, 115:397-̂ 15, 1989.

Seborg, D. E., T. F. Edgar, and D. A. Mellichamp, Process Dynamics and Control, John Wiley &Sons, New York, pp. 224-2451989.

Shamir, U., "Computer Applications for Real-Time Operation of Water Distribution Systems,"Proceedings of the ASCE Specialty Conference on Computer Applications in Water Resources, pp.379-390 1985.

Shamir, U., and C. D. D. Howard, "Water Distribution Systems Analysis," ASCE Journal of theHydraulics Division, 94(1):219-234, 1968.

Smith, J. A., "A Model of Daily Municipal Water Use for Short Term Forecasting," Water ResourcesResearch, 24:201-206, 1988.

Solanos, J., and J. Montoliu, "The Optimal Operation of Water Systems," in B. Coulbeck and C. Orr,eds, Computer Applications in Water Supply, Vol. 2, Research Studies Press, Somerset, UK, pp.356-375 1988.

Steiner, R. C., "Operational Demand Forecasting for Municipal Water Supply," Proceedings of the16th Annual Conference of the ASCE Water Resources Planning and Management Division,445^48 1989.

Sterling, M., and B. Coulbeck, "A Dynamic Programming Solution to Optimization of PumpingCosts," Proceedings of the Institute of Civil Engineers, 59(2):813-818, 1975a.

Sterling, M., and B. Coulbeck, "Optimization of Water Pumping Costs by Hierarchical Methods,"Proceedings of the Institute of Civil Engineers, 5 9(2): 7 87-797, 1975b.

Tarquin, A., and J. Dowdy, "Optimal Pump Operation in Water Distribution, ASCE Journal ofHydraulic Engineering, 115:-168, 1989.

Page 29: Previous Page - dl.mozh.org

Tatejewski, P., "A Suboptimal Approach to Scheduling of Reservoir Levels for a Multi-ReservoirWater Distribution Network," in B. Coulbeck and C. Orr, eds., Computer Applications in WaterSupply, VoI 2, Research Studies Press, Somerset, UK, pp. 225-239, 1988.

Tryby, M. E., D. C. Boccelli, M. T. Koechling, J. G. Uber, R. S. Summers, and L. A. Rossman,"Booster Disinfection for Managing Disinfectant Residuals," Journal of the American Water WorksAssociation, 91(1): 1997.

Ulanicki, B., and C. H. Orr, "Unified Approach for the Optimization of Nonlinear HydraulicSystems," Journal of Optimization Theory and Applications, 68(1):161-171, 1991.

Unver, O. L., and L. W. Mays, "Model for Real-Time Optimal Flood control Operation of a ReservoirSystem," Water Resources Management, 4:21-46, Kluwer Academic, Netherlands, 1990.

Vasconcelos, J. J., P. F. Boulos, W. M. Grayman, L. Kiene, O. Wable, P. Biswas, A. Bhari, L. A.Rossman, R. M. Clark, and J. A. Goodrich, Characterization and Modeling of Chlorine Decay inDistribution Systems, AWWA Research Foundation and American Water Works Association,Denver, CO, pp. 258-271 1996.

Wagner, H. M., Principles of Operations Research with Applications to Managerial Decisions,Prentice-Hall, Englewood Cliffs, NJ, pp. 361-365, 1969.

Wanakule, N., L. W. Mays, and L. S. Lasdon, "Optimal Management of Large-Scale Aquifers:Methodology and Applications," Water Resources Research,22:441~465, 1986.

Whaley, R. S., and R. Hume, An Optimization Algorithm for Looped Water Networks," Proceedingsof the PSIG (Pipeline Simulation Interest Group) Annual Meeting", pp. 361-365, 1986.

Wood, D. J., and C. Charles, "Hydraulic Network Analysis Using Linear Theory," ASCE Journal ofthe Hydraulics Division, 9%',l 157-1170, 1972.

Zessler, U., and U. Shamir, "Optimal Operation of Water Distribution Systems," ASCE Journal ofWater Resources Planning and Management, 115:735-752, 1989.

Zierolf, M. L., M. M. Polycarpou, and J. G. Uber, "Development and Auto-Calibration of an Input-Output Model of Chlorine Transport in Drinking Water Distribution Systems," IEEE Transactionson Control Systems Technology, 1997.