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.
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.where is the flow penalty coefficient, is the speed penalty coefficient, and 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 mutation will produce a new gene to replace the original human gene. The selection of variant genes and their locations is random. = 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 Figure 1:

Through the calculation method of total cost, the specific formula is as follows:
Operating costs include all other expenses except for depreciation of fixed assets, namely
(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: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); is the number of branch channels, 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):where is the design bottom width, m; is the design water depth, m; is the increased water depth, m; is the inner slope coefficient, and is the lining thickness, m; is the outer slope coefficient, and the river length is m; is the unit price of lining, , D is the width of embankment top m, is the filling coefficient considering soil settlement, and is the excavation depth M.
The calculation formula of is shown in
According to different channel materials, the width of embankment top is divided into
The calculation formula of the U-shaped section is shown in (9) and (10):where is the straight arc angle, r is the arc radius m, is the water depth m, is the coefficient, is the unit price of lining /yuan, is the unit price of lining /yuan, and is the length of river channel M.
Considering the above two situations, the calculation formula for calculating depreciation expense is as follows:where Z is the residual value of equipment, 3% in this paper, and 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 aswhere 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):where E is the unit price of electricity, yuan/kWh, is the annual working time of the water pump, H, and is the installation efficiency of the water pump, .where is the utilization coefficient of irrigation water, t is the daily irrigation time, and is the comprehensive net irrigation quota, .
The calculation formula of water resources fee 0 is shown inwhere e is the unit price of water resources fee, yuan/ ; S is the irrigation area, .
2.4. Constraints
2.4.1. Flow Constraint
Check the water delivery capacity of the channel. See formula (14)as follows:
2.4.2. Speed Constraint
The flow velocity in the channel shall meet the flow velocity without scouring and sedimentation, as shown in formula:where is the minimum speed allowed in the channel, M/S; is the maximum speed allowed in the channel, M/s.
Trapezoidal calculation formula is shown in
The U-shape calculation formula is shown in the following formula:
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:where is the minimum value of width depth ratio; is the maximum width depth ratio.
See (21) for the trapezoidal calculation formula:
The U-shape calculation formula is shown in the following formula:where camber angle of straight line, (°); r is the arc radius, m. is the coefficient when ; 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 Table 1. The channel includes three-stage channels: middle, split, and bucket, and there are two schemes in total.
The optimization results under the trapezoidal section are shown in Figures 2 and 3.


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 Table 2.
The premise is that the basic hydraulic conditions of the channel section and the constraints of the optimization algorithm are met. From the comparison in Table 2, 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 Figures 4 and 5.


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 Table 3.
On 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 Table 3 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.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare no conflicts of interest.
Acknowledgments
This research study was sponsored by Basic Research and Text Compilation of Sichuan Tongjiyan Application for World Irrigation Engineering Heritage (transverse20210051).