You are on page 1of 6

400

Application of Genetic Algorithms to Pump Scheduling for Water Supply

Gunther MacMe Dragan A. Savic Gsdfrey A Waltess

University of Exeter

U.K.

Abstract reservoir capacities, abstraction limits,


pumping capacity and treatment works
A Simple Genetic Algorithm has been applied throughput.
to the scheduling of multiple pumping units in
a water supply system with the objective of Optimisation Methods
minimising the overall cost of the pumping There are several types of optimisation meth-
operation, taking advantage of storage capac- ods which have been used to find optimal
ity in the system and the availability of off- pump schedules when, because of complex
peak electricity tariffs. A simple example water distribution systems, simple calculations
shows that the method is easy to apply and has are no longer possible. The main methods
produced encouraging preliminary results. used at present are linear programming, dy-
namic programming, network flow program-
1 htroduction ming and non-linear programming. Details of
these methods are given in [l].
Pump Scheduling
Due to increased levels of urbanisation and None of these methods is totally satisfactory
consumer demand, most water distribution for all types of pump scheduling problem, and
systems have become increasingly complex so there cannot be general advice given as to
and so too has the task of efficient scheduling which method is best to use. They all have one
of pump operation. Theoretical studies and common problem, namely that they work well
practical implementation of optimal pump for small systems but they encounter difficul-
scheduling in various types of supply system ties when dealing with larger ones. For ex-
suggest that 10%of the annual expenditure on ample they may become inadequate when
energy and related costs may be saved [l]if there are more than two reservoirs in the sys-
proper optimisation methods are used. A sys- tem or even for one-reservoir systems which
tematic approach to the subject is therefore have several different pump combinations or
highly desirable. complicated system constraints. The amount
of necessary calculation increases so rapidly
Pump scheduling is the process of choosing with the number of reservoirs and possible
which of the available pumps within a water pump combinations that the computing re-
supply system are to be used and for which quirements become unacceptable.
periods of the day the pumps are to be run.
The aim of pump scheduling is to minimise This paper presents an attempt to solve the
the marginal cost of supplying water, whilst aforementioned optimisation problem by using
keeping within physical and operational con- Genetic Algorithms (GAS). GAS treat discrete
straints, such as maintaining sufficient water values used in pump scheduling models natu-
within the system’s reservoirs to meet the re- rally and thus they seem well suited to this
quired time varying consumer demands. kind of optimisation.

Important features of cost are the electricity A description of standard genetic algorithms
tariff structure, the relative efficiencies of the can be found in [2,3]. The paper now goes on
available pump sets, the head through which to describe the application of genetic algo-
they pump and marginal treatment costs. Im- rithms to pump scheduling and to discuss the
portant constraints include consumer demand, possibilities of improving their performance.

Genetic Algorithms in Engineering Systems: Innovations and Applications


12-14 September 1995, Conference Publication No. 414,O IEE, 1995
40 1

2 Pump Scheduling Model 3 Genetic . A l g o ~for


~ t]Pump
~ ~ Scheduling

First, some facts about modelling the supply Initially a standard GA was adopted contain-
system must be mentioned. It is normi~llysuf- ing:
ficient to consider scheduling over a one day
period, taking the historic demand paltern for 0 a fitness function which calculates the
an average day as the predicted requirement. fitnesses of the population members di-
Pumps can supply water from one or more rectly from their costs
sources to one or more reservoirs, from which e the genetic operators
the demands are drawn. For continuity, the * one-, two-, or multiple point cross-
reservoirs must finish their daily cyclie at the over
same level from which they started. ‘The day 4 mutation
has to be divided up into time intervals, during * an ellitist strategy
which each pump can either be switched on or
not. The pump schedule derived will specify This GA works but performs relatively ineffi-
the time intervals for which each pump has to ciently, as the calculation times even for small
be switched on. Only fixed speed pumps are systems are quite long with a lot of genera-
considered in this study. For all possible pump tions needed to find optimal solutions. Some
combinations, the pump efficiencies and improvement can lbe achieved by tailoring the
head/flow characteristics have to be defined. optimization paraimeters such as population
Furthermore the usable reservoir capacities size, probability of mutation and crossover to
have to be determined, and maximum and the specific grobllem. The most significant
minimum levels set. improvement, however, comes from the intro-
duction of a ranking function for the members
The next step is to define the cost fiinction, for calculating their relative fitnesses, as de-
which has to include all the essential expendi- scribed litter in the paper.
ture caused by the pumping process. The main
component will be the cost of electricity but For pump scheduling, the use of a standard
other costs such as special charges for peak binary coding is the obvious choice, since each
monthly electrical demand or a maintenance binary value can represent one pump that is
charge dependent on the number of pump either on or off during a particular time inter-
switches made, can be included. val. The use of other forms of coding were
considered to have no advantages for this type
To ensure that the system constraints are not of problem.
violated in the solution, it is necessary to in-
troduce penalty functions for unfulfililed de- Ranking of the Population
mand, violation of reservoir capacity, etc. To In the standard GA the fitness of each member
define suitable values for the penalties is an is calculaited as an inverse function of the cost.
important task in order to make the search in The relative fitness and prolbability of being a
the solution space as efficient as possible. Too parent are then derived. The relative fitness
small a penalty will make it likely that a large can, however, cause difficulties. If the fit-
part of the search is performed outside the real nesses axe quite similar there will not be a
solution space and too high a penalty can proper selection between good and less good
make it difficult for the genetic algorithm to solutions, but if, on the other hand, the rela-
find the optimal solution if it is near or even tive fitnesses of a very few members are too
on a boundary introduced by the system con- high ciornpared to the others, this will soon
straints. lead to a lack of diversity in the population.

The cost function, now including all h e dif- For this application, the problem was solved
ferent cost components and constraint viola- by introducing a ranking procedure [4]. The
tion penalties is generally non-linear aind non- population members are ranked in order ac-
differentiable. It depends on several ldiscrete cording to their costs. Each then receives a
valued variables and so the task of optimka- fitness dependent on its position within the
tion is computationally difficult. An attempt to ordered list. For simplicity, a fitness equal to
apply genetic algorithms to this optinnisation the order number is used, tlhe most expensive
problem is detailed in the next section. solution getting a fitness of 1, the next 2 etc.
402

The introduction of the ranking function leads length of the complete binary string for the
to a remarkable increase of the efficiency of solution space is 24 x 4 = 96. With this binary
the genetic algorithm. The extra computing string all the 296 (8x1QZ8)theoretically possi-
time needed each generation to sort the popu- ble pump schedules are represented. A1 the
lation, (using a heap sort algorithm [SI), is important data about the pump c o ~ b i ~ a ~ ~ o n s
small compared to the time saved by finding their efficiencies and the influence of the
the optimal or near optimal solu!ion in a pump head are precalculated and summarised
greatly reduced number of generations. Fur- in Table 1. The binary coding is also defined
thermore the ranking function makes the ge- there, 1 meaning switched on and zero
netic algorithm more robust against factors switched off.
such as inappropriate sizing of penalty func-
tions. Cost function
The main cost is for the energy to pump the
4 Computational Considerations for an water into the reservoirs. The amount of elec-
Example System tricity consumed by each pQmp combination,
which is shown in table 1 has to be multiplied
The example used for demonstration of the by the unit costs for electricity. It is assumed
method is a simple system with 4 different that the night-time tariff is 7 money-units per
pumps delivering water to a single reservoir. electricity-unit and that the day-time tariff is
Consequently there are 16 different possible double that price. The higher daytime tariff
pump combinations. The day was divided up has to be paid from 7 a.m. until 8 p.m. It is
into 24 time intervals, each of one hour, with easy to include other types of cost like previ-
the demand drawn from the reservoir chang- ously mentioned maintenance costs which
ing for each hour. The difference between the may depend on the number of times per day
rate at which water is pumped to the reservoir that pumps are switched, or any other costs
and the demand is accommodated by changes e.g. different costs for taking the water from
in the volume of water stored in the reservoir, different sources. However, to include a
subject to maximum and minimum storage monthly peak demand electricity tariff, as re-
volumes. To represent the 16 different pump quired for some systems, makes it necessary to
combinations, a binary string of length 4 is extend the optimisation period from one day to
required, and as there are 24 time intervals the one month. In this case the demand prediction

0 0 0 0 0 0
0 0 0 1 10 12
0 0 1 0 30 30
0 0 1 1 40 42

0 1 0 0 50 44
0 1 0 1 60 56
0 1 1 0 80 74
0 1 1 1 90 86

1 0 0 0 100 80
1 0 0 1 110 92
1 0 1 0 130 111
1 0 1 1 140 124

1 1 0 0 150 127
1 1 0 1 160 141
1 1 1 0 180 165
1 1 1 1 190 182

Table 1 : Pump Combinations


403

becomes a very difficult task, becaust: it is no One can see that the optimal, or near optimal,
longer possible to take an average daiy as the solution is found after about 10,000 genera-
only basis for the cost calculation: in addition tions. The cost progression of the average
it is necessary to consider the wcirst day, member is in general ternas quite similar to
which is far less predictable. that of the best member. For this example the
cost of the average population member is, ex-
As well as electricity charges, it is necessary to cept at the very beginning, about 5 % higher
include penalty functions for system constraint than the current optimum. If this difference

27

26

25

24

23

’ 22
t
21

1 10 100 1000 1 O0OCl 100000


number of generations
Figure 1: Evolution of the optimum solution
violations in the cost function. These consist was smaller, it would indicate a lack of di-
of: versity in the later generations. If it was too
unfulfilled demand in each time interval big, the efficiency of the search would de-
due to reservoir levels falling bellow the crease as the search would1 be more or less
specified minimum random. Fox this simple example, the time
maximum reservoir levels exceeded, due taken on a 486DX SOMHz PC was about 20
to excess pumping minutes for 10,000 generations.
not regaining the initial reservoir level at
the end of the 24 hour cycle Results of the optimisatiion for the one-
reservoir system
With this cost function one can now evaluate The best solution shows, as expected, that as
the costs for any possible pump schedule. much of the water as pcissible should be
pumped using the cheap night time tariff. As
Optimisation process shown in Figure 2, the reservoir is conse-
The duty of the genetic algorithm is to find the quently as full as possible at the end of the
solution with the lowest cost which does not cheap period and as empty as allowed at the
violate any of the system constraints. The end of the expensive period. In Figure 3 one
evolution of the solutions through the genera- can see the exact amount which has to be
tions of the genetic algorithm towardls the op- pumped in each time interval in order to
timum is shown in Figure 1 for the average achieve the optimum solution. To make the
population member (population size 2: 40) and influence of this pump schetlule on the reser-
for the best member of each population. Note voir level more visible the demand over the
that the x-axis is logarithmically scaled. day is also shown in Figure 3. Although the
volume pumped during the (day is not so dif-
404

ferent from the volume pumped in the night, Simulation of changes to the system
there is a huge oscillation in the reservoir Apart from the direct advantage of savings in
level. If the reservoir were bigger, the volume energy costs, the availability of an easy to use
pumped during the day would decrease fur- optimal pump scheduling package enables
ther. However in this case, the most efficient changes in the system to be simulated and
pump b u m p 1) is used nearly the whole day examined for efficiency. Critical hardware
so that the water level does not drop too far compofients can be identified, such as the
towards the end of the expensive electricity most frequently used pumps or the reservoirs
tariff period. The less efficient pumps are jus1 that are used for their maximum capacity
used during the night. It must be mentioned ranges. The effect of modifying these compo-
that there are a number of equally good opti- nents, such as replacing a pump with a more
mal solutions, as the pumped volumes speci- efficient unit or enlarging a reservoir can tie
fied for some hours can be switched around examined in a systematic manner to maximise
wi~hou~ affecting costs or vioiating con- benefit. A GA based pump scheduling model
straints. can easily cope with changes in the system
components, as the optimization routines are
5 Conclusions and further ideas largely independent of the structure of the
modelled system.
The question of whether pump scheduling
optimisation with genetic algorithms is supe- Similarly, if the supply network is to be ex-
rior to the other optimisation methods men- tended to meet the demands of new housing or
tioned in chapter one cannot be answered de- industrial development, the GA approach is
finitively at this stage as no formal compari- flexible enough to cope with the system
son has been made. However it is clear that changes, and to help in the identification of
GAS and other evolutionary programming the optimum arrangement for the modified

800 t------
700
t
00
508

400
300

200
100
0 . . . .
0 2 4 6 8 10' 42' 44' 16' 18' 20' 22' 24
time (hours)
Figure 2: Stored volume vs. time

methods can offer a lot of new possibilities for system.


solving these problems, in particular by allow-
ing different constraints and cost factors to l
x On-line Control
considered more easily than with other meth- Although most pump schedules are fixed in
ods. advance, with operators making adjustments
to the schedule as necessary to compensate for
differences between predicted and actual de-
405

200

175

150

125

180

75

50

Figure 3: Hourly pumped volumes and demand

mands, it is likely that on-line control will 2. Michalewicz, Z., Genetic Algorithms +
become increasingly implemented. One impor- Data Structures = Evollution Programs.
tant aspect of the GA approach currently being Springen Verlag, Berlin, Heidelberg, 1992.
investigated is the ability of the GA to adapt to
slightly changed constraint conditioils, e.g.. 3. Goldberg, D.E., Genelic Algorithms in
on-line changes in predicted demand ilnd CUT- Searchi, Optimization and Machine Learning.
rent reservoir levels. Maintaining a family of Addison-Wesley, 1989.
diverse yet near optimal solutions as a starting
point for the evolution may allow rapid iden- 4.Baker, J.E., Adaptive selection methods for
tification of the optimum schedule suilable for genetic algorithms, in J.J. Grefenstette (ed.),
on-line control. Pmceeding of an international conference on
Genetic Algorithms, pp. 101-111, Lawrence
6 References Earlbaurn, 1985.

1. Water Research Centre, Pump Scheduling 5. Press, W.H., Teukolsky, S.A., Vetterling,
in Water Supply, Report TR232, Swindon, W.T., Flannery, B.P. Numerical Recipes in C:
UK, 1985. the art of scientific comlputing. University
Press, Cambridge, 1992.

You might also like