*3.3. Constraints*

The pressure drop should ensure that the pressure at the outlet point will be positive. This constraint is easily set by defining that the objective function is infinity if the outlet pressure is negative.

The bounded constraint also affects the optimization results. Based on typical available data, the physically meaningful ranges, the manufacturing problem, operating properties, etc., the decision variables are usually bounded on a finite range:

$$\mathbf{x}\_{l} \le \mathbf{x} \le \mathbf{x}\_{u} \tag{35}$$

where **x** is the vector of decision variables **x** = (*P*i, *Q*, *w*, *h*), subscript *l* and *u* indicate the lower and upper bound.

The system parameters and variables are summarized in Table 2.


**Table 2.** System parameters and variables.

## *3.4. Optimization by Genetic Algorithm*

Genetic algorithms (GA), a class of evolutionary algorithms (EA), are adaptive heuristic search algorithms inspired by the evolutionary ideas of natural selection and genetics. The genetic algorithms start with arbitrarily picked parent chromosomes from the search space, each representing a candidate solution, to form an initial population. The fitness of each individual is indicated by the value of the objective function. The population of individual solutions is repeatedly modified in an analogous way to processes happening in nature, such as selection, reproduction by cross-over, and mutation. Over successive generations, the population evolves, and the optimal solution might be achieved by the principles of "survival of the fittest". More detailed discussions of the genetic algorithm can be found elsewhere, such as in [26].

In this study, the parameters of GA, population size, crossover probability, mutation probability values, were set to be, 100, 1.0, and 0.30, respectively. The selection was based on roulette wheel selection with elitism, which means that the best individual always survives to the next generation. The number of generations was 500. Due to the minimization of the annual total cost, the fitness function was defined as:

$$fitness = \begin{cases} 0, & \text{if the annual total cost} > 5 \times 10^5\\ 5 \times 10^5 - \text{annual total cost}, & \text{otherwise} \end{cases} \tag{36}$$
