# Technical Research on Optimization of Irrigation Canal System Considering Genetic Algorithm

Authors: Yijia Wang
Journal: Mobile Information Systems
 (2022)

---

## Abstract

In order to solve the lack of optimization and comparison of the previous schemes in the irrigation and water conservancy project reconstruction, the engineering design and planning are difficult to reach the best state, resulting in water resource waste and other problems. In this paper, genetic algorithm optimization technology of the irrigation canal system is studied, in-depth learning technology of image processing is elaborated, the rectangular optimization model is established, and the optimal nonlinear design of trapezoidal and U-shaped sections of irrigation channel is verified by engineering examples. According to the geographical location, water source, irrigation area, irrigation area, and designer’s experience, two possible irrigation scheme layouts have been determined, and the trapezoidal section has been optimized. The results show that the value of the objective function decreases rapidly with the increase of iteration time. Scheme 1 has stabilized for about 19 generations. Scheme 2 tends to be stable for about 25 generations. The optimization results of the U-shaped section show that scheme 1 is stable for about 43 generations, while scheme 2 tends to be stable for about 60 generations. By comparing the optimal schemes of the trapezoidal section and the U-section, it can be found that the water supply cost of the U-section is low. Therefore, under the condition of layout scheme 2, the U-shaped section is the best scheme. The calculation shows that under the same conditions, the trapezoidal section area is about 45% larger than the U-shaped section area. Although the trapezoidal section is adopted in the original project, the U-shaped section is recommended when construction conditions permit. The optimization method can quickly determine the overall optimization scheme of irrigation channels. The water supply cost depends on the final optimized objective function value, which is used as the reference basis for formulating the water supply price. The optimal design scheme should not only meet the provisions of engineering practice but also meet the requirements of the lowest water supply cost.


---

## Body

## 1. Introduction

China is one of the countries with the least water shortage in the world. With the increase of industrial and domestic water consumption, the shortage of water resources will inevitably worsen. Therefore, water-saving irrigation is essential. In traditional air duct engineering planning, there are great differences between building standards and design standards. Relevant parameters are mainly determined according to the actual experience of the designer. Work under optimum conditions [1]. The water price actually collected in some irrigation areas is far lower than the cost water price. The problem of water fee collection is becoming more and more serious. The operating income of irrigation areas cannot make up for its loss, resulting in the lack of effective maintenance of the project and hindering the sustainable development of irrigation areas. In view of the above problems, water-saving irrigation has become one of the effective measures to solve the problem [2]. In order to promote the development of water-saving agriculture, we must vigorously carry forward the water conveyance technology of irrigation channels [3]. Compared with pipeline water conveyance technology, pipeline water conveyance technology has the advantages of low engineering cost and energy saving [4]. With the continuous innovation of canal antiseepage materials, they reduce water transfer loss and effectively improve irrigation water efficiency. At present, there are many departments implementing farmland water-saving projects, and not every department can uniformly plan project changes. The relevant parameters are mainly determined by experience and routine, the standards are inconsistent, and the schemes are lack of optimization and comparison. Engineering design and planning are difficult to achieve in the best state, resulting in a waste of water resources and increased investment costs and energy consumption. To achieve water saving, it is not enough to only solve the design problem. Combined with the regulatory role of economic leverage [5], promote water conservation through government publicity and guidance. At this stage, China has not yet established and improved the agricultural water price setting system, and the overall price is low, resulting in the imbalance of revenue and expenditure of irrigation management departments. It leads to insufficient maintenance of water conservancy projects and extensive agricultural water use, which seriously restricts the sustainable development of irrigation areas. In order to solve the above problems, we must conduct in-depth research on the irrigation channel, optimize the design scheme, make it meet the specified requirements such as the flow rate and flow, and provide positive help for reducing the project investment cost and formulating reasonable water price. The formulation of the optimal design scheme not only saves the irrigation water consumption, reduces the water supply cost, and meets the irrigation requirements but also promotes the rapid development of water-saving irrigation in China. Deep learning also plays an important role in irrigation channel system optimization. As a representative of the new generation of artificial intelligence technology, in-depth research has made significant progress in many areas. Various classical deep neural network structures suitable for different data processing tasks are generated [6]. Target detection algorithms in deep learning are generally divided into the candidate region-based algorithm and regression-based algorithm [7]. The candidate region-based algorithm divides the target detection process into two stages: one is to create candidate regions, and the other is to use classifiers to classify candidate regions [8]. It is mainly based on the RCNN (region with revolutionary neural network) sequence algorithm. The improved version includes fast RCNN [9]. The regression-based algorithm takes the target detection process as a whole and contains only one stage, including YOLO (you only look once) series algorithms and an SSD (single shot multibox detector) [10]. Image segmentation technology based on depth image is far more effective than traditional image segmentation methods [11]. There is a full convolutional network (FCN), a pyramid scene parsing network (pspnet), and a grid model, and the image segmentation performance is continuously improved [12]. In addition, CNN is also widely used in other tasks in the image field, such as the generating adversarial network (GAN) for image generation tasks, CNN combined with the recurrent neural network (RNN) for scene character recognition, image title generation, and visual question answering [13]. Most of these areas are based on CNN or its variant structure and have been improved to match the corresponding tasks. Therefore, CNN has become an indispensable method in the field of image recognition based on deep learning [14]. Deep learning represented by CNN belongs to representation learning, which is different from traditional machine learning. Traditional machine learning uses artificial feature sets, which are organized into algorithms according to expert experience and domain knowledge [15]. Because designers understand the specific meaning of these defined features, the traditional machine learning algorithms are interpretable to a certain extent [16]. People can generally understand the dependence of algorithms on various features and the basis of decision-making. For example, a linear model may use weights corresponding to features to represent the importance of features. Deep learning can automatically decompose and allocate input data features, and traditional methods can solve the problem of manually designing functions so that CNN and other deep learning models can learn more complete features and feature combinations containing deep semantic information. Therefore, its performance is much better than most traditional machine learning algorithms. In the stage of image restoration, the appropriate accuracy of frame block and domain block not only affects the image compression rate but also has a very high impact on the quality of the reconstructed image. Combining the deep collapsible neural network with the fractal compression algorithm, we provide a new scheme for image block classification and search. The algorithm not only shortens the image coding time but also greatly improves the quality of the decoded image. At the same time, the use of GPU technology greatly shortens the image compression time. Subsequent experiments improve the effect of the neural network on improving the restoration quality of compressed face images.


## 2. Materials and Methods

### 2.1. Optimal Design of the Irrigation Canal System

Mathematics is the foundation of all disciplines and the tool of social progress. Irrigation system design can be optimized by applying mathematical models. In order to solve any practical problem mathematically, a bridge must be built between reality and mathematics. The process of building a bridge is the process of transforming practical problems into mathematical problems, and the bridge is the mathematical model to solve practical problems. The mathematical model is a mathematical structure that expresses practical problems by mathematical methods [17]. This structure can be functions, formulas, curves, etc. Generally speaking, the mathematical model abstracts a part of the real world into a specific mathematical structure to achieve a specific goal [18]. Therefore, the mathematical model is a mathematical structure obtained by making reasonable assumptions about specific objects under certain conditions and laws and using mathematical tools to obtain appropriate results. The whole process of modeling is mathematical modeling. The problem that needs to be expressed by the mathematical model can be qualitative or quantitative, but the final expression must be numerical. Therefore, the mathematical model can be simple or complex, which requires specific analysis of specific problems [19].Basic steps of mathematical modeling: in addition to the ability to connect and judge, there is a need to develop practical solutions that can be used to solve real-world problems. Mathematical models also need to have a certain understanding, have a good ability to analyze practical problems, be able to identify the key points of the problem, discard nonessential factors, and abstract them. Therefore, it is necessary to realize the transformation from mathematical models to practical problems.Sample preparation stage: first, understand the real background of the actual problem. Stripping will occur according to the baseline analysis. Identify the nature of the problem, the objectives and requirements to be achieved, as well as the variables and relevant data required by the problem, focus on distinguishing variables and constants, and identify the corresponding units at the same time.Model assumption stage: the model assumption stage is a very important part of the model and plays a key role. Develop appropriate and simplified methods at this stage according to the nature, purpose, and requirements of problem analysis in the previous stage. In addition to simplification, the actual situation must also be considered. It must be reasonably simplified on the basis of conforming to the objective law of things. Use reasoning, connections, and insights to clarify key issues and make valid assumptions.Modeling stage: the first two stages are to obtain the internal laws of practical problems according to analysis and assumptions, determine the causal relationship of key factors, and use appropriate mathematical tools to establish the relationship or equation between relevant quantities [20].Optimization of irrigation channel layout: according to the terrain, water source, irrigation site, and other parameter information, the irrigation site planning route of the irrigation project site will be determined according to the feasibility study. List the main flow, branch pipe, and bucket pipe according to the scheme. Write the plan in an Excel spreadsheet. When running the program, the data will be automatically input into the Excel spreadsheet, the water payment of different plans will be input into the spreadsheet, and the best plan with the lowest cost will be selected through filtering and comparison.


### 2.2. Optimization of the Section Size of the Irrigation Channel

The maximum demand for water for crop irrigation is used as a standard to determine the flow of rivers at all levels. Be familiar with irrigation channel design and use the genetic algorithm to optimize the section size.


#### 2.2.1. Code

Due to the difference between the continuous quantity and the binary quantity, the algorithm is difficult to obtain an accurate solution. Therefore, in order to improve the accuracy of the solution, we should extend the length of coded characters to reduce the efficiency of the algorithm. The above problems can be effectively avoided by real number coding.


#### 2.2.2. Treatment of Constraints

In this paper, the penalty function method is selected to solve the constraints. If the limit is not met, the penalty is increased by multiplying the penalty coefficient by the penalty price. The method for calculating a specific fitness function is as follows.(1)y=1P+M1×min0,Q−Qmin+min0,Qmax−Q+M2×min0,V−Vmin+min0,Vmax−V+M3×min0,β−βmin+min0,βmax−β,where M1 is the flow penalty coefficient, M2 is the speed penalty coefficient, and M3 is the width depth ratio penalty coefficient.


#### 2.2.3. Genetic Operator

Selection operator: this paper recognizes the roulette selection method. If the value of the independent fitness function is low, the probability of selection is also low. On the contrary, there are more.Crossover operator: this paper adopts a two-point crossover method. Chromosome intersections were identified for local gene exchange to obtain two offspring chromosomes. Select a crossover probability of 0.8.Mutation operator: the probability of mutationPm will produce a new gene to replace the original human gene. The selection of variant genes and their locations is random. Pm = 0.1 is adopted in this paper.


### 2.3. Objective Function

#### 2.3.1. Minimum Water Supply Cost Optimization Model

Quickly determine the overall optimization of irrigation channels. The cost of water supply depends on the objective function value of final optimization, which is used as the reference basis to formulate the price of water supply. The optimal design scheme should not only meet the requirements of engineering practice but also meet the requirements of the lowest cost of water supply. Deep learning also plays an important role in irrigation channel system optimization. Target detection algorithms in deep learning are generally divided into candidate region-based algorithms and regression-based algorithms. The objective function of this paper is the lowest water supply cost. The calculation methods of water supply cost can be divided into full cost and operation cost as shown in Figure1:Figure 1
Flow chart of the target detection algorithm based on deep learning.Through the calculation method of total cost, the specific formula is as follows:(2)Water supply cost=depreciation of fixed assets+energy consumption+project maintenance and maintenance fee+people's funds+water resources fee, etc.Operating costs include all other expenses except for depreciation of fixed assets, namely(3)The cost of water supply=Depreciation of fixed assets+operating costsIrrigation water consumption.(1) Depreciation method of fixed assets.The construction cost of the irrigation channel project also belongs to a part of fixed assets. See formula (4) for the construction cost of the irrigation area project:(4)Γ=1+τ+ρK1M+WQG+∑i=1nLateral canalK2M+WQZ,i+∑i=1mbucketK3M+WQD,i,where ρ is the share of channel auxiliary investment in channel investment; τ is the percentage of labor cost, construction machinery operation cost, design cost, and other costs in the cost of the air duct; K is the selection coefficient of the air duct system (expressed by 0 or 1); nLateral canal is the number of branch channels, mbucket is the number of channels; M is the material cost, yuan, and W is the excavation and filling cost. According to different cross-sectional shapes, the calculation formula of project cost is divided into trapezoid and U-shape [21].The calculation formula of the trapezoidal section (half excavation and half filling) is shown in (5) and (6):(5)M=bT+52hTj+0.41+mWithin2TclfTc,(6)W=2D+54hTj+0.2−xTmWithin+moutside×54hTj+0.2−xTηfTi+bT+xTmWithinxTfTwl,where bT is the design bottom width, m; hT is the design water depth, m; hTj is the increased water depth, m; mWithin is the inner slope coefficient, and Tc is the lining thickness, m; moutside is the outer slope coefficient, and the river length is m; fTC is the unit price of lining, m3, D is the width of embankment top m, η is the filling coefficient considering soil settlement, and xT is the excavation depth M.The calculation formula ofxT is shown in(7)bT+mWithinxT=2μ54hTj+0.2−xTD+mWithin+moutside254+0.2−xT.According to different channel materials, the width of embankment top is divided into(8)Earth canal D=hTj+0.3Slurry masonry D=hTj+0.5.The calculation formula of the U-shaped section is shown in (9) and (10):(9)M=π2−α2rTc+Tc2+2rN0+sinα+2αcosαTc+2rN0+2r+1Tclfuc,(10)W=πr+Tc2+r+Tc2tanα+rN0+ar+Tccosα+rcosα+rN0tanα+rsinαtanα+a1tanαlfuw,where α is the straight arc angle, r is the arc radius m, Tc is the water depth m, N0 is the α=0 coefficient, fuc is the unit price of lining m3/yuan, fuw is the unit price of lining m3/yuan, and l is the length of river channel M.Considering the above two situations, the calculation formula for calculating depreciation expense is as follows:(11)D=1−ZΓr0,where Z is the residual value of equipment, 3% in this paper, and r0 is the depreciation life of engineering equipment.


#### 2.3.2. Operation Cost

The composition of operation cost includes water resource cost, personnel capital, project maintenance cost, and energy consumption cost. The project maintenance cost and personnel cost are related to the project construction cost. Therefore, the percentage value of the project construction cost is used to estimate project maintenance costs and personnel costs. The calculation formula of operating cost can be expressed as(12)G=λΓ+C+O,where λ is the operating cost coefficient (excluding energy consumption), which is the water resource fee of yuan, and C is the energy consumption (0 yuan under gravity irrigation), yuan.The calculation formula of energy consumption cost C is shown in (13) and (14):(13)C=EQpumpTzHpump367.2ηloading,where E is the unit price of electricity, yuan/kWh, Tz is the annual working time of the water pump, H, and ηloading is the installation efficiency of the water pump, m3hm2.(14)Qpump=mzong,netSηwaterTt,where ηwater is the utilization coefficient of irrigation water, t is the daily irrigation time, and mzong,net is the comprehensive net irrigation quota, m3hm2.The calculation formula of water resources fee 0 is shown in(15)O=emzong,netS,where e is the unit price of water resources fee, yuan/ m3; S is the irrigation area, hm2.


### 2.4. Constraints

#### 2.4.1. Flow Constraint

Check the water delivery capacity of the channel. See formula (14)as follows:(16)Qs−QQs≤0.05.


#### 2.4.2. Speed Constraint

The flow velocity in the channel shall meet the flow velocity without scouring and sedimentation, as shown in formula:(17)vcd≤vi≤vcs,where vcd is the minimum speed allowed in the channel, M/S; vcs is the maximum speed allowed in the channel, M/s.Trapezoidal calculation formula is shown in(18)Vi=QsbmWithinhThT.The U-shape calculation formula is shown in the following formula:(19)Vi=Qsr2/2π1−2a/π−sin2α+rN0+sinα2rcosα+rN0sinαtgα.


#### 2.4.3. Check Ratio Constraints

The width depth ratio of groove section shall be within a certain range to prevent narrow and deep sections:(20)βmin≤β≤βmax,where βmin is the minimum value of width depth ratio; βmax is the maximum width depth ratio.See (21) for the trapezoidal calculation formula:(21)β=bThT.The U-shape calculation formula is shown in the following formula:(22)β=rN0+r+a12rcosα+rN0+a1+rcosαtanα,where camber angle of α straight line, (°); r is the arc radius, m. N0 is the coefficient when α=0; a1 is lining superelevation, M.


#### 2.4.4. Nonnegative Constraint

All parameters in the mathematical model are nonnegative.


## 2.1. Optimal Design of the Irrigation Canal System

Mathematics is the foundation of all disciplines and the tool of social progress. Irrigation system design can be optimized by applying mathematical models. In order to solve any practical problem mathematically, a bridge must be built between reality and mathematics. The process of building a bridge is the process of transforming practical problems into mathematical problems, and the bridge is the mathematical model to solve practical problems. The mathematical model is a mathematical structure that expresses practical problems by mathematical methods [17]. This structure can be functions, formulas, curves, etc. Generally speaking, the mathematical model abstracts a part of the real world into a specific mathematical structure to achieve a specific goal [18]. Therefore, the mathematical model is a mathematical structure obtained by making reasonable assumptions about specific objects under certain conditions and laws and using mathematical tools to obtain appropriate results. The whole process of modeling is mathematical modeling. The problem that needs to be expressed by the mathematical model can be qualitative or quantitative, but the final expression must be numerical. Therefore, the mathematical model can be simple or complex, which requires specific analysis of specific problems [19].Basic steps of mathematical modeling: in addition to the ability to connect and judge, there is a need to develop practical solutions that can be used to solve real-world problems. Mathematical models also need to have a certain understanding, have a good ability to analyze practical problems, be able to identify the key points of the problem, discard nonessential factors, and abstract them. Therefore, it is necessary to realize the transformation from mathematical models to practical problems.Sample preparation stage: first, understand the real background of the actual problem. Stripping will occur according to the baseline analysis. Identify the nature of the problem, the objectives and requirements to be achieved, as well as the variables and relevant data required by the problem, focus on distinguishing variables and constants, and identify the corresponding units at the same time.Model assumption stage: the model assumption stage is a very important part of the model and plays a key role. Develop appropriate and simplified methods at this stage according to the nature, purpose, and requirements of problem analysis in the previous stage. In addition to simplification, the actual situation must also be considered. It must be reasonably simplified on the basis of conforming to the objective law of things. Use reasoning, connections, and insights to clarify key issues and make valid assumptions.Modeling stage: the first two stages are to obtain the internal laws of practical problems according to analysis and assumptions, determine the causal relationship of key factors, and use appropriate mathematical tools to establish the relationship or equation between relevant quantities [20].Optimization of irrigation channel layout: according to the terrain, water source, irrigation site, and other parameter information, the irrigation site planning route of the irrigation project site will be determined according to the feasibility study. List the main flow, branch pipe, and bucket pipe according to the scheme. Write the plan in an Excel spreadsheet. When running the program, the data will be automatically input into the Excel spreadsheet, the water payment of different plans will be input into the spreadsheet, and the best plan with the lowest cost will be selected through filtering and comparison.


## 2.2. Optimization of the Section Size of the Irrigation Channel

The maximum demand for water for crop irrigation is used as a standard to determine the flow of rivers at all levels. Be familiar with irrigation channel design and use the genetic algorithm to optimize the section size.


### 2.2.1. Code

Due to the difference between the continuous quantity and the binary quantity, the algorithm is difficult to obtain an accurate solution. Therefore, in order to improve the accuracy of the solution, we should extend the length of coded characters to reduce the efficiency of the algorithm. The above problems can be effectively avoided by real number coding.


### 2.2.2. Treatment of Constraints

In this paper, the penalty function method is selected to solve the constraints. If the limit is not met, the penalty is increased by multiplying the penalty coefficient by the penalty price. The method for calculating a specific fitness function is as follows.(1)y=1P+M1×min0,Q−Qmin+min0,Qmax−Q+M2×min0,V−Vmin+min0,Vmax−V+M3×min0,β−βmin+min0,βmax−β,where M1 is the flow penalty coefficient, M2 is the speed penalty coefficient, and M3 is the width depth ratio penalty coefficient.


### 2.2.3. Genetic Operator

Selection operator: this paper recognizes the roulette selection method. If the value of the independent fitness function is low, the probability of selection is also low. On the contrary, there are more.Crossover operator: this paper adopts a two-point crossover method. Chromosome intersections were identified for local gene exchange to obtain two offspring chromosomes. Select a crossover probability of 0.8.Mutation operator: the probability of mutationPm will produce a new gene to replace the original human gene. The selection of variant genes and their locations is random. Pm = 0.1 is adopted in this paper.


## 2.2.1. Code

Due to the difference between the continuous quantity and the binary quantity, the algorithm is difficult to obtain an accurate solution. Therefore, in order to improve the accuracy of the solution, we should extend the length of coded characters to reduce the efficiency of the algorithm. The above problems can be effectively avoided by real number coding.


## 2.2.2. Treatment of Constraints

In this paper, the penalty function method is selected to solve the constraints. If the limit is not met, the penalty is increased by multiplying the penalty coefficient by the penalty price. The method for calculating a specific fitness function is as follows.(1)y=1P+M1×min0,Q−Qmin+min0,Qmax−Q+M2×min0,V−Vmin+min0,Vmax−V+M3×min0,β−βmin+min0,βmax−β,where M1 is the flow penalty coefficient, M2 is the speed penalty coefficient, and M3 is the width depth ratio penalty coefficient.


## 2.2.3. Genetic Operator

Selection operator: this paper recognizes the roulette selection method. If the value of the independent fitness function is low, the probability of selection is also low. On the contrary, there are more.Crossover operator: this paper adopts a two-point crossover method. Chromosome intersections were identified for local gene exchange to obtain two offspring chromosomes. Select a crossover probability of 0.8.Mutation operator: the probability of mutationPm will produce a new gene to replace the original human gene. The selection of variant genes and their locations is random. Pm = 0.1 is adopted in this paper.


## 2.3. Objective Function

### 2.3.1. Minimum Water Supply Cost Optimization Model

Quickly determine the overall optimization of irrigation channels. The cost of water supply depends on the objective function value of final optimization, which is used as the reference basis to formulate the price of water supply. The optimal design scheme should not only meet the requirements of engineering practice but also meet the requirements of the lowest cost of water supply. Deep learning also plays an important role in irrigation channel system optimization. Target detection algorithms in deep learning are generally divided into candidate region-based algorithms and regression-based algorithms. The objective function of this paper is the lowest water supply cost. The calculation methods of water supply cost can be divided into full cost and operation cost as shown in Figure1:Figure 1
Flow chart of the target detection algorithm based on deep learning.Through the calculation method of total cost, the specific formula is as follows:(2)Water supply cost=depreciation of fixed assets+energy consumption+project maintenance and maintenance fee+people's funds+water resources fee, etc.Operating costs include all other expenses except for depreciation of fixed assets, namely(3)The cost of water supply=Depreciation of fixed assets+operating costsIrrigation water consumption.(1) Depreciation method of fixed assets.The construction cost of the irrigation channel project also belongs to a part of fixed assets. See formula (4) for the construction cost of the irrigation area project:(4)Γ=1+τ+ρK1M+WQG+∑i=1nLateral canalK2M+WQZ,i+∑i=1mbucketK3M+WQD,i,where ρ is the share of channel auxiliary investment in channel investment; τ is the percentage of labor cost, construction machinery operation cost, design cost, and other costs in the cost of the air duct; K is the selection coefficient of the air duct system (expressed by 0 or 1); nLateral canal is the number of branch channels, mbucket is the number of channels; M is the material cost, yuan, and W is the excavation and filling cost. According to different cross-sectional shapes, the calculation formula of project cost is divided into trapezoid and U-shape [21].The calculation formula of the trapezoidal section (half excavation and half filling) is shown in (5) and (6):(5)M=bT+52hTj+0.41+mWithin2TclfTc,(6)W=2D+54hTj+0.2−xTmWithin+moutside×54hTj+0.2−xTηfTi+bT+xTmWithinxTfTwl,where bT is the design bottom width, m; hT is the design water depth, m; hTj is the increased water depth, m; mWithin is the inner slope coefficient, and Tc is the lining thickness, m; moutside is the outer slope coefficient, and the river length is m; fTC is the unit price of lining, m3, D is the width of embankment top m, η is the filling coefficient considering soil settlement, and xT is the excavation depth M.The calculation formula ofxT is shown in(7)bT+mWithinxT=2μ54hTj+0.2−xTD+mWithin+moutside254+0.2−xT.According to different channel materials, the width of embankment top is divided into(8)Earth canal D=hTj+0.3Slurry masonry D=hTj+0.5.The calculation formula of the U-shaped section is shown in (9) and (10):(9)M=π2−α2rTc+Tc2+2rN0+sinα+2αcosαTc+2rN0+2r+1Tclfuc,(10)W=πr+Tc2+r+Tc2tanα+rN0+ar+Tccosα+rcosα+rN0tanα+rsinαtanα+a1tanαlfuw,where α is the straight arc angle, r is the arc radius m, Tc is the water depth m, N0 is the α=0 coefficient, fuc is the unit price of lining m3/yuan, fuw is the unit price of lining m3/yuan, and l is the length of river channel M.Considering the above two situations, the calculation formula for calculating depreciation expense is as follows:(11)D=1−ZΓr0,where Z is the residual value of equipment, 3% in this paper, and r0 is the depreciation life of engineering equipment.


### 2.3.2. Operation Cost

The composition of operation cost includes water resource cost, personnel capital, project maintenance cost, and energy consumption cost. The project maintenance cost and personnel cost are related to the project construction cost. Therefore, the percentage value of the project construction cost is used to estimate project maintenance costs and personnel costs. The calculation formula of operating cost can be expressed as(12)G=λΓ+C+O,where λ is the operating cost coefficient (excluding energy consumption), which is the water resource fee of yuan, and C is the energy consumption (0 yuan under gravity irrigation), yuan.The calculation formula of energy consumption cost C is shown in (13) and (14):(13)C=EQpumpTzHpump367.2ηloading,where E is the unit price of electricity, yuan/kWh, Tz is the annual working time of the water pump, H, and ηloading is the installation efficiency of the water pump, m3hm2.(14)Qpump=mzong,netSηwaterTt,where ηwater is the utilization coefficient of irrigation water, t is the daily irrigation time, and mzong,net is the comprehensive net irrigation quota, m3hm2.The calculation formula of water resources fee 0 is shown in(15)O=emzong,netS,where e is the unit price of water resources fee, yuan/ m3; S is the irrigation area, hm2.


## 2.3.1. Minimum Water Supply Cost Optimization Model

Quickly determine the overall optimization of irrigation channels. The cost of water supply depends on the objective function value of final optimization, which is used as the reference basis to formulate the price of water supply. The optimal design scheme should not only meet the requirements of engineering practice but also meet the requirements of the lowest cost of water supply. Deep learning also plays an important role in irrigation channel system optimization. Target detection algorithms in deep learning are generally divided into candidate region-based algorithms and regression-based algorithms. The objective function of this paper is the lowest water supply cost. The calculation methods of water supply cost can be divided into full cost and operation cost as shown in Figure1:Figure 1
Flow chart of the target detection algorithm based on deep learning.Through the calculation method of total cost, the specific formula is as follows:(2)Water supply cost=depreciation of fixed assets+energy consumption+project maintenance and maintenance fee+people's funds+water resources fee, etc.Operating costs include all other expenses except for depreciation of fixed assets, namely(3)The cost of water supply=Depreciation of fixed assets+operating costsIrrigation water consumption.(1) Depreciation method of fixed assets.The construction cost of the irrigation channel project also belongs to a part of fixed assets. See formula (4) for the construction cost of the irrigation area project:(4)Γ=1+τ+ρK1M+WQG+∑i=1nLateral canalK2M+WQZ,i+∑i=1mbucketK3M+WQD,i,where ρ is the share of channel auxiliary investment in channel investment; τ is the percentage of labor cost, construction machinery operation cost, design cost, and other costs in the cost of the air duct; K is the selection coefficient of the air duct system (expressed by 0 or 1); nLateral canal is the number of branch channels, mbucket is the number of channels; M is the material cost, yuan, and W is the excavation and filling cost. According to different cross-sectional shapes, the calculation formula of project cost is divided into trapezoid and U-shape [21].The calculation formula of the trapezoidal section (half excavation and half filling) is shown in (5) and (6):(5)M=bT+52hTj+0.41+mWithin2TclfTc,(6)W=2D+54hTj+0.2−xTmWithin+moutside×54hTj+0.2−xTηfTi+bT+xTmWithinxTfTwl,where bT is the design bottom width, m; hT is the design water depth, m; hTj is the increased water depth, m; mWithin is the inner slope coefficient, and Tc is the lining thickness, m; moutside is the outer slope coefficient, and the river length is m; fTC is the unit price of lining, m3, D is the width of embankment top m, η is the filling coefficient considering soil settlement, and xT is the excavation depth M.The calculation formula ofxT is shown in(7)bT+mWithinxT=2μ54hTj+0.2−xTD+mWithin+moutside254+0.2−xT.According to different channel materials, the width of embankment top is divided into(8)Earth canal D=hTj+0.3Slurry masonry D=hTj+0.5.The calculation formula of the U-shaped section is shown in (9) and (10):(9)M=π2−α2rTc+Tc2+2rN0+sinα+2αcosαTc+2rN0+2r+1Tclfuc,(10)W=πr+Tc2+r+Tc2tanα+rN0+ar+Tccosα+rcosα+rN0tanα+rsinαtanα+a1tanαlfuw,where α is the straight arc angle, r is the arc radius m, Tc is the water depth m, N0 is the α=0 coefficient, fuc is the unit price of lining m3/yuan, fuw is the unit price of lining m3/yuan, and l is the length of river channel M.Considering the above two situations, the calculation formula for calculating depreciation expense is as follows:(11)D=1−ZΓr0,where Z is the residual value of equipment, 3% in this paper, and r0 is the depreciation life of engineering equipment.


## 2.3.2. Operation Cost

The composition of operation cost includes water resource cost, personnel capital, project maintenance cost, and energy consumption cost. The project maintenance cost and personnel cost are related to the project construction cost. Therefore, the percentage value of the project construction cost is used to estimate project maintenance costs and personnel costs. The calculation formula of operating cost can be expressed as(12)G=λΓ+C+O,where λ is the operating cost coefficient (excluding energy consumption), which is the water resource fee of yuan, and C is the energy consumption (0 yuan under gravity irrigation), yuan.The calculation formula of energy consumption cost C is shown in (13) and (14):(13)C=EQpumpTzHpump367.2ηloading,where E is the unit price of electricity, yuan/kWh, Tz is the annual working time of the water pump, H, and ηloading is the installation efficiency of the water pump, m3hm2.(14)Qpump=mzong,netSηwaterTt,where ηwater is the utilization coefficient of irrigation water, t is the daily irrigation time, and mzong,net is the comprehensive net irrigation quota, m3hm2.The calculation formula of water resources fee 0 is shown in(15)O=emzong,netS,where e is the unit price of water resources fee, yuan/ m3; S is the irrigation area, hm2.


## 2.4. Constraints

### 2.4.1. Flow Constraint

Check the water delivery capacity of the channel. See formula (14)as follows:(16)Qs−QQs≤0.05.


### 2.4.2. Speed Constraint

The flow velocity in the channel shall meet the flow velocity without scouring and sedimentation, as shown in formula:(17)vcd≤vi≤vcs,where vcd is the minimum speed allowed in the channel, M/S; vcs is the maximum speed allowed in the channel, M/s.Trapezoidal calculation formula is shown in(18)Vi=QsbmWithinhThT.The U-shape calculation formula is shown in the following formula:(19)Vi=Qsr2/2π1−2a/π−sin2α+rN0+sinα2rcosα+rN0sinαtgα.


### 2.4.3. Check Ratio Constraints

The width depth ratio of groove section shall be within a certain range to prevent narrow and deep sections:(20)βmin≤β≤βmax,where βmin is the minimum value of width depth ratio; βmax is the maximum width depth ratio.See (21) for the trapezoidal calculation formula:(21)β=bThT.The U-shape calculation formula is shown in the following formula:(22)β=rN0+r+a12rcosα+rN0+a1+rcosαtanα,where camber angle of α straight line, (°); r is the arc radius, m. N0 is the coefficient when α=0; a1 is lining superelevation, M.


### 2.4.4. Nonnegative Constraint

All parameters in the mathematical model are nonnegative.


## 2.4.1. Flow Constraint

Check the water delivery capacity of the channel. See formula (14)as follows:(16)Qs−QQs≤0.05.


## 2.4.2. Speed Constraint

The flow velocity in the channel shall meet the flow velocity without scouring and sedimentation, as shown in formula:(17)vcd≤vi≤vcs,where vcd is the minimum speed allowed in the channel, M/S; vcs is the maximum speed allowed in the channel, M/s.Trapezoidal calculation formula is shown in(18)Vi=QsbmWithinhThT.The U-shape calculation formula is shown in the following formula:(19)Vi=Qsr2/2π1−2a/π−sin2α+rN0+sinα2rcosα+rN0sinαtgα.


## 2.4.3. Check Ratio Constraints

The width depth ratio of groove section shall be within a certain range to prevent narrow and deep sections:(20)βmin≤β≤βmax,where βmin is the minimum value of width depth ratio; βmax is the maximum width depth ratio.See (21) for the trapezoidal calculation formula:(21)β=bThT.The U-shape calculation formula is shown in the following formula:(22)β=rN0+r+a12rcosα+rN0+a1+rcosαtanα,where camber angle of α straight line, (°); r is the arc radius, m. N0 is the coefficient when α=0; a1 is lining superelevation, M.


## 2.4.4. Nonnegative Constraint

All parameters in the mathematical model are nonnegative.


## 3. Results

Because the material cost in this paper is mainly the lining cost, in order to verify the universality of the model, a part of the water-saving reconstruction design of the irrigation area with serious freezing damage is taken as an optimization example. The irrigation area is mountainous. The terrain of the irrigation area is a fan-shaped alluvial fan in front of the mountain, and the terrain is generally inclined from northwest to southeast. It is planned to lead the main diversion canal to the irrigation area, to the tributaries and canals, and then to the farmland. According to the general layout of the irrigation area, some old rivers in the irrigation area shall be transformed for water saving. In the original planning and design, they were reinforced concrete trapezoidal channels. The basin is higher in the northwest and lower in the southeast. The vegetation coverage of the basin is low. Most of the upstream is alpine meadow, and the vegetation coverage in the downstream gradually increases, which is manifested as alpine meadow and shrub [22]. It belongs to the plateau temperate semiarid monsoon climate area, with low temperatures, a large annual temperature difference, obvious dry and wet seasons, long sunshine time, a short frost-free period, and sufficient precipitation in summer. The river water is mainly supplied by groundwater, followed by precipitation. Due to abundant groundwater resources, runoff is evenly distributed throughout the year. The maximum flow is formed by precipitation, which generally occurs in August, and the minimum flow generally occurs from January to February.According to the terrain, water source, irrigation area location, irrigation area, and other actual conditions as well as the experience of designers, the possible irrigation area layout scheme is determined, as shown in Table1. The channel includes three-stage channels: middle, split, and bucket, and there are two schemes in total.Table 1
Channel layout scheme.
SchemelGlZ.1lD.1lD.2lZ.2lD.3lD.413624142071568015208007502350013506806801400800750The optimization results under the trapezoidal section are shown in Figures2 and 3.Figure 2
The water supply cost change curve of scheme I. Scheme 1 tends to be stable for about 19 generations.Figure 3
The water supply cost change curve of scheme II. Scheme 2 tends to be stable for about 60 generations.It can be seen from the curve that the value of the objective function decreases rapidly with the increasing number of iterations. Scheme 1 and scheme 2 are gradually stable in generation 19 and 25, respectively, which shows that the genetic algorithm has convergence. On the basis of integer coding, the calculation accuracy is improved, and the optimization results are obtained.The comparison of optimization schemes of the trapezoidal section is shown in Table2.Table 2
Comparison of optimization schemes of the trapezoidal section.
SchemeWater supply costlGlZ.1lD.1lD.2lZ.2lD.3lD.410.432.8 × 1.62.3 × 1.31.85 × 11.85 × 12.1 × 1.21.85 × 11.85 × 120.42.8 × 1.52.1 × 1.21.7 × 1.11.7 × 1.12 × 11.7 × 1.11.7 × 1.1The premise is that the basic hydraulic conditions of the channel section and the constraints of the optimization algorithm are met. From the comparison in Table2, it can be seen that the water supply cost (objective function) of scheme 2 is lower than that of scheme 1. According to the calculation, the section size of scheme 2 on the main, branch, and bucket pipe is 4%, 3%, and 5% smaller than that of scheme 1, respectively. Due to the reduction of flow cross-sectional area, the excavation and filling of river will also be reduced, which shows that the genetic algorithm has a certain application value in solving river optimization problems. The optimization results can not only provide a reference for water price reform but also save the land occupation of the project so as to save the project investment. Therefore, scheme 2 is the best scheme under the trapezoidal section.The optimization results under the U-shaped section are shown in Figures4 and 5.Figure 4
The water supply cost change curve of scheme I. Scheme 1 tends to be stable for about 43 generations.Figure 5
The water supply cost change curve of scheme II. Scheme 2 tends to be stable for about 60 generations.It can be seen from the curve that the value of the objective function decreases rapidly with the increasing number of iterations. Scheme 1 and scheme 2 are gradually stable in generation 43 and generation 60, respectively, which shows that the genetic algorithm has convergence. On the basis of integer coding, the calculation accuracy is improved, and the optimization results are obtained.The comparison of optimization schemes of the U-shaped section is shown in Table3.Table 3
Comparison of optimization schemes of the U-shaped section.
Scheme 1Scheme 2Water supply cost0.370.35lGα14°14°r1.451.48h1.811.78h20.710.66lZ.1α14°12°r1.191.22h1.481.47h20.580.5lZ.2α12°13°r1.091.13h1.371.35h20.50.48lD.1α8°8°lD.2r10.98lD.3h1.31.27lD.4h20.440.43On the premise of meeting the basic hydraulic conditions of the river section and the constraints of the optimization algorithm, it can be seen from the comparison in Table3 that the water supply cost (objective function) of scheme 2 is lower than that of scheme 1 [23]. The section size of scheme 2 on the trunk, branch, and bucket pipe is 2%, 1%, and 4% smaller than that of scheme 1, respectively. Due to the reduction in cross-sectional area, the excavation and filling of the canal will also be reduced. According to the results, the application value of genetic algorithms is highlighted in the solution of the channel optimization problem. The optimization results can not only provide a reference for water price reform but also save project land occupation and project investment. Therefore, under the U-shaped part, scheme 2 is the optimal scheme. By comparing the optimal schemes of the trapezoidal section and the U-section, it can be found that the water supply cost of the U-section is low. Therefore, under the condition of layout scheme 2, the U-shaped section is the best scheme. The calculation shows that under the same conditions, the trapezoidal section area is about 45% larger than the U-shaped section area. Although trapezoidal section is adopted in the original project, U-shaped section is recommended when construction conditions permit.


## 4. Conclusion

In this paper, we propose a research study on the optimization technology of the irrigation canal system based on the genetic algorithm and develop an irrigation channel optimization model with the lowest water supply cost, which is an objective function. Through flexible application software, programming and optimization is effectively reduced. At the same time, the calculation accuracy is guaranteed through real number coding so as to quickly obtain the optimization results. Taking the water-saving reconstruction project of the irrigation area as an example, the established optimization design model of the irrigation canal system is optimized and solved by software, and the engineering example is optimized under the conditions of trapezoidal and U-shaped sections. Under the two layout schemes, the optimal solutions of trapezoidal and U-sections are obtained. It is determined that the U-section is the best scheme under the condition of layout scheme 2. The genetic algorithm has faster integration speed and better comprehensive performance in solving such optimization problems. In addition to the channel system, the factors affecting the project investment also include the drainage system. The future research direction can further optimize the structure, mode, and section size of the drainage system on the premise of analyzing the drainage volume and drainage area.



---

*Source: 8687532-2022-08-08.xml*