1 Introduction

One of the basic prerequisites for urban, industrial and agricultural development is fresh water availability. Ideally, integrated water resources management should include both the demand and the supply side of water balance and should take into account unfavorable climate change scenarios (e.g., Mani et al. 2016). Regarding water supply only, usually optimal solutions include conjunctive use of surface and groundwater (e.g., Heydari et al. 2016). Nevertheless, it is still useful (and much more convenient) to achieve optimal solutions, investigating separately surface and groundwater resources. Following this path, this paper focuses on optimal management of the latter, which, at the global scale, are more abundant. As many human activities may pollute groundwater reserves (e.g., Staboultzidis et al. 2017), our paper deals with optimal development of aquifers affected by non-conservative pollutants.

The proposed methodology is a combination of an optimization process with a flow and mass transport simulation model, and is presented through application examples to a synthetic, simplified aquifer. In all of them, we take into account one maximization, together with one minimization goal. First, we have studied maximization of the total safe well flowrate, without cost restrictions, in order to calculate an upper flowrate bound for all application examples. Then, we have solved two sets of minimization problems, using either pumping cost or network construction cost as criterion and different values of total safe well flowrate as a constraint in all of them. In this way, we have derived a set of Pareto optimal solutions for each application example.

The synthetic aquifer is considered as confined, infinite and homogeneous. Two injection wells are the pollution sources, while clean water is pumped through three other wells. More details on the application examples are given in section 3. The computational tools and their conjunctive use are briefly outlined in section 2.

2 The Computational Tools

2.1 The Optimization Tool

Genetic algorithms (GAs) can be considered the oldest sister (if not the mother) of nature-inspired, evolutionary optimization techniques. They were initially introduced by Holland (1975) and, since then, they have been used extensively in water resources management problems. Application reviews have been presented by Nicklow et al. (2010), Katsifarakis and Karpouzos (2012), and others.

Essentially, GAs constitute a mathematical imitation of the evolution of species process and the respective terminology is heavily influenced by Biology; solutions of the problem, for instance, are called chromosomes. In binary genetic algorithms, as the ones used in this paper, each chromosome is a binary string. The number of its characters, which are called genes, is usually predetermined.

Genetic algorithms start with a number of chromosomes, usually randomly selected, which constitute the population of the first generation. Then a fitness value is assigned to each of them, using a suitable evaluation function or process, which depends entirely on the examined problem; moreover, it may include penalties, reducing chromosome’s fitness, if the respective solution violates any constraints of the problem. When evaluation of all chromosomes is completed, the next generation is produced, using certain operators, inspired by biological processes. The main genetic operators are: a) selection; b) crossover; and c) mutation, but many others have been also proposed and used.

Production of the new generation is a two-step process. The first one includes selection only and leads to an intermediate population, including, statistically, more copies of the comparatively better chromosomes, at the expense of some of the worst ones. In our code, selection is accomplished by means of the tournament method, which is based on chromosome ranking, according to their fitness. Moreover, we have followed the elitist approach, which separately passes a copy of the best chromosome of each generation to the next one. In the second step, the rest of the operators apply to randomly selected members of the intermediate population. They produce an equal number of new chromosomes, i.e., new solutions, that replace the old ones in the next generation, which is in this way formed. In our code, we have used typical one-point crossover and simple mutation together with antimetathesis, a mutation-like operator, described in Katsifarakis and Karpouzos (2012).

The outlined process, i.e., evaluation-selection-other operators, is repeated until a termination criterion is met, usually a predetermined number of generations. The latter depends on: a) the difficulty of the examined problem, and b) the computational load per chromosome evaluation and the available computer resources. It is anticipated that, at least in the last generation, a chromosome will prevail, which represents, at least a sub-optimal solution of the problem. Identification of different very good solutions is an additional asset of GAs.

In all application examples, discussed in this paper, each chromosome represents a combination of coordinates and flowrates of pumping wells, while the evaluation process includes simulation of groundwater flow and of advective pollutant transport. Inclusion of simulation models in optimization procedures is a common practice in water resources management problems (e.g., Sidiropoulos and Tolikas 2008; Ketabchi and Ataie-Ashtiani 2015).

2.2 Groundwater Flow and Mass Transport Simulation

Simulation of advective pollutant transport (based on calculation of groundwater velocities) is included in the chromosome evaluation procedure, in order to check whether polluted water is pumped by the production wells. If such a case arises, a penalty is imposed, which reduces the chromosome fitness, as discussed in sections 3 and 4. Moreover, hydraulic head level drawdown at the location of production wells is used in the calculation of pumping cost, namely of the chromosome fitness value, in one set of application examples.

As flow and pollutant transport model calculations are repeated for every chromosome of each generation, they affect heavily the total computational volume. For this reason, analytical solutions, and even surrogate models, are used quite often in combination with GAs (e.g., Sreekanth and Datta 2011). It is also known that, at least in preliminary studies, field data are usually restricted, while detailed simulation models produce better results, only if they are fed with accurate and adequate field data. Moreover, in our paper, the emphasis is placed on the optimization procedure. Therefore, we have opted for a rather simple simulation model. We assume steady-state groundwater flow, taking place in a homogeneous, horizontally infinite, confined aquifer. Then, use of the continuity equation, together with Darcy’s law and the superposition principle, leads to the following expressions for the hydraulic head level drawdown s and pore water velocities Vx, Vy at any point (x,y) of the flow field:

$$ \mathrm{s}=-\frac{1}{2\uppi \kern.2em \mathrm{K}\kern.2em {\mathrm{a}}_{\mathrm{a}\mathrm{q}}}\sum_{\mathrm{i}=1}^{\mathrm{NT}}{\mathrm{Q}}_{\mathrm{i}}\kern.3em \ln \frac{\sqrt{{\left(\mathrm{x}-{\mathrm{x}}_{\mathrm{i}}\right)}^2+{\left(\mathrm{y}-{\mathrm{y}}_{\mathrm{i}}\right)}^2}}{\mathrm{R}} $$
(1)
$$ {\mathrm{V}}_{\mathrm{x}}=-\frac{1}{2\uppi \kern.2em \theta \kern.2em {\mathrm{a}}_{\mathrm{a}\mathrm{q}}}\sum_{\mathrm{i}=1}^{\mathrm{NT}}{\mathrm{Q}}_{\mathrm{i}}\frac{\mathrm{x}-{\mathrm{x}}_{\mathrm{i}}}{{\left(\mathrm{x}-{\mathrm{x}}_{\mathrm{i}}\right)}^2+{\left(\mathrm{y}-{\mathrm{y}}_{\mathrm{i}}\right)}^2} $$
(2)
$$ {\mathrm{V}}_{\mathrm{y}}=-\frac{1}{2\uppi \kern.2em \theta \kern.2em {\mathrm{a}}_{\mathrm{a}\mathrm{q}}}\sum_{\mathrm{i}=1}^{\mathrm{NT}}{\mathrm{Q}}_{\mathrm{i}}\frac{\mathrm{y}-{\mathrm{y}}_{\mathrm{i}}}{{\left(\mathrm{x}-{\mathrm{x}}_{\mathrm{i}}\right)}^2+{\left(\mathrm{y}-{\mathrm{y}}_{\mathrm{i}}\right)}^2} $$
(3)

In these equations, K, aaq and θ represent aquifer’s hydraulic conductivity, width and effective porosity, respectively, R is the radius of influence of the system of wells, xi, yi the coordinates of well i, and Qi its flowrate, while NT is the total number of pumping and injection wells.

Moreover, we have used a moving point technique to simulate advective pollutant transport (e.g., Bauser et al. 2012; Matiaki et al. 2016). Points representing polluted water are initially placed at the perimeter of a circle around each injection well. Then, local water velocities Vx and Vy are calculated at the location of each point, by means of Eqs. (2) and (3). The coordinates xin, yin of the new position of each point after a time period ΔΤ, are derived using the following relationships:

$$ {\mathrm{x}}_{\mathrm{in}}={\mathrm{x}}_{\mathrm{io}}+{\mathrm{V}}_{\mathrm{x}}\cdot \Delta \mathrm{T} $$
(4)
$$ {\mathrm{y}}_{\mathrm{in}}={\mathrm{y}}_{\mathrm{io}}+{\mathrm{V}}_{\mathrm{y}}\cdot \Delta \mathrm{T} $$
(5)

where xio, yio are the coordinates of the previous moving point position. These calculations are repeated for a predetermined number of time-steps ΔΤ, covering the period of pollutant deactivation. Their accuracy reduces with the size of ΔT. More technical details are presented in section 3.

3 Application Examples

We consider an “infinite”, confined aquifer, similar to the one studied by Katsifarakis et al. (2009). Its main hydraulic properties are the following: hydraulic conductivity K = 10−4 m/s, width aaq = 50 m and porosity θ = 0.2. The optimization problems, discussed in this paper, have the following basic common features: polluted water is injected to the aquifer through wells B and C, at constant rates 40 and 50 L/s, respectively. Their coordinates are (300, 800) and (800, 400) respectively, while those of the production well A are (300, 0). Two more production wells will be constructed in a predefined area of 1000 × 1000 m, which includes the aforementioned wells A, B and C, as shown in Fig.1. The pollutant is considered as non-conservative, but with a rather large deactivation period, equal to 2 years.

Fig. 1
figure 1

Plan view of the synthetic aquifer

3.1 Maximization of Total Safe Well Flowrate

As a preliminary step, we have studied maximization of the total safe well flowrate, without cost restrictions, in order to find an upper flowrate bound. The problem is similar to one of those studied by Katsifarakis et al. (2009). Each chromosome, namely each solution, represents a combination of the flowrate values Qi of the 3 production wells and of 4 coordinate values, namely abscissas and ordinates of the 2 new wells.

As our goal is maximization of total safe well flowrate, the chromosome fitness value is defined as:

$$ \mathrm{VB}=\sum_{\mathrm{i}=\mathrm{l}}^3{\mathrm{Q}}_{\mathrm{i}}-\mathrm{PEN} $$
(6)

In Eq. (6) well flowrates are expressed in L/s and PEN is a penalty, which is imposed if moving points, which represent polluted water, arrive at a production well in less than 2 years. We have chosen the following form for the term PEN (Katsifarakis et al. 2009):

$$ \mathrm{PEN}=\sum_{\mathrm{j}}\left(100+10\left(\mathrm{TT}1\hbox{-} {\mathrm{Tb}}_{\mathrm{j}}\hbox{-} 1\right)\right) $$
(7)

where TT1 is the total number of time steps (covering the 2-year period) and Tbj is the time step at which the moving point j arrived at a production well. Of course, summation extends to moving points with Tbj < TT1 only. In this way, PEN depends both on the number of the violated constraints (number of moving points arriving at production wells) and the magnitude of the violation, being smaller for late pollutant arrival at the production wells.

Moving points are initially placed at the periphery of a circle around each injection well, whose radius depends on the respective flowrate Qinj and the size of time-step ΔT. It is given as:

$$ {\mathrm{r}}_{\mathrm{inj}}=\sqrt{\frac{{\mathrm{Q}}_{\mathrm{inj}}\cdot \Delta \mathrm{T}}{\theta \kern.2em \uppi \kern.2em {\mathrm{a}}_{\mathrm{a}\mathrm{q}}}} $$
(8)

Then, moving points are tracked until the last time-step or until they arrive at a production well Wp. The respective arrival criteria have been discussed in many papers (e.g., Katsifarakis et al. 1999; Kontos 2013). In this paper, the following criteria have been initially adopted: 1) the distance between moving point P and Wp is smaller than its “capture radius” rw, which is given by a formula similar to Eq. (8), namely it depends on the flowrate of Wp and the size of ΔT; and 2) the location of P at the end of a time-step is closer to Wp than to its previous location and the distance between P and Wp is smaller than 4∙rw. These criteria were efficient for the flow maximization problem studied in this section.

We have executed the optimization-simulation code many times, using the following parameters in the genetic algorithm code: population size PS = 60, number of generations NG = 1500, crossover probability CRP = 0.4, selection constant KK = 3 and mutation/antimetathesis probability MP slightly larger than the inverse of the chromosome length (Kontos and Katsifarakis 2012). Typical best results are shown in Table 1, where index 3 refers to the existing production well A.

Table 1 Typical best results for the maximum total safe flowrate

The obvious pattern in all these solutions is that one new well is placed close to vertex (0,0) and one (with smaller flowrate) close to vertex (1000,1000) of the available area, as shown in Fig.2. It can be concluded that total safe flowrate (without any cost constraint) can slightly exceed 400 L/s.

Fig. 2
figure 2

Typical best solution of the cost-unconstrained, total safe flowrate maximization problem

3.2 Minimization of Pumping Cost for Given Total Safe Well Flowrate

Pumping cost minimization is a very common problem in groundwater resources management (e.g., Dorini et al. 2012; Singh and Panda 2013; Khadem and Afshar 2015; Bauer-Gottwein et al. 2016). In this set of application examples, which has been tackled initially by Etsias (2016), we examine its relationship with safe total flowrate QTot in polluted aquifers. The procedure is the following: we fix the value of QTot, namely we use it as constraint, and we minimize the pumping cost, through finding the most suitable locations of the new wells and the optimal flowrate distribution to all 3 production wells. QTot values from 400 L/s (close to the upper bound of total safe flowrate) down to 50 L/s have been used.

While the chromosome form is exactly the same with that of the previous problem, the evaluation function is given as:

$$ \mathrm{VB}=\mathrm{A}\sum_{\mathrm{i}=1}^3{\mathrm{Q}}_{\mathrm{i}}{\mathrm{s}}_{\mathrm{i}}+\mathrm{PEN} $$
(9)

In Eq. (9), A is a constant, depending on energy cost, while the hydraulic head level drawdown si is calculated by means of Eq. (1), also taking into account the influence of injection wells (NT =5). Then, the first term of the right-hand side of Eq. (9) represents part of the pumping cost which is due to the function of the well system and is subject to minimization. In the following, we call it “variable pumping cost” (VPC). Moreover, we have set A = 1 in our calculations, to avoid messing with monetary units and energy prices.

The term PEN represents a penalty function, which is added to the chromosome’s fitness value, if polluted water arrives at production wells. Initially, we have used the PEN given by Eq. (7), namely the same with the previous problem (section 3.1), but this time added to the cost term. But results have shown that this form of PEN was efficient for medium QTot values only. For QTot = 350 L/s or larger, PEN was too small, compared to the VPC term, to avert pumping of polluted water. In other words, smaller fitness values resulted when production wells were placed rather close to the injection ones, in order to reduce the pumping cost term, despite the penalty. In order to overcome this problem, we increased the value of the coefficients in the penalty function. Our numerical tests have shown that they should be at least 10 times larger than those of Eq. (7), in order to ensure that best solutions correspond to pumping clean water only.

For small QTot, namely for QTot = 50 L/s, another problem has arisen: at least one new production well, with small capture radius rw, was placed too close to the injection ones, namely at distances smaller than the respective rinj (given by Eq. 8). In this way: a) the respective pumping cost tended to zero; and b) no penalty was imposed, since no moving points arrived at the production well, according to the criteria described in section 3.1. In order to overcome this problem, we introduced an additional very large penalty, which was imposed when the distances between any injection and production well was smaller than the respective rinj.

Typical best solutions for QTot values ranging from 400 L/s to 50 L/s are presented in Table 2, where index 3 refers to the existing production well A. Figs. 3a, 4a, 5a, 6a, and 7a summarize best well layouts of 10 runs for selected QTot values, while Figs. 3b, 4b, 5b, 6b and 7b depict the flow paths of the moving points, which correspond to the best solution, achieved for each QTot. Finally, Fig. 8 depicts the respective Pareto front.

Table 2 Typical best solution for each QTot
Fig. 3
figure 3

a Best well layouts (10 runs) for QTot = 400 L/s; b Moving point flow paths for the best solution (QTot = 400 L/s)

Fig. 4
figure 4

a Best well layouts (10 runs) for QTot = 300 L/s; b Moving point flow paths for the best solution (QTot = 300 L/s)

Fig. 5
figure 5

a Best well layouts (10 runs) for QTot = 200 L/s; b Moving point flow paths for the best solution (QTot = 200 L/s)

Fig. 6
figure 6

a Best well layouts (10 runs) for QTot = 100 L/s; b Moving point flow paths for the best solution (QTot = 100 L/s)

Fig. 7
figure 7

a Best well layouts (10 runs) for QTot = 50 L/s; b Moving point flow paths for the best solution (QTot = 50 L/s)

Fig. 8
figure 8

Approximate Pareto front, based on the best solutions found (pumping cost vs QTot)

3.3 Minimization of Pipe Network Construction Cost for Given Total Safe Well Flowrate

In this set of application examples, which has been tackled initially by Stampouli (2016), the goal is to minimize the cost of the pipe network, which connects the production wells to each other and to a water tank, whose coordinates are xT = 1000, yT = 500. In each example, we fix the value of QTot, namely we use it as constraint.

The chromosome form is the same with that of the previous problem, since the length of the pipe network is based on the location of the new wells, while flowrates of all production wells are essential to check whether they are affected by pollutants and to define the respective penalty value. As the network cost can be considered proportional to its length, the evaluation function has the following form:

$$ \mathrm{VB}=\sum_{\mathrm{i}=\mathrm{l}}^3{\mathrm{L}}_{\mathrm{i}}+\mathrm{PEN} $$
(10)

where Li is the length of the pipe that carries water away from well i, and PEN is a penalty, initially in the form of Eq. (7), which is added to the chromosome’s fitness value, if polluted water arrives at production wells.

A subroutine that produces the shortest tree-type network has been incorporated to the evaluation process. Since the coordinates of the tank and well A are given, the lowest possible network length is equal to their distance, namely to 860.2 m.

As in the previous set of examples, we sought best (namely shortest pipe network length) solutions for QTot values ranging from 400 L/s to 50 L/s. Careful inspection of the results, though, revealed that for QTot smaller than 200 L/s, pollution of a small flow-rate well may not be detected, as it may be bypassed by the moving points. Such a case is shown in Fig. 9; QTot is equal to 150 L/s, while the flowrate of the bypassed well is equal to 5.71 L/s, resulting in a very small capture radius. This flaw had been also detected by Stampouli (2016).

Fig. 9
figure 9

Moving points bypassing a small flowrate well

To correct this flaw, we have added the following check in the penalty imposing procedure: in each time-step, we examine whether any production well lies inside the closed polygons, representing the polluted areas. To achieve this, we have used a simple technique, described by Katsifarakis and Latinopoulos (1995). It is based on the following idea: suppose that a point J lies inside a polygon with m sides. Then, the sum ST of the areas of the m triangles, having as one vertex point J and as side opposite to it one side of the polygon, is equal to the area Ap of that polygon. If, on the contrary, J lies outside of the polygon, then ST exceeds Ap. Calculation of triangle areas is conveniently achieved using Heron’s formula.

Typical correct best solutions for QTot values ranging from 400 L/s to 50 L/s are presented in Table 3, where index 3 refers to the existing production well A. Figures 10a, 11a, 12a, 13a and 14a depict the flow paths of the moving points, while Figs. 10b, 11b, 12b, 13b and 14b depict the respective shortest pipe networks, for selected QTot values. In all of them, the water tank appears as a small square. Finally, Fig. 15 depicts the respective approximate Pareto front.

Table 3 Typical best solution for each QTot
Fig. 10
figure 10

a Moving point flow paths for the best solution (QTot = 400 L/s); b Pipe network for the best solution (QTot = 400 L/s)

Fig. 11
figure 11

a Moving point flow paths for the best solution (QTot = 300 L/s); b Pipe network for the best solution (QTot = 300 L/s)

Fig. 12
figure 12

a Moving point flow paths for the best solution (QTot = 200 L/s); b Pipe network for the best solution (QTot = 200 L/s)

Fig. 13
figure 13

a Moving point flow paths for the best solution (QTot = 100 L/s); b Pipe network for the best solution (QTot = 100 L/s)

Fig. 14
figure 14

a Moving point flow paths for the best solution (QTot = 50 L/s); b Pipe network for the best solution (QTot = 50 L/s)

Fig. 15
figure 15

Approximate Pareto front, based on the best solutions found (pipe network cost vs QTot)

It can be observed that for small QTot values, e.g., QTot = 50 L/s, the additional wells are placed on the straight-line segment that connects existing well A with the water tank. In this way, the lowest possible network length is achieved, namely 860.2 m. For QTot = 100 L/s, both additional wells are placed next to well A, but further from the water tank. For larger QTot values though, one well has to be placed far away from the other two.

4 Discussion and Conclusions

This paper focuses on optimal management of aquifers affected by non-conservative pollutants. Moreover, optimization aims simultaneously at one maximization and one minimization goal. This approach leads essentially to construction of Pareto fronts of best solutions.

The optimization targets are among the most common in groundwater resources management problems. Maximization of total safe well flowrate QTot from a system of wells has been combined with minimization of cost, required either for pumping or for construction of the pipe network that connects production wells with a central water tank.

To solve the combined minimization-maximization problem, we use the required QTot value as a constraint and we search for the combination of production well coordinates and flowrate values that minimizes the investigated cost item. Using different QTot values, we come up with the set of Pareto optimal solutions.

To find solutions that minimize cost, one has to solve the groundwater flow and pollutant transport problem, in order to check the observance of the physical constraint, namely that the production wells pump clean water only. This requirement does not allow linearization of the optimization problem; moreover, it restricts the domain of feasible solutions.

To deal with a rather difficult optimization problem, we have selected the method of genetic algorithms. In order to avoid any compromise in the optimization process, namely in order to allow for sufficiently large values for the population size and the number of generations, we have used a rather simple flow and mass transport simulation model in the application examples. Regarding groundwater flow, we considered infinite confined aquifers. The proposed combined simulation-optimization tool can be applied with equal efficiency to semi-infinite aquifers, to which the method of images applies. Moreover, regional flow independent of the investigated system of wells can be incorporated, as well. In principle, numerical flow simulation models can also be used, provided that the available computer resources can handle the computational volume, without compromising the optimization process.

Regarding pollutant transport, we have taken explicitly into account advective transport only, since more detailed mathematical description (e.g., Anders and Chrysikopoulos 2005) would result in huge increase of the computational volume. In our approach, gradual pollutant inactivation is taken into account implicitly, through the penalty function, which decreases with the time required for pollutant arrival to production wells. Increase of pollutant deactivation time is probably the simplest way to create a safety margin, compensating for omission of dispersive mass transport. Karamagiola and Katsifarakis (2007) have presented a computationally efficient approximation, combining a particle tracking code with the one-dimensional solution of Ogata and Banks (1961). Their approach requires further investigation, though.

An interesting computational issue, that has arisen in both sets of application examples, is the efficiency of the penalty function (PEN), used to guarantee pumping of non-polluted water. Our initial choice was to adopt a function consisting of two terms, one constant and one proportional to the constraint violation, namely decreasing with the time required for pollutant arrival to production wells. This function had been used with success by Katsifarakis et al. (2009) for the simple QTot maximization problem. Nevertheless, it was not efficient in the optimization problems studied in this paper. In the pumping cost minimization problem, it failed to avert pumping of polluted water, when QTot exceeded a certain value. In order to guarantee the observance of the constraint, we had to multiply the coefficients of both the constant and the variable term by a factor of 10. PEN failed also with QTot values below a certain value. In this case, it could not avert placing a production well too close to an injection one, namely inside the circle defined by the initial locations of the moving points. To overcome this flaw, we have introduced a very large additional penalty, as discussed in section 3.2.

PEN failures for average and small QTot values appeared also when we studied minimization of pipe network construction cost. This time, moving points bypassed production wells with small capture radii and pollution of the latter remained unnoticed. In order to overcome this weakness, we have added one more check, described in section 3.3. The proposed amendments of the penalty function may be useful in more problems, related to optimal management of polluted aquifers.

Comparing the results of the two sets of examples, it can be concluded that the optimal well layouts are rather similar for large QTot values, but they are quite different for small ones. Finally, results of both application examples, and in particular the respective Pareto fronts, can serve as guidelines for further research on the variation of maximum safe flowrate with pumping cost and pipe network construction cost.