COMBINING GENETIC ALGORITHMS AND BOUNDARY

advertisement
MINIMIZATION OF PUMPING COST IN ZONED AQUIFERS
BY MEANS OF GENETIC ALGORITHMS
K. L. Katsifarakis1 and D. K. Karpouzos2
Division of Hydraulics and Environmental Engineering,
Dept. of Civil Engineering, A.U.Th,
GR- 54006 Thessaloniki, Macedonia, Greece
E-mail: klkats@civil.auth.gr1, dimkarp@civil.auth.gr2
ABSTRACT
Minimization of groundwater pumping cost, through proper distribution of the total flow rate to a
number of existing wells, is a common problem in groundwater resources management. This paper
deals in particular, with aquifers that bear zones of different transmissivities. A boundary element
code is used for the numerical solution of the flow problem, i.e. calculation of water level drawdown
at each well, which enter the cost function. This code has been integrated with a genetic algorithm,
which is used as optimization tool. Constraints include the sum of well flow rates and limits to
hydraulic head drawdown at the wells. Application of the proposed method to an aquifer with 4
zones of different transmissivities concludes the paper.
ΕΛΑΧΙΣΤΟΠΟΙΗΣΗ ΚΟΣΤΟΥΣ ΑΝΤΛΗΣΗΣ ΣΕ ΑΝΟΜΟΓΕΝΕΙΣ
ΥΔΡΟΦΟΡΕΙΣ ΜΕ ΧΡΗΣΗ ΓΕΝΕΤΙΚΩΝ ΑΛΓΟΡΙΘΜΩΝ
K. Λ. Kατσιφαράκης1 και Δ. K. Kαρπούζος2
Τομέας Υδραυλικής και Τεχνικής Περιβάλλοντος,
Τμήμα Πολιτικών Μηχανικών Α.Π.Θ.,
GR-54006 Θεσσαλονίκη
E-mail: klkats@civil.auth.gr1, dimkarp@civil.auth.gr2
ΠΕΡΙΛΗΨΗ
Η ελαχιστοποίηση του κόστους άντλησης υπόγειου νερού, με κατάλληλη κατανομή της
απαιτούμενης παροχής σε προϋπάρχοντα πηγάδια, είναι ένα κοινό πρόβλημα διαχείρισης υδατικών
πόρων. Στην εργασία αυτή εξετάζεται ειδικά η περίπτωση άντλησης από υδροφορείς, οι οποίοι
χωρίζονται σε ζώνες με διαφορετική μεταφορικότητα. O υπολογισμός της πτώσης στάθμης σε κάθε
πηγάδι, που υπεισέρχεται στη συνάρτηση κόστους, γίνεται με τη μέθοδο των οριακών στοιχείων. Ο
αντίστοιχος κώδικας ενσωματώνεται σε έναν γενετικό αλγόριθμο, που χρησιμοποιείται ως εργαλείο
βελτιστοποίησης. Οι περιορισμοί του προβλήματος αφορούν στο άθροισμα των παροχών και σε
όρια της πτώσης στάθμης. Η προτεινόμενη μέθοδος εφαρμόζεται ενδεικτικά σε υδροφορέα με 4
ζώνες διαφορετικής μεταφορικότητας.
1. INTRODUCTION
Minimization of groundwater pumping cost, through proper distribution of the total flow rate to a
number of existing wells, is a problem that arises quite often in groundwater resources management.
From the environmental point of view, though, it is a problem of minimization of energy
consumption and of the respective environmental impact.
From the mathematical point of view, it is a typical optimization problem, and typical optimization
techniques, e.g. linear and non-linear programming, have been used for its solution. The objective
function, which should be minimized, is:
N
F  C   H i Qi
(1)
i 1
where C is a constant and N is the number of the wells, while Qi and Hi are the flow rate and the
distance between ground level and water level at well i, respectively. The basic constraint is that the
sum of the well flow rates be equal to the water demand Qd, which is known a priori. Additional
constraints may include upper bounds of water level drawdowns at the wells or at protected areas of
the flow field.
The optimization tools are combined with groundwater flow simulation codes, which calculate si,
i.e. water level drawdowns at the wells. The latter enter the cost function through the respective Hi.
In most cases, finite elements or finite differences have been used as flow simulation tools.
In this paper, pumping cost minimization in zoned aquifers is investigated. The optimization tool is
based on genetic algorithms, while a boundary element code is used in groundwater flow
calculations. Genetic algorithms have been recently applied to groundwater flow problems (e.g.
McKinney and Min-Der Lin [1], Wagner [2], El Harrouni, Ouazar & Cheng [3]). Boundary
elements, on the other hand, have been used very efficiently for groundwater flow simulation in
zoned aquifers (e.g. Latinopoulos and Katsifarakis [4], Katsifarakis, Andreatos and Vournelis [5]).
The two techniques have been combined to calculate transmissivities in zoned aquifers, based on a
restricted number of field measurements (Karpouzos & Katsifarakis [6]).
Genetic algorithms and boundary elements are briefly outlined in the following paragraphs. Then
their use in minimizing pumping cost is illustrated, through application to an aquifer consisting of
four zones of different transmissivities.
2. THE OPTIMIZATION TOOL
Genetic algorithms are a mathematical tool, which can be used in many scientific fields (from
biology to machine learning). They are particularly efficient in optimization problems, especially
when the respective objective functions exhibit many local optima or discontinuous derivatives.
There are already extensive books, e.g. Goldberg [7] and Michalewicz [8], which deal with the
theoretical background, the computational details and applications of genetic algorithms. Their main
features are the following.
Genetic algorithms are essentially a mathematical imitation of a biological process, namely that of
evolution of species. They start with a number of random, potential solutions of the problem. These
solutions, which are called chromosomes, constitute the population of the first generation. In binary
genetic algorithms, each chromosome is a binary string of predetermined length.
Each chromosome of the first generation undergoes evaluation, by means of a pertinent function or
process. This process depends entirely on the specific application of genetic algorithms. Then, the
second generation is produced, by means of certain operators, which imitate biological processes
and apply to the chromosomes of the first generation. The main genetic operators are: a) selection b)
crossover and c) mutation. Many other operators have been also proposed and used.
Selection is used first. It leads to an intermediate population, in which better chromosomes have,
statistically, more copies. These copies substitute some of the worst chromosomes. Then, the other
operators apply to a number of randomly selected members of this intermediate population. The
result is an equal number of new chromosomes, i.e. new solutions, which replace the old ones. Thus,
the next generation is formed.
The whole process, i.e. evaluation-selection-crossover-mutation-other operators, is repeated for a
predetermined number of generations. It is anticipated that, at least in the last generation, a
chromosome will prevail, which represents the optimal (or at least a very good) solution of the
examined problem.
The genetic operators, which have been used in this problem, i.e. to accomplish minimization of
pumping cost in zoned aquifers, are outlined in the following paragraphs.
2.1 Selection
Selection can be accomplished in many ways. The most common processes are: a) The biased
roulette wheel and b) The tournament method. The latter has been preferred, because it applies
equally well to maximization and to minimization problems, while the former applies naturally to
maximization problems only.
Selection through the tournament method starts with determination of the respective constant KK.
Then it proceeds in the following way: KK chromosomes are randomly selected from the population
of the current generation, and their fitness values are compared to each other. The chromosome with
the best (largest or smallest) fitness value passes to the intermediate population. This process is
repeated PS times, PS being the population size. In this way, the intermediate population is formed.
Moreover, in our genetic code, the best chromosome of each generation is separately preserved
through the selection process.
2.2 Crossover
Crossover applies to pairs of chromosomes, which are binary strings of length SL. Two
chromosomes, which are named parents, are randomly selected from the intermediate population.
An integer number XX, between 0 and (SL-1), is randomly selected, too. Then each parent binary
string is cut to 2 pieces, immediately after position XX. The first piece of each parent is combined
with the second piece of the other. In this way, two new chromosomes are formed, which are called
offspring and substitute their parents in the next generation. The process is illustrated in figure 1, in
which XX=10, i.e. separation of parent chromosomes takes place after the 10th position (gene).
Parent A:
Parent B:
Offspring A:
Offspring B:
1000101110|10011100
0101101100|10101011
100010111010101011
010110110010011100
Figure 1. Crossover after the 10th gene (position of the binary string)
Crossover aims at combining the best features of both parents to one offspring. All chromosomes of
the intermediate population have equal probability to undergo crossover. But this probability is
actually larger for the better chromosomes of the parent generation, because they have got more
copies in the intermediate population.
2.3 Mutation
Mutation applies to characters (genes), which form the chromosomes. In binary genetic algorithms,
the gene, which is selected for mutation, is changed from 0 to 1 and vice versa. This process aims: a)
To extend search to more areas of the solution space (mainly in the first generations) and b) To help
local refinement of good solutions (mainly in the last generations). Mutation probability is equal for
all genes of all chromosomes. Its magnitude depends on the chromosome length SL, but generally it
is much smaller than the respective crossover probability, because the latter refers to chromosomes,
not to genes.
2.4 Antimetathesis
Many additional operators have been proposed in the literature, to further improve performance of
genetic algorithms. A number of them are problem specific, while others are of general use. In this
paper, one more operator, of general use, has been introduced. The operator applies to pairs of
successive positions (genes) of a chromosome. Any position (except for the last one) can be
selected, with equal probability pa. If the value of the selected gene equals to 1, it is set to 0, while
that of the following gene is set to 1. The opposite happens if the value of the selected gene is 0.
More explicitly, the following happen, with regard to gene pairs:
11 becomes 01 * 00 becomes 10 * 10 becomes 01 * 01 becomes 10
In the first 2 cases, the new operator is equivalent to mutation at the selected position. In the last 2
though, it is equivalent to mutation of both genes. Morover, it can be interpreted as a limiting case of
the inversion operator. A name that describes exactly the function of the new operator, in the last 2
cases, is antimetathesis. This name is in line with the tradition in genetic algorithm terminology,
which calls for terms of greek origin.
Antimetathesis and mutation are used alternatively (in the even and odd generations respectively).
2.5 Handling constraints
The usual way to deal with constraints, is to include penalty functions in the evaluation process.
Each penalty function affects the fitness value of chromosomes, which violate the respective
constraint, increasing it in minimization problems and decreasing it in maximization ones. In this
paper, such a penalty function is introduced to deal with constraints on the hydraulic head
drawdown. The constraint on the sum of well flow rates is bypassed by using a multiplication factor,
as explained in subsequent paragraphs.
3. GROUNDWATER FLOW SIMULATION
Groundwater flow simulation is necessary, in order to calculate the values of hydraulic head
drawdown. The boundary element method is used in this task. This method is very efficient in
solving steady-state groundwater flow problems. It is based on the second Green’s formula for
transformation of surface to line integrals. Its main feature is that it does not require grid
construction over the field area, since it is based on discretization of external and internal field
boundaries. These boundaries are divided to pieces, which are called boundary elements.
Calculations are performed in two stages. First, the values of hydraulic head φ and its vertical
derivative q = φ/n are calculated for each boundary element. Then φ is calculated separately for
each internal point of the flow field. This is a very important advantage for our application, since φ
values have to be calculated in very few internal points (e.g. at the wells only). Another, even more
important, advantage is that areas of wells are described very accurately as concentrated “loads”, i.e.
without distributing well flow rates to grid elements.
A boundary element code, extensively tested in other applications (e.g. [5], [6]), has been used. It is
based on constant boundary elements and its accuracy is satisfactory [4]. To be incorporated in the
genetic algorithm, the code has been divided in two parts. The first, which includes data input and
some preliminary calculations, is executed only once. The second (and main) part has to be executed
for every chromosome of every generation, since it is the main part of chromosome evaluation
procedure.
4. APPLICATION EXAMPLE
The proposed method of pumping cost minimization, has been applied to the aquifer of figure 2.
This aquifer bears 4 zones of different transmissivities, while its external boundary consists of 2
constant head parts (namely ΑΒΓ and ΖΗΘ) and two impermeable parts (namely ΓΔΕΖ and ΘΙΑ).
Hydraulic head φ on ΑΒΓ equals 0, while on ΖΗΘ φ=10m. Transmissivity of zones 1 to 4 have the
following values:
T1 = 0.001m2/s * T2 = 0.0001m2/s * T3 = 0.002m2/s * T4 = 0.0001m2/s *
Nine wells are available to pump a total groundwater flow rate of 300 l/s. Three of them are located
in zone 1, one in zone 2, three in zone 3 and two in zone 4. Ground elevations (Elev) at the locations
of the wells, with reference to φ=0 plane, appear in table 1, together with the respective coordinates.
TABLE 1. Coordinates and ground elevations at the locations of the wells
well
1
4
7
xi
400
1450
900
yi
300
1000
1500
Elevi
5
10
40
well
2
5
8
xi
900
900
200
yi
300
900
1000
Elevi
5
30
10
well
3
6
9
xi
1400
900
250
yi
300
1200
1500
Elevi
5
35
15
It has been mentioned in the introduction that the pumping cost can be expressed as:
N
F  C   H i Qi
(1)
i 1
where Hi can be written as
Hi =Elevi - φi
(2)
In order to implement the genetic algorithm, which has been outlined in previous paragraphs, the
following set of parameters has been selected: population size = 30, crossover probability = 0.30,
mutation/antimetathesis probability = 0.01, number of generations = 52, selection constant KK =3,
chromosome length SL= 72.
The chromosome length has been determined in the following way: Each chromosome represents a
set of well flow rate values Qi, expressed as a binary number. To allow for 70% of the total flow rate
(i.e. for 210 l/s) to be pumped from a single well, 8 genes are needed for each Qi. Thus, for 9 wells,
SL =72.
Φ = 10
Η (600,2000)
Θ (0,2000)
Q9
(250,1500)
Ζ (1100,2000)
Q7
(900,1500)
T4 = 0.0001
T3 = 0.002
T2 =0.0001
Ε (1800,1300)
Q6
(900,1200)
Q8
(200,1000)
Ι (0,600)
Q4
(1450,1000)
Q5
(900,900)
Λ (400,600)
Κ (1100,600)
Δ (1800,600)
T1 = 0.001
Q1
(400,300)
Q2
(900,300)
Q3
(1400,300) Δ (1800,600)
Α (0,250)
Β (500,0)
Φ=0
Γ (1800,0)
Figure 2. Laterally confined aquifer with 4 zones of different transmissivities
4.1 Handling the main constraint
Attributing 8 genes (digits) to each Qi means that it may vary from 0 to 255. Therefore SQ, i.e. the
sum of the 9 Qi may vary from 0 to 2295. According to the main constraint, though, SQ should be
equal to Qd = 300. To fulfill the constraint, each Qi is multiplied by the factor Qd/SQ. In this way,
proportions between well flow rates are preserved.
4.2 The evaluation procedure
The evaluation procedure for each chromosome includes the following steps:
a) Calculation of the hydraulic head φi at the location of each well, using the respective set of
adjusted well flow rate values. b) Calculation of the fitness value VB.
In the first step, the boundary element method is used, as explained in previous paragraphs.
Boundary discretization is shown in figure 2. The outer boundary of the flow field has been divided
in 22 elements, while the interface between zones of different transmissivities in 16 elements.
In the second step, Hi for each well is calculated, by means of equation 2. Then the fitness value is
calculated directly from equation 1 (in which the constant C has been set to 1). The fitness of each
chromosome increases, as the value of VB decreases.
4.3 Typical results
Results of 10 runs appear in table 2. It includes the fitness value VB of the best chromosome and the
respective 9 well flow rates. It can be seen that all runs end up with similar flow rate distribution
patterns.
TABLE 2. Best chromosome’s fitness value and respective well flow rates (l/s)
VB
27.261
27.249
27.247
27.248
27.265
27.251
27.251
27.252
27.253
27.254
Q1
56.19
56.88
52.72
57.70
60.88
57.72
57.20
57.00
56.67
55.97
Q2
51.83
49.46
49.32
50.66
49.90
50.36
50.43
49.13
51.05
50.35
Q3
52.75
53.67
53.39
53.24
54.29
54.39
54.63
53.42
54.20
54.57
Q4
2.98
3.22
3.25
3.75
3.14
3.80
3.27
3.82
3.60
3.04
Q5
40.83
36.60
39.02
37.06
34.83
37.53
37.59
39.59
40.03
41.22
Q6
34.40
36.60
37.13
35.89
35.46
36.82
35.02
35.06
34.41
34.66
Q7
52.98
55.89
53.39
54.42
54.29
52.49
53.93
54.37
53.30
53.16
Q8
3.67
3.46
2.98
3.28
3.14
3.09
3.27
3.58
3.15
3.04
Q9
4.36
4.20
3.79
3.99
4.08
3.80
4.67
4.05
3.60
3.98
4.5 Introduction of additional constraints
In many cases of practical interest, it is required to keep Hi at the wells smaller than a certain value.
Such a constraint can be taken into account, by incorporating a penalty function to the evaluation
process. In this way, solutions that violate the constraint are not rejected, but their fitness decreases.
As an example, the constraint
Hi < 90
(3)
has been added to the previous problem. To take it into account, the quantity
PEN = 100(Hi – 90)2
(4)
is added to Hi, if it is larger than 90m. Results of a typical run, together with the respective values of
Hi, appear in rows 2 and 3 of table 3. In the last 2 rows of the same table, typical results, which have
been obtained without the constraint, are presented for comparison purposes.
It can be seen that, as a result of the constraint, the largest Hi value decreased drastically, from
99.36m to 91.96m. But it can also be seen, that it is impossible to render all H i smaller than 90m,
without reducing the total well flow rate Qd.
TABLE 3. Well flow rates (l/s) and respective values of Hi (m)
Well
1
2
3
4
5
6
Qi
62.93
55.75
58.79
3.59
34.50
31.19
Hi
91.41
91.50
91.78
90.16
91.49
91.77
Qi
52.72
49.32
53.39
3.25
39.02
37.13
Hi
79.06
83.87
84.84
87.25
96.52
98.54
7
45.54
91.96
53.39
99.36
8
3.59
88.26
2.98
81.81
9
4.14
87.97
3.79
84.99
4.6 Computer time requirement
The time required to run the respective program is comparatively large (20 to 30 minutes on a
Pentium at 133 MHz). This is due to the repetitive use of the boundary element code.
5. FINAL REMARKS
The combination of genetic algorithms and boundary elements, which has been described, offers an
attractive and dependable alternative to classical optimization techniques in the field of groundwater
hydraulics. Genetic algorithms in particular, which are based on simple mathematics, can be easily
adapted to each specific problem.
Its relative drawback, i.e. comparatively large computer time requirement, is offset by simplicity of
input data preparation, which saves a lot of time for the user.
REFERENCES
1. McKinney D.C. and Min-Der Lin (1994) “Genetic algorithm solution of groundwater
management models”, Water Resources Research, Vol. 30(6), pp. 1897-1906.
2. Wagner B. J. (1995) “Sampling design methods for groundwater modeling under uncertainty”,
Water Resources Research, Vol. 31(10), pp. 2581-2591.
3. El Harrouni K., D. Ouazar & A.H.-D Cheng (1996) “Boundary and parameter identification
using genetic algorithms and boundary element method”, Proc. Int. Conf. Computer Methods
and Water resources III (eds. Y. Abousleiman, C.A. Brebbia, A.H.-D. Cheng & D. Ouazar)
pp. 487-495, Beirut, Lebanon, 1995.
4. Latinopoulos P. and K. Katsifarakis (1991) “A boundary element and particle tracking model for
advective transport in zoned aquifers”, J. of Hydrology, Vol. 124(1-2), pp. 159-176.
5. Katsifarakis K.L., N. Andreatos and E. Vournelis (1996) “Application of boundary element
techniques to flows through aquifers with zones of irregular shape”, Proc. Int. Conf. Computer
Methods and Water resources III (eds. Y. Abousleiman, C.A. Brebbia, A.H.-D. Cheng & D.
Ouazar) pp. 109-116, Beirut, Lebanon, 1995.
6. Karpouzos D. K. and K. L. Katsifarakis (1997) “Combined use of genetic algorithms and
boundary elements to calculate zoned aquifer transmissivities”, Proc. 7th Panhellenic Conf. of
the Greek Hydrotechnic Association, pp. 245-252, Patras, Greece, 1997.
7. Goldberg D. E. (1989) Genetic algorithms in search, optimization and machine learning
Reading, Massachusetts: Addison-Wesley publishing company.
8. Michalewicz Z. (1994) Genetic algorithms + Data structures = Evolution programs (2nd ed.),
Springer-Verlag.
Download