# Pipeline Optimization for an Economical Microsprinkler Irrigation System Based on a Hybrid Genetic Algorithm

Authors: Ying Liu
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

The pipeline combination scheme is optimized to reduce the cost of irrigation units in an economical microsprinkler system. With the standard number of segments of branch and capillary pipes as the decision variables, the lowest pipe cost per unit irrigation area as the objective function, the maximum pressure difference allowed in the system, the minimum number of pipes in the network, and the shape of the irrigation area as constraints, a hybrid genetic algorithm is used to calculate the minimum cost per unit area of the pipe and the corresponding optimal combination of pipelines. The results show that when the irrigation area is a rectangular plot of 30 m × 22 m, the lowest cost of pipeline per unit area, 5192.7 RMB/hm2, is achieved when the capillary pipes are laid bidirectionally along the length of the plot. The cost of bidirectional laying of capillary pipes is less than that of unidirectional laying, and the cost of capillary pipe laid along the length direction of the plot saves 2.3% compared with that of capillary pipe laid along the width direction of the plot. The most extended length of capillary pipe on one side is 103.65 m. Compared with the cost obtained by farmers based on experience, the pipeline cost per hectare was 1.04%∼13.6% lower. It is recommended that farmers lay capillary pipes bidirectionally along the length of the plot and choose branch pipes with smaller diameters to help reduce the cost of the pipe unit area of the irrigation system.


---

## Body

## 1. Introduction

So far, economical microsprinkler irrigation in Zhejiang Province covers an area of nearly 10,000 hectares, which is popular among farmers because the cost of economical microsprinkler irrigation facilities is less than half of the conventional one, and the water-saving rate reaches 31% [1, 2]. A microsprinkler irrigation system uses new materials and methods to significantly reduce the cost compared with traditional irrigation systems. The pipeline accounts for about 60% of the total cost of a microsprinkler irrigation system. Hence, to optimize the pipeline network design is of great significance. This study investigates the smallest component of the pipeline network and the microsprinkler irrigation unit, including a branch pipe and its connected capillary pipes; the optimal combination of branch and capillary pipes under the conditions of the uniform irrigation and the system pressure difference is studied.Current studies on optimal pipeline design focus on the distribution ratio of the pressure difference [3–6], optimized length and diameter of branch and capillary pipes [7–10], and location of branch and capillary pipes [11–13]. Keller et al. [3] proposed 45 : 55 as the optimal distribution ratio of the pressure difference in branch and capillary pipes, but there has been no definite conclusion, and the optimal ratio varies with the pipeline layout. Jiankang and Xuemin [5], and Zhixin et al. [6] derived the formula for the optimal distribution ratio of the pressure difference between the branch and the capillary pipe when the ground is on a flat slope and a uniform slope, respectively, with the objective function of minimizing the pipeline cost. Still, the results obtained often deviate from the optimal solution due to the constraints of the pipe diameter, etc. Some researchers calculated the pressure difference of the whole system but did not consider the ratio of the pressure difference in branch and capillary pipes [14]. When calculating the pipeline cost, the optimal values for different pipe diameters were calculated, from which the global optimum was determined. This method is not conducive to obtaining the optimum solution. In fact, the operating cost of pipelines involves many factors, including water consumption and the cost of the pipeline, construction, and energy [15–17]. Water consumption is related to the crop type and climate; construction and energy cost are time-sensitive and regional; and the crop harvest is related to factors such as the type of crop, planting method, and market. These costs cannot be directly measured; hence, we focus on optimizing the pipeline cost. Therefore, the previous studies by Ying et al. [18], Yuannong and Feng [14], Ma et al. [15], etc., were designed to optimize the pipe design when there is no maximum irrigation area constraint. However, with the promotion of economical microsprinkler irrigation, “unit miniaturization” is the main feature, so the above assumptions are no longer valid.The genetic algorithm (GA) is a derivative-free method that tries to minimize the fitness function at a finite number of individuals at each iteration and determine an optimal solution without giving any derivative information. These optimization techniques can be applied for solving optimization problems in which analytical derivatives can be calculated or the fitness function is found to be nonsmooth [19, 20]. The GA provides a general framework for solving complex system problems, and is widely used in many scientific fields because it does not depend on the specific domain of the problem, is robust to the type of problem, and has the ability of fast global search. In this paper, the pressure difference between branch and capillary pipes is studied to optimize the pipe network arrangement of field irrigation units with fixed irrigation areas, which is an integer programming model with nonlinear constraints and is discrete, so the derivative-free optimizer is applicable to this model. Yuannong and Feng [14] and Ma et al. [15] applied the GA to an irrigation pipe network design and obtained good results. In this paper, based on the “superiority and inferiority” mechanism of the classical GA, we introduce the retention strategy of the nonoptimal solution of the simulated annealing algorithm (SA) so that the evolved subpopulation and the potentially superior individuals in its neighborhood can be combined again, which not only further enhances the local search ability of the algorithm, but also maintains the strong global search characteristics of the GA itself, i.e., the hybrid genetic algorithm (HGA) improved by the SA. Simulation experiments show that the HGA achieves more satisfactory optimization than the classical GA.


## 2. Pipeline Network Modeling of Irrigation Unit

### 2.1. Model Overview

It is assumed that the branch and capillary pipes in the entire irrigation unit form a regular rectangular shape. Schematic diagrams of one-way and two-way laying of capillary pipes are shown in Figures1(a) and 1(b), respectively. The capillary pipes are distributed evenly along the branch pipe; the spacing is the branch pipe’s standard segment length and is determined by the spacing of crops. The irrigators are distributed evenly on the capillary pipes; their spacing is the capillary pipe’s standard segment length, as determined by the crop type, planting form, and geological and topographical soil conditions. Thus, the total length of various branch and capillary pipes is the product of their standard segment lengths and the number of those segments. The optimization problem in this study is converted to that of determining the optimal numbers of segments of branch and capillary pipes. The irrigation unit and the flow in the pipeline are shown in Figure 1, where the capillary pipes are laid in one direction. When the capillary pipes are laid bidirectionally, the layout is similar except that the flow on the branch pipe includes the flow of capillary pipes on the other side. Based on the above description, the number of segments of branch and capillary pipes is selected as the decision variable, and the cost optimization model without limiting the irrigation area is established for both unidirectional and bidirectional capillary pipe-laying methods.Figure 1
Schematic diagrams of bidirectional and unidirectional laying of capillary pipes. (a) Bidirectional laying of capillary pipes and (b) unidirectional laying of capillary pipes.
(a)(b)The method to minimize the cost of economical microsprinkler irrigation systems while meeting irrigation demands is to miniaturize the irrigation unit. Therefore, in the optimization of unit area cost, the irrigation area must be considered as a constraint.


### 2.2. Unidirectional Capillary Pipe Laying (Model I)

#### 2.2.1. Objective Function

The pipes in the irrigation area include branch and capillary pipes, where branch pipes usually have different diameters, and capillary pipes have the same diameter. Thus, the total cost of branch and capillary pipes is expressed as follows:(1)F1=∑i=1aC1i⋅xi⋅l,F2=C2⋅∑i=1axi+1⋅xa+1+s1⋅n,where F1 is the total cost of branch pipes; a is the number of types of branch pipes available; C1i is the unit price of branch pipes with the ith diameter; xi is the number of segments of branch pipes with the ith diameter; l is the standard length of each segment; F2 is the total cost of capillary pipes when laid in one direction; C2 is the unit price of capillary pipes; xa + 1 is the number of segments of capillary pipes; s1 is the ratio of the length between the branch pipe and the first irrigator on the capillary pipeline to the standard segment length of capillary pipes; and n is the standard segment length of capillary pipes.Based on the assumption that the irrigation area has a regular rectangle shape, the total lengths of branch and capillary pipes are the length and width, respectively, of the rectangle; thus, the irrigation area is expressed as follows:(2)As=∑i=1axi⋅l⋅xa+1+s1⋅n,where As is the irrigation area when the capillary pipes are laid in one direction.The minimal pipeline cost per unit area is expressed as follows:(3)minCs=F1+F2As.


#### 2.2.2. Constraints

(1) Pressure Constraint. The pressure difference between any two orifices in the pipeline network should be less than that allowed for the whole irrigation area [21], so the pressure constraint is as follows:(4)maxk,j=1,2,⋯,NΔHkj=Hk−Hj≤ΔHmax,Hk=H0+∑i=0kLiIi+Jik=0,1,2,...,N,Ji=α⋅f⋅Qmdb,where ∆Hkj is the pressure difference between the kth and jth water outlets in the entire irrigation area; N is the number of water outlets in the entire irrigation area; ∆Hmax is the maximum allowable pressure difference; Hk is the pressure head at the kth orifice (m); H0 is the pressure head at the inlet (m); Li is the length of pipe segment (m); Ii is the slope of the ground surface; Ji is the slope of hydraulic gradient (m); α is the enlarging coefficient of local head loss; f is the friction coefficient of the primary and submain pipes (Table 1); Q is the flow rate in the pipe segment (L·h−1); m is the index of discharge; d is the inner diameter of the pipe segment (mm); and b is the index of pipe diameter.Table 1
Calculation of head loss coefficients of different pipes.
PipeInner diameter (mm)fmbHard plastic>80.4641.7704.7700.5051.7504.750Polyethylene≤80.5951.6904.6901.7501.0004.000(2) Nonnegative and Boundary Constraints. The decision variable is the number of standard segments of branch pipes, which is an integer variable; the irrigation area is rectangular; and the number of segments of both branch and capillary pipes should be greater than 1.(5)xi∈Z0+i=1,2,⋯,a,∑i=1axi≥1,xa+1≥1.(3) Irrigation area shape constraints. They are expressed as follows:(6)xa+1+s1⋅n=L,∑i=1axi⋅l=W,where L and W are the length and width of the irrigation area, respectively.


### 2.3. Bidirectional Capillary Pipe Laying (Model II)

The bidirectional capillary pipe-laying model is similar to the unidirectional model, so the mathematical representation of the bidirectional capillary pipe-laying model is as follows.


#### 2.3.1. Objective Function

(7)F3=C2⋅∑i=1axi+1⋅xa+1+xa+2+s1+s2⋅n,Ad=∑i=1axi⋅l⋅xa+1+xa+2+s1+s2⋅n,minCd=F1+F3Ad,where F3 is the total cost of capillary pipes when laid bidirectionally; xa + 1 is the number of segments of downhill capillary pipes; xa + 2 is the number of segments of uphill capillary pipes; s1 is the ratio of the length between the branch pipe and the first irrigator of the downhill capillary pipe to the capillary pipe’s standard segment length; s2 is the ratio of the length between the branch pipe and the first irrigator of the downhill capillary pipe to the standard segment length of the capillary pipes; Ad is the irrigation area when the capillary pipes are laid bidirectionally; and Cd is the pipe cost per unit area when the capillary pipes are laid bidirectionally.


#### 2.3.2. Constraints

(8)maxk,j=1,2,⋯,NΔHkj≤ΔHmax,xi∈Z0+i=1,2,⋯,a+2,1≤∑i=1axi,xa+1≥1,xa+2≥1,xa+1+xa+2+s1+s2⋅n=L,∑i=1axi⋅l=W.


## 2.1. Model Overview

It is assumed that the branch and capillary pipes in the entire irrigation unit form a regular rectangular shape. Schematic diagrams of one-way and two-way laying of capillary pipes are shown in Figures1(a) and 1(b), respectively. The capillary pipes are distributed evenly along the branch pipe; the spacing is the branch pipe’s standard segment length and is determined by the spacing of crops. The irrigators are distributed evenly on the capillary pipes; their spacing is the capillary pipe’s standard segment length, as determined by the crop type, planting form, and geological and topographical soil conditions. Thus, the total length of various branch and capillary pipes is the product of their standard segment lengths and the number of those segments. The optimization problem in this study is converted to that of determining the optimal numbers of segments of branch and capillary pipes. The irrigation unit and the flow in the pipeline are shown in Figure 1, where the capillary pipes are laid in one direction. When the capillary pipes are laid bidirectionally, the layout is similar except that the flow on the branch pipe includes the flow of capillary pipes on the other side. Based on the above description, the number of segments of branch and capillary pipes is selected as the decision variable, and the cost optimization model without limiting the irrigation area is established for both unidirectional and bidirectional capillary pipe-laying methods.Figure 1
Schematic diagrams of bidirectional and unidirectional laying of capillary pipes. (a) Bidirectional laying of capillary pipes and (b) unidirectional laying of capillary pipes.
(a)(b)The method to minimize the cost of economical microsprinkler irrigation systems while meeting irrigation demands is to miniaturize the irrigation unit. Therefore, in the optimization of unit area cost, the irrigation area must be considered as a constraint.


## 2.2. Unidirectional Capillary Pipe Laying (Model I)

### 2.2.1. Objective Function

The pipes in the irrigation area include branch and capillary pipes, where branch pipes usually have different diameters, and capillary pipes have the same diameter. Thus, the total cost of branch and capillary pipes is expressed as follows:(1)F1=∑i=1aC1i⋅xi⋅l,F2=C2⋅∑i=1axi+1⋅xa+1+s1⋅n,where F1 is the total cost of branch pipes; a is the number of types of branch pipes available; C1i is the unit price of branch pipes with the ith diameter; xi is the number of segments of branch pipes with the ith diameter; l is the standard length of each segment; F2 is the total cost of capillary pipes when laid in one direction; C2 is the unit price of capillary pipes; xa + 1 is the number of segments of capillary pipes; s1 is the ratio of the length between the branch pipe and the first irrigator on the capillary pipeline to the standard segment length of capillary pipes; and n is the standard segment length of capillary pipes.Based on the assumption that the irrigation area has a regular rectangle shape, the total lengths of branch and capillary pipes are the length and width, respectively, of the rectangle; thus, the irrigation area is expressed as follows:(2)As=∑i=1axi⋅l⋅xa+1+s1⋅n,where As is the irrigation area when the capillary pipes are laid in one direction.The minimal pipeline cost per unit area is expressed as follows:(3)minCs=F1+F2As.


### 2.2.2. Constraints

(1) Pressure Constraint. The pressure difference between any two orifices in the pipeline network should be less than that allowed for the whole irrigation area [21], so the pressure constraint is as follows:(4)maxk,j=1,2,⋯,NΔHkj=Hk−Hj≤ΔHmax,Hk=H0+∑i=0kLiIi+Jik=0,1,2,...,N,Ji=α⋅f⋅Qmdb,where ∆Hkj is the pressure difference between the kth and jth water outlets in the entire irrigation area; N is the number of water outlets in the entire irrigation area; ∆Hmax is the maximum allowable pressure difference; Hk is the pressure head at the kth orifice (m); H0 is the pressure head at the inlet (m); Li is the length of pipe segment (m); Ii is the slope of the ground surface; Ji is the slope of hydraulic gradient (m); α is the enlarging coefficient of local head loss; f is the friction coefficient of the primary and submain pipes (Table 1); Q is the flow rate in the pipe segment (L·h−1); m is the index of discharge; d is the inner diameter of the pipe segment (mm); and b is the index of pipe diameter.Table 1
Calculation of head loss coefficients of different pipes.
PipeInner diameter (mm)fmbHard plastic>80.4641.7704.7700.5051.7504.750Polyethylene≤80.5951.6904.6901.7501.0004.000(2) Nonnegative and Boundary Constraints. The decision variable is the number of standard segments of branch pipes, which is an integer variable; the irrigation area is rectangular; and the number of segments of both branch and capillary pipes should be greater than 1.(5)xi∈Z0+i=1,2,⋯,a,∑i=1axi≥1,xa+1≥1.(3) Irrigation area shape constraints. They are expressed as follows:(6)xa+1+s1⋅n=L,∑i=1axi⋅l=W,where L and W are the length and width of the irrigation area, respectively.


## 2.2.1. Objective Function

The pipes in the irrigation area include branch and capillary pipes, where branch pipes usually have different diameters, and capillary pipes have the same diameter. Thus, the total cost of branch and capillary pipes is expressed as follows:(1)F1=∑i=1aC1i⋅xi⋅l,F2=C2⋅∑i=1axi+1⋅xa+1+s1⋅n,where F1 is the total cost of branch pipes; a is the number of types of branch pipes available; C1i is the unit price of branch pipes with the ith diameter; xi is the number of segments of branch pipes with the ith diameter; l is the standard length of each segment; F2 is the total cost of capillary pipes when laid in one direction; C2 is the unit price of capillary pipes; xa + 1 is the number of segments of capillary pipes; s1 is the ratio of the length between the branch pipe and the first irrigator on the capillary pipeline to the standard segment length of capillary pipes; and n is the standard segment length of capillary pipes.Based on the assumption that the irrigation area has a regular rectangle shape, the total lengths of branch and capillary pipes are the length and width, respectively, of the rectangle; thus, the irrigation area is expressed as follows:(2)As=∑i=1axi⋅l⋅xa+1+s1⋅n,where As is the irrigation area when the capillary pipes are laid in one direction.The minimal pipeline cost per unit area is expressed as follows:(3)minCs=F1+F2As.


## 2.2.2. Constraints

(1) Pressure Constraint. The pressure difference between any two orifices in the pipeline network should be less than that allowed for the whole irrigation area [21], so the pressure constraint is as follows:(4)maxk,j=1,2,⋯,NΔHkj=Hk−Hj≤ΔHmax,Hk=H0+∑i=0kLiIi+Jik=0,1,2,...,N,Ji=α⋅f⋅Qmdb,where ∆Hkj is the pressure difference between the kth and jth water outlets in the entire irrigation area; N is the number of water outlets in the entire irrigation area; ∆Hmax is the maximum allowable pressure difference; Hk is the pressure head at the kth orifice (m); H0 is the pressure head at the inlet (m); Li is the length of pipe segment (m); Ii is the slope of the ground surface; Ji is the slope of hydraulic gradient (m); α is the enlarging coefficient of local head loss; f is the friction coefficient of the primary and submain pipes (Table 1); Q is the flow rate in the pipe segment (L·h−1); m is the index of discharge; d is the inner diameter of the pipe segment (mm); and b is the index of pipe diameter.Table 1
Calculation of head loss coefficients of different pipes.
PipeInner diameter (mm)fmbHard plastic>80.4641.7704.7700.5051.7504.750Polyethylene≤80.5951.6904.6901.7501.0004.000(2) Nonnegative and Boundary Constraints. The decision variable is the number of standard segments of branch pipes, which is an integer variable; the irrigation area is rectangular; and the number of segments of both branch and capillary pipes should be greater than 1.(5)xi∈Z0+i=1,2,⋯,a,∑i=1axi≥1,xa+1≥1.(3) Irrigation area shape constraints. They are expressed as follows:(6)xa+1+s1⋅n=L,∑i=1axi⋅l=W,where L and W are the length and width of the irrigation area, respectively.


## 2.3. Bidirectional Capillary Pipe Laying (Model II)

The bidirectional capillary pipe-laying model is similar to the unidirectional model, so the mathematical representation of the bidirectional capillary pipe-laying model is as follows.


### 2.3.1. Objective Function

(7)F3=C2⋅∑i=1axi+1⋅xa+1+xa+2+s1+s2⋅n,Ad=∑i=1axi⋅l⋅xa+1+xa+2+s1+s2⋅n,minCd=F1+F3Ad,where F3 is the total cost of capillary pipes when laid bidirectionally; xa + 1 is the number of segments of downhill capillary pipes; xa + 2 is the number of segments of uphill capillary pipes; s1 is the ratio of the length between the branch pipe and the first irrigator of the downhill capillary pipe to the capillary pipe’s standard segment length; s2 is the ratio of the length between the branch pipe and the first irrigator of the downhill capillary pipe to the standard segment length of the capillary pipes; Ad is the irrigation area when the capillary pipes are laid bidirectionally; and Cd is the pipe cost per unit area when the capillary pipes are laid bidirectionally.


### 2.3.2. Constraints

(8)maxk,j=1,2,⋯,NΔHkj≤ΔHmax,xi∈Z0+i=1,2,⋯,a+2,1≤∑i=1axi,xa+1≥1,xa+2≥1,xa+1+xa+2+s1+s2⋅n=L,∑i=1axi⋅l=W.


## 2.3.1. Objective Function

(7)F3=C2⋅∑i=1axi+1⋅xa+1+xa+2+s1+s2⋅n,Ad=∑i=1axi⋅l⋅xa+1+xa+2+s1+s2⋅n,minCd=F1+F3Ad,where F3 is the total cost of capillary pipes when laid bidirectionally; xa + 1 is the number of segments of downhill capillary pipes; xa + 2 is the number of segments of uphill capillary pipes; s1 is the ratio of the length between the branch pipe and the first irrigator of the downhill capillary pipe to the capillary pipe’s standard segment length; s2 is the ratio of the length between the branch pipe and the first irrigator of the downhill capillary pipe to the standard segment length of the capillary pipes; Ad is the irrigation area when the capillary pipes are laid bidirectionally; and Cd is the pipe cost per unit area when the capillary pipes are laid bidirectionally.


## 2.3.2. Constraints

(8)maxk,j=1,2,⋯,NΔHkj≤ΔHmax,xi∈Z0+i=1,2,⋯,a+2,1≤∑i=1axi,xa+1≥1,xa+2≥1,xa+1+xa+2+s1+s2⋅n=L,∑i=1axi⋅l=W.


## 3. Hybrid Genetic Algorithm

The decision variables and constraints of both Model I and Model II are similar, and the HGA design is illustrated below with Model I as an example.


### 3.1. Encoding

We use real number encoding in the HGA. A chromosome can be expressed asX = (Z, M1, M2, …, Ma), where Z represents the number of segments of capillary pipes, and M1, M2, …, and Ma represent the number of segments of branch pipes with different diameters, respectively. According to (9), Z=W/l−s1, which is a fixed value at the time of coding and does not participate in crossover, mutation, and other operators; according to (10), ∑i=1aMi=W/m, which is a fixed value, and this condition is guaranteed in a crossover, variation, and other operators.


### 3.2. Population Initialization

Considering that the quality of the initial population has a significant influence on the convergence speed and the excellence of the solution of the algorithm, the specific steps in this paper for each chromosomeX in the initial population are as follows:Step 1.
M1 is a random integer in the interval 0,W/m.Step 2.
If∑k=1i−1Mk=W/m,i=2,...,a, then all of Mi to Ma are 0; if ∑k=1i−1Mk<W/m, then the Mi value is randomly taken as an integer between 0,W/m−∑k=1i−1Mk.Step 3.
Cycle Step2 until a chromosome is generated.


### 3.3. Fitness Function

Considering the proposed optimization problems with constraints, we set up a fitness function with punishment terms to evaluate individuals. The fitness function is given as(9)FitF=1Cd+Mfmax0,ΔHkj−Hmax,where Mf is punishment coefficients. Based on the death penalty function criterion and the Cd value from the farmer’s laying experience, Mf was set to be 1000 times the Cd.


### 3.4. Selection

Selection determines which individuals can pass their “genetic self-matter” to the next generation. The selection method in the algorithm is roulette wheel selection. The greater the individual fitness value is, the greater the probability that the individual is selected.


### 3.5. Crossover

In this paper, we use the single-point crossover to exchange the sequence of operations in the parent chromosomes. To ensure that the area constraints (9) and (10) are satisfied, the following is done for Mi in the newly generated individuals:When∑i=1aMi≠0,(10)M1,…,Ma=roundM1,…,Ma∑i=1aMi∗Wm.When∑i=1aMi=0, a chromosome is generated.


### 3.6. Mutation

Internal exchange mutation is adopted in this paper. Under the condition of satisfying the mutation rate, two pointsi and j are randomly selected in the parent and the position of these two points is exchanged.


### 3.7. Simulating Annealing Algorithm

The purpose of the simulated annealing operation is to extend the algorithm’s capability for local search, which is mainly divided into two parts: generating neighborhood solutions and judging the admission of new solutions. Neighborhood solutions are caused by random reversal or insertion.


#### 3.7.1. Reversal

Two positions of the chromosome are randomly selected, and the elements between the two positions are arranged in reverse order. For a chromosome “123456,” positions 2 and 5 are randomly selected, and the reversed chromosome becomes “154326.”


#### 3.7.2. Insertion

Two positions of the chromosome are randomly selected, and the element in the first position is inserted after the second one. For a chromosome “123456,” positions 2 and 5 are randomly selected, and the inserted chromosome becomes “134526.”


#### 3.7.3. Judgmental Acceptance of New Solutions

Simulated annealing is based on the Metropolis acceptance criterion. The metropolis acceptance criterion is shown as follows:(11)p=1,fX≥fX′,efX−fX′/T,fX<fX′,where X is the parent individual, X′ is the children individual, f (X) and f (X′) are the fitness values of individuals X and X′, and T is the current temperature. In the genetic simulated annealing algorithm, only one of X and X′ can be accepted to the next generation; simulated annealing is used to determine which one is accepted; the acceptance probability is p, as shown in (11).


#### 3.7.4. The Flow Chart of the HGA

The proposed hybrid genetic simulated annealing algorithm for the mixed replenishment policy is illustrated in Figure2.Figure 2
Flow chart of the HGA.


## 3.1. Encoding

We use real number encoding in the HGA. A chromosome can be expressed asX = (Z, M1, M2, …, Ma), where Z represents the number of segments of capillary pipes, and M1, M2, …, and Ma represent the number of segments of branch pipes with different diameters, respectively. According to (9), Z=W/l−s1, which is a fixed value at the time of coding and does not participate in crossover, mutation, and other operators; according to (10), ∑i=1aMi=W/m, which is a fixed value, and this condition is guaranteed in a crossover, variation, and other operators.


## 3.2. Population Initialization

Considering that the quality of the initial population has a significant influence on the convergence speed and the excellence of the solution of the algorithm, the specific steps in this paper for each chromosomeX in the initial population are as follows:Step 1.
M1 is a random integer in the interval 0,W/m.Step 2.
If∑k=1i−1Mk=W/m,i=2,...,a, then all of Mi to Ma are 0; if ∑k=1i−1Mk<W/m, then the Mi value is randomly taken as an integer between 0,W/m−∑k=1i−1Mk.Step 3.
Cycle Step2 until a chromosome is generated.


## 3.3. Fitness Function

Considering the proposed optimization problems with constraints, we set up a fitness function with punishment terms to evaluate individuals. The fitness function is given as(9)FitF=1Cd+Mfmax0,ΔHkj−Hmax,where Mf is punishment coefficients. Based on the death penalty function criterion and the Cd value from the farmer’s laying experience, Mf was set to be 1000 times the Cd.


## 3.4. Selection

Selection determines which individuals can pass their “genetic self-matter” to the next generation. The selection method in the algorithm is roulette wheel selection. The greater the individual fitness value is, the greater the probability that the individual is selected.


## 3.5. Crossover

In this paper, we use the single-point crossover to exchange the sequence of operations in the parent chromosomes. To ensure that the area constraints (9) and (10) are satisfied, the following is done for Mi in the newly generated individuals:When∑i=1aMi≠0,(10)M1,…,Ma=roundM1,…,Ma∑i=1aMi∗Wm.When∑i=1aMi=0, a chromosome is generated.


## 3.6. Mutation

Internal exchange mutation is adopted in this paper. Under the condition of satisfying the mutation rate, two pointsi and j are randomly selected in the parent and the position of these two points is exchanged.


## 3.7. Simulating Annealing Algorithm

The purpose of the simulated annealing operation is to extend the algorithm’s capability for local search, which is mainly divided into two parts: generating neighborhood solutions and judging the admission of new solutions. Neighborhood solutions are caused by random reversal or insertion.


### 3.7.1. Reversal

Two positions of the chromosome are randomly selected, and the elements between the two positions are arranged in reverse order. For a chromosome “123456,” positions 2 and 5 are randomly selected, and the reversed chromosome becomes “154326.”


### 3.7.2. Insertion

Two positions of the chromosome are randomly selected, and the element in the first position is inserted after the second one. For a chromosome “123456,” positions 2 and 5 are randomly selected, and the inserted chromosome becomes “134526.”


### 3.7.3. Judgmental Acceptance of New Solutions

Simulated annealing is based on the Metropolis acceptance criterion. The metropolis acceptance criterion is shown as follows:(11)p=1,fX≥fX′,efX−fX′/T,fX<fX′,where X is the parent individual, X′ is the children individual, f (X) and f (X′) are the fitness values of individuals X and X′, and T is the current temperature. In the genetic simulated annealing algorithm, only one of X and X′ can be accepted to the next generation; simulated annealing is used to determine which one is accepted; the acceptance probability is p, as shown in (11).


### 3.7.4. The Flow Chart of the HGA

The proposed hybrid genetic simulated annealing algorithm for the mixed replenishment policy is illustrated in Figure2.Figure 2
Flow chart of the HGA.


## 3.7.1. Reversal

Two positions of the chromosome are randomly selected, and the elements between the two positions are arranged in reverse order. For a chromosome “123456,” positions 2 and 5 are randomly selected, and the reversed chromosome becomes “154326.”


## 3.7.2. Insertion

Two positions of the chromosome are randomly selected, and the element in the first position is inserted after the second one. For a chromosome “123456,” positions 2 and 5 are randomly selected, and the inserted chromosome becomes “134526.”


## 3.7.3. Judgmental Acceptance of New Solutions

Simulated annealing is based on the Metropolis acceptance criterion. The metropolis acceptance criterion is shown as follows:(11)p=1,fX≥fX′,efX−fX′/T,fX<fX′,where X is the parent individual, X′ is the children individual, f (X) and f (X′) are the fitness values of individuals X and X′, and T is the current temperature. In the genetic simulated annealing algorithm, only one of X and X′ can be accepted to the next generation; simulated annealing is used to determine which one is accepted; the acceptance probability is p, as shown in (11).


## 3.7.4. The Flow Chart of the HGA

The proposed hybrid genetic simulated annealing algorithm for the mixed replenishment policy is illustrated in Figure2.Figure 2
Flow chart of the HGA.


## 4. Application Example

The Hangzhou Strawberry Water-Saving Irrigation Base is used to validate the algorithm. The base has an area of 20 hm2, which contains areas operated independently by multiple farmers. The area managed by each farmer is about 0.066, 0.2, or 0.66 hm2. Because of the independent operation, the irrigation system is arranged randomly, a branch pipe may only control one farmer’s land, and the capillary pipes are laid unidirectionally. Assuming a farmer’s plot is a rectangle of length 30 m and width 22 m, its area is 0.066 hm2. The flow rate of a microsprinkler is 1.38 L/h, and the maximum allowable pressure difference of the irrigation unit is 4.12 m. The available branch and capillary pipes are shown in Table 2. The water outlet spacings of branch and capillary pipes are 0.95 m and 0.3 m, respectively. The distance between the first dripper on the capillary pipe and the branch pipe is 0.15 m, and the slope of the ground surface is 0.001 in the capillary pipe direction and 0.05 in the branch pipe direction. The parameters of branch and capillary pipes are shown in Table 2, and the unit price is based on the current market price.Table 2
Branch and capillary pipes available in the current market.
TypeNumberInner diameter (mm)Unit price (RMB/m)MaterialBranch pipe1443.66PE pipe234.82.72327.41.87420.61.40516.80.72Capillary pipe113.60.44


### 4.1. Results

To verify the feasibility of the model and compare the effect of algorithm improvement, simulations were performed using the classical GA and HGA for the optimized combination of the pipe network of Model I and Model II, respectively. The parameter settings in the GA and the HGA have a large impact on the experimental results. Although a too large parameter setting such as population size and initial temperature can theoretically greatly increase the chance of obtaining the optimal global solution, it may lead to a long algorithm running time, slow convergence speed, or even failure to converge, which is unacceptable in the practical application process; at the same time, a too small parameter setting may lead the algorithm to fall into the optimal local solution. Therefore, this paper learns and summarizes the previous research experience [22, 23]; the parameters in the HGA are set as follows: the population size (S) = 40; the crossover probability (Pc) = 0.6; the mutation probability (Pm) = 0.1; the iteration number of the genetic algorithm (I) = 200; the start temperature (T0) = 100; the stop temperature (T) = 1; the annealing rate (Pa) = 0.8; the reversal rate (Pr) = 0.5; and the insertion rate (PI) = 0.3. The model is solved using MATLAB2014a. Also, to further increase the chance of obtaining the optimal global solution, each algorithm is run 20 times and averaged for comparison. The average value was obtained for comparison with the capillary pipe laid in one direction, and the average value of the 20 times optimization process for both algorithms when the capillary is laid along the length direction is shown in Figure 3 and Table 3. The pipe network combinations with the lowest cost per unit area in the 20 times HGA are shown in Tables 4 and 5.Figure 3
Schematic diagram of the optimization process.Table 3
Average valid iteration number and number of successful hits of the HGA and the GA.
Running timesHGAGAAverage valid iterationNumber of successful hitsAverage valid iterationNumber of successful hits1031103862047175814Table 4
Optimization of pipe combination with unidirectional laying of capillary pipes.
Capillary pipe layoutCombinationSection numbers of branch pipeSection number of capillary pipeCost per unit area/(RMB/hm2)Irrigation area/hm2Length direction(1)006215995194.50.066Width direction(2)008716725319.10.066Table 5
Optimization of pipe combination with bidirectional laying of capillary pipes.
Capillary pipe layoutCombinationSection numbers of branch pipeSection number ofcapillary pipeCost per unitarea/(RMB/hm2)Irrigation area/hm2DownhillUphillLength direction(4)00621565345192.70.066(5)00621555445192.70.066Width direction(6)001121850225316.10.066(7)001121837625316.10.066


### 4.2. Comparison between the HGA and the GA

The average convergence process of the two algorithms is shown in Figure3, and the classical GA outperforms the HGA in a very little time period before 12 generations. After 12 generations, the HGA outperforms the GA in the full-time period. It is easy to see that the HGA finds the best solution among the two algorithms. Therefore, the HGA is the better choice for the application.The indices “average valid iteration” and “number of successful hits” are used to analyze the robustness of the two algorithms. The index “average valid iteration” is the average number of iterations for success runs among 10 runs and 20 runs. The index “number of successful hits” is the number of successful runs among 10 runs and 20 runs in which the optimal solution is obtained. Table3 shows that the robustness of the HGA is better than that of the GA.


### 4.3. Sensitivity Analysis

The irrigation area in Tables4 and 5 is 0.066 hm2, and the irrigation area constraints are tight, so appropriately relaxing the area constraints can reduce the pipeline cost per unit area. The data are substituted into the model in the literature [18]. When the irrigation area is not limited, the pipeline cost per unit area is 5155 RMB/hm2, and the irrigation area is 0.96 hm2 with the unidirectional laying of capillary pipes; and the pipeline cost per unit area is 5078 RMB/hm2 with bidirectional laying of capillary pipes, and the irrigation area is 0.22 hm2. Therefore, the planting area in unit miniaturization must be determined optimally, and more minor is not better.


### 4.4. Pressure Difference Analysis

It can be seen from Figure4 that the pressure difference of the system for the nine optimal combinations reaches 97.18% to 99.99% of the maximum pressure difference allowed by the system, indicating that the optimal value is obtained based on a full search of the feasible domain of the model constraints.Figure 4
Pressure difference of the optimal pipeline combination.


### 4.5. Comparison between the Pipeline Combination Based on Farmers’ Experience and the Optimal Pipeline Combination

Based on the experience of selecting two kinds of pipes with different diameters and the same length as branch pipes when the farmers’ capillary pipes are laid along the length of the plot, it is known from Tables4 and 5 that the number of branch pipe segments is 23 when the standard number of capillary pipe segments is 99. Because the number of branch pipe sections is 23, the branch pipe with large diameter is selected as 11 sections, and the branch pipe with small diameter is selected as 12 sections. Calculate the unit area cost of the irrigation unit and the system pressure difference as shown in Table 2It can be seen from Table6 that for the pipeline combination (10)-combination (18) laid by farmers according to their experience, the cost per unit area is 1.04%∼13.26% more than that derived from the optimization of this paper, and the pressure difference of the pipeline network is only 5%∼60% of the maximum pressure difference allowed by the system; the pressure difference of the pipeline network in the pipeline combination (19) exceeds the maximum pressure difference allowed by the system.Table 6
Cost per unit area of the irrigation pipe network and the system pressure difference designed by farmers based on their experience.
CombinationSection numbers of branch pipeSection numberof capillary pipeCost per unit area/(RMB/hm2)Irrigation area/hm2(10)1112000995894.80.2077(11)1101200995746.20.3164(12)1100120995664.10.7860(13)1100012995545.21.8239(14)0111200995595.60.4819(15)0110120995513.50.9515(16)0110012995394.61.9894(17)0011120995377.31.4721(18)0011012995258.42.5099(19)000111299—4.7159


### 4.6. The Effect of Capillary Arrangement on the Optimization Results

It can be seen from Tables4 and 5 that the pipeline cost per unit area of bidirectional laying of capillary pipes is lower than that of corresponding unidirectional laying of capillary pipes, regardless of whether the capillary is laid along the length or width direction, indicating that the bidirectional arrangement of the capillary is more conducive to reducing the pipeline cost per unit area of irrigation units, which is consistent with the results of the literature [14, 15, 18].


### 4.7. The Effect of Capillary Arrangement Direction on Optimization Results

It can be seen from Tables4 and 5 that the pipeline cost per unit area is reduced by about 2.3% when the capillary pipe is laid along the length direction of the plot compared with when it is laid along the width direction. That is consistent with the actual situation that the unit price of the capillary pipe is lower than the unit price of the branch pipe, so the capillary pipe is laid along the length direction as much as possible to reduce the total cost.Assuming that the system pressure difference of 4.12 m is all allocated to the capillary pipe, the maximum number of segments of the capillary pipe on one side is 345; i.e., the full length of the capillary pipe on one side is 103.65 m. The relationship between the number of segments of the capillary pipe and the maximum pressure difference in the pipe is shown in Figure5.Figure 5
Section number and maximum pressure difference of the capillary pipe.


### 4.8. The Effect of Branch Pipe Diameter on Optimization Results

In the optimization results in Tables4 and 5, the selection of branch pipes is concentrated on the smaller diameter pipes due to the low unit price of the smaller diameter pipes, thus reducing the cost per unit area. It can be seen from Table 6 that the branch pipe combination with the minor pipe diameter (18) is reduced by 2.27% to 12.1% compared with combination (10)–combination (17).


## 4.1. Results

To verify the feasibility of the model and compare the effect of algorithm improvement, simulations were performed using the classical GA and HGA for the optimized combination of the pipe network of Model I and Model II, respectively. The parameter settings in the GA and the HGA have a large impact on the experimental results. Although a too large parameter setting such as population size and initial temperature can theoretically greatly increase the chance of obtaining the optimal global solution, it may lead to a long algorithm running time, slow convergence speed, or even failure to converge, which is unacceptable in the practical application process; at the same time, a too small parameter setting may lead the algorithm to fall into the optimal local solution. Therefore, this paper learns and summarizes the previous research experience [22, 23]; the parameters in the HGA are set as follows: the population size (S) = 40; the crossover probability (Pc) = 0.6; the mutation probability (Pm) = 0.1; the iteration number of the genetic algorithm (I) = 200; the start temperature (T0) = 100; the stop temperature (T) = 1; the annealing rate (Pa) = 0.8; the reversal rate (Pr) = 0.5; and the insertion rate (PI) = 0.3. The model is solved using MATLAB2014a. Also, to further increase the chance of obtaining the optimal global solution, each algorithm is run 20 times and averaged for comparison. The average value was obtained for comparison with the capillary pipe laid in one direction, and the average value of the 20 times optimization process for both algorithms when the capillary is laid along the length direction is shown in Figure 3 and Table 3. The pipe network combinations with the lowest cost per unit area in the 20 times HGA are shown in Tables 4 and 5.Figure 3
Schematic diagram of the optimization process.Table 3
Average valid iteration number and number of successful hits of the HGA and the GA.
Running timesHGAGAAverage valid iterationNumber of successful hitsAverage valid iterationNumber of successful hits1031103862047175814Table 4
Optimization of pipe combination with unidirectional laying of capillary pipes.
Capillary pipe layoutCombinationSection numbers of branch pipeSection number of capillary pipeCost per unit area/(RMB/hm2)Irrigation area/hm2Length direction(1)006215995194.50.066Width direction(2)008716725319.10.066Table 5
Optimization of pipe combination with bidirectional laying of capillary pipes.
Capillary pipe layoutCombinationSection numbers of branch pipeSection number ofcapillary pipeCost per unitarea/(RMB/hm2)Irrigation area/hm2DownhillUphillLength direction(4)00621565345192.70.066(5)00621555445192.70.066Width direction(6)001121850225316.10.066(7)001121837625316.10.066


## 4.2. Comparison between the HGA and the GA

The average convergence process of the two algorithms is shown in Figure3, and the classical GA outperforms the HGA in a very little time period before 12 generations. After 12 generations, the HGA outperforms the GA in the full-time period. It is easy to see that the HGA finds the best solution among the two algorithms. Therefore, the HGA is the better choice for the application.The indices “average valid iteration” and “number of successful hits” are used to analyze the robustness of the two algorithms. The index “average valid iteration” is the average number of iterations for success runs among 10 runs and 20 runs. The index “number of successful hits” is the number of successful runs among 10 runs and 20 runs in which the optimal solution is obtained. Table3 shows that the robustness of the HGA is better than that of the GA.


## 4.3. Sensitivity Analysis

The irrigation area in Tables4 and 5 is 0.066 hm2, and the irrigation area constraints are tight, so appropriately relaxing the area constraints can reduce the pipeline cost per unit area. The data are substituted into the model in the literature [18]. When the irrigation area is not limited, the pipeline cost per unit area is 5155 RMB/hm2, and the irrigation area is 0.96 hm2 with the unidirectional laying of capillary pipes; and the pipeline cost per unit area is 5078 RMB/hm2 with bidirectional laying of capillary pipes, and the irrigation area is 0.22 hm2. Therefore, the planting area in unit miniaturization must be determined optimally, and more minor is not better.


## 4.4. Pressure Difference Analysis

It can be seen from Figure4 that the pressure difference of the system for the nine optimal combinations reaches 97.18% to 99.99% of the maximum pressure difference allowed by the system, indicating that the optimal value is obtained based on a full search of the feasible domain of the model constraints.Figure 4
Pressure difference of the optimal pipeline combination.


## 4.5. Comparison between the Pipeline Combination Based on Farmers’ Experience and the Optimal Pipeline Combination

Based on the experience of selecting two kinds of pipes with different diameters and the same length as branch pipes when the farmers’ capillary pipes are laid along the length of the plot, it is known from Tables4 and 5 that the number of branch pipe segments is 23 when the standard number of capillary pipe segments is 99. Because the number of branch pipe sections is 23, the branch pipe with large diameter is selected as 11 sections, and the branch pipe with small diameter is selected as 12 sections. Calculate the unit area cost of the irrigation unit and the system pressure difference as shown in Table 2It can be seen from Table6 that for the pipeline combination (10)-combination (18) laid by farmers according to their experience, the cost per unit area is 1.04%∼13.26% more than that derived from the optimization of this paper, and the pressure difference of the pipeline network is only 5%∼60% of the maximum pressure difference allowed by the system; the pressure difference of the pipeline network in the pipeline combination (19) exceeds the maximum pressure difference allowed by the system.Table 6
Cost per unit area of the irrigation pipe network and the system pressure difference designed by farmers based on their experience.
CombinationSection numbers of branch pipeSection numberof capillary pipeCost per unit area/(RMB/hm2)Irrigation area/hm2(10)1112000995894.80.2077(11)1101200995746.20.3164(12)1100120995664.10.7860(13)1100012995545.21.8239(14)0111200995595.60.4819(15)0110120995513.50.9515(16)0110012995394.61.9894(17)0011120995377.31.4721(18)0011012995258.42.5099(19)000111299—4.7159


## 4.6. The Effect of Capillary Arrangement on the Optimization Results

It can be seen from Tables4 and 5 that the pipeline cost per unit area of bidirectional laying of capillary pipes is lower than that of corresponding unidirectional laying of capillary pipes, regardless of whether the capillary is laid along the length or width direction, indicating that the bidirectional arrangement of the capillary is more conducive to reducing the pipeline cost per unit area of irrigation units, which is consistent with the results of the literature [14, 15, 18].


## 4.7. The Effect of Capillary Arrangement Direction on Optimization Results

It can be seen from Tables4 and 5 that the pipeline cost per unit area is reduced by about 2.3% when the capillary pipe is laid along the length direction of the plot compared with when it is laid along the width direction. That is consistent with the actual situation that the unit price of the capillary pipe is lower than the unit price of the branch pipe, so the capillary pipe is laid along the length direction as much as possible to reduce the total cost.Assuming that the system pressure difference of 4.12 m is all allocated to the capillary pipe, the maximum number of segments of the capillary pipe on one side is 345; i.e., the full length of the capillary pipe on one side is 103.65 m. The relationship between the number of segments of the capillary pipe and the maximum pressure difference in the pipe is shown in Figure5.Figure 5
Section number and maximum pressure difference of the capillary pipe.


## 4.8. The Effect of Branch Pipe Diameter on Optimization Results

In the optimization results in Tables4 and 5, the selection of branch pipes is concentrated on the smaller diameter pipes due to the low unit price of the smaller diameter pipes, thus reducing the cost per unit area. It can be seen from Table 6 that the branch pipe combination with the minor pipe diameter (18) is reduced by 2.27% to 12.1% compared with combination (10)–combination (17).


## 5. Conclusion

Pipeline accounts for more than half the total cost of a microsprinkler system; hence, optimizing its design is an effective way to achieve economical microsprinkler systems. This study proposed the idea of pipeline optimization given, because of the characteristics of unit miniaturization of microsprinkler irrigation. An optimization model with the lowest pipeline cost per unit area as the objective function, the maximum pressure difference allowed in the irrigation system, and the shape of the irrigation area as constraints is established, and the optimal arrangement scheme of the pipeline network is obtained by solving with the HGA.(1)
The pipeline cost per unit area increases when the irrigation area is limited to a rectangle of 30 m in length and 22 m in width, compared with no limitation of the irrigation area, so the planting area in unit miniaturization must be determined optimally, and more minor is not better.(2)
The pipeline cost per unit area laid by farmers, according to their experience, increases by 1.04% to 13.26%, and the pressure difference of the pipe network is only 5% to 60% of the maximum pressure difference allowed by the system.(3)
The pipeline cost per unit area is reduced by 2.3% when the capillary pipe is laid along the length of the plot compared with that when the capillary pipe is laid along the width of the plot, which is consistent with the farmers’ experience in laying the capillary pipe along the length of the plot. However, due to the limitation of the system pressure difference, the length of a single-side capillary pipe cannot exceed 103.65 m.(4)
Compared with the unidirectional laying of capillary pipe, the pipeline cost per unit area of bidirectional laying of capillary pipe is less, so the farmer should recommend to lay capillary pipes in both directions.Therefore, while affirming that farmers lay the capillary pipe along the length of the plot, farmers should be advised to lay the capillary pipe in both directions, choose a smaller combination of branch capillary pipe diameter, and adjust and optimize the calculation of various parameters according to the actual situation to achieve the lowest cost per unit area.



---

*Source: 7884491-2022-10-08.xml*