Abstract
Keywords
Introduction
It is a unified gas supply system where gas is collected from the wellhead,1,2 gathered, transported, and purified by the mine, put into the long-distance gas mains, transported to the large industrial users, or transported to the city’s natural gas users through all levels of the city gas distribution network.3,4 With the wide application of natural gas and the large-scale size of natural gas pipeline network, natural gas business sectors need to optimize the city’s natural gas pipeline network in order to increase economic efficiency and maximize the use of natural gas pipeline network; 5 therefore, how to set up the optimization and simulation of gas distribution network system is a very important research topic.
At present, the methods of the optimization research of natural gas pipeline network have been mainly including two categories: one is the regression method including stochastic, 6 interval analysis approach, 7 linear programming, 8 a sequential quadratic method, 9 a non-sequential dynamic method, 10 a bilevel programming method, 11 and economic nonlinear model; 12 the other is the intelligent method. 13 In previous work, 14 adaptive particle swarm optimization (PSO) algorithm was presented to optimize the natural gas pipeline. In that paper, the weight value of each single objective function was determined by AHP and the optimization model of dendritic natural gas named IAPSO was established. The results show that the model built has faster convergence speed and higher precision than those of the other four PSO algorithms, and better achievements are obtained.
In previous works,15,16 an adaptive genetic algorithm was evolved to optimize the operation of city natural gas pipeline network. The mathematical optimization model of city natural gas pipeline network was established including objective function and constraint condition, and a case study was given and good results were achieved; in the work by Peipei et al., 17 the objective function is the minimum cost of operation and pipeline construction and the constrained conditions are steady-state analysis of pipeline, flow rate, pressure of each node, pressure limit of pipeline, and so on. The optimization model of city natural gas pipeline network was established. According to the structural characteristics of the natural gas pipeline network, genetic algorithm is taken to construct the important fitness function of the genetic algorithm, and the method of pipeline coding is given. The programming example shows that the genetic algorithm is a desirable method in the field of natural gas pipe network optimization. In the work by Enbin et al., 18 the objective function is the total cost of pipeline construction and the constrained conditions are steady-state analysis of pipeline, flow rate, pressure of each node, pressure limit of pipeline, and so on. The optimization model of city natural gas pipeline network was established. This model belongs to the nonlinear discretization optimal combination problem. The genetic algorithm is used to solve the problem, and the solving process is presented and good results are achieved. Although genetic algorithm plays an important role in the optimization model solving of city natural gas pipeline network, there are the following shortcomings: 19 (1) there are too many ways to adjust the fitness value but there is not a concise and general method. It is not conducive of using genetic algorithms. (2) Early maturity of genetic algorithm, which means that quickly converges to the local optimal solution instead of the global optimal solution, is the most difficult key issues to deal with so far now. (3) When it is approaching the optimal solution, it is always around the optimal solution and converges slowly. Aiming at the shortcomings of genetic algorithm, two improvement strategies are proposed in this article: (1) a new formula for the fitness value is presented; (2) a new calculation formula of crossover mutation probability of dynamically adjusting individual is evolved to obtain shorter calculation time and higher precision.
The remainder of this article is organized as follows. In section “Establishment of mathematical model for optimal operation of natural gas pipeline network,” mathematical optimal model of natural gas pipeline network operation is established; in section “Basic genetic algorithm and improved genetic algorithm,” basic genetic algorithm and the improved genetic algorithm are put forward; in section “Case analysis,” case analysis is discussed; in section “Conclusion,” conclusion is introduced.
Establishment of mathematical model for optimal operation of natural gas pipeline network
The optimal operation of city natural gas pipeline network determines the transmission and distribution of gas program under the premise of given pipe network system, certain resource conditions, different sales prices, and different user requirements. The program maximizes the effectiveness of the operations or determines the maximum gas transmission capacity of the natural gas pipeline network. It means to determine the volume of gas to be allocated to each user and the volume of gas purchased into the gas production sector, so as to let the operating department get the largest operating income or the largest pipe network gas and make full use of the value of natural gas and pipeline transportation capacity.20,21 Objective functions and constraints of city natural gas optimization are described in detail in sections “Objective functions” and “Constraints.”
Objective functions
where
where
Constraints
where
where
where
where
where
where
where
where
In summary, optimization variables of natural gas pipeline network include pipe network node pressure, input (output), and compressor power. Assume that the optimization variable is denoted by
The optimization problem can be written as a standardized optimization model
where
Basic genetic algorithm and improved genetic algorithm
Basic genetic algorithm
Genetic algorithm20,21 is a bio-intelligence optimization algorithm, which is essentially a violent searching optimization technology. It is that a certain number of populations, which are selected from a randomly generated solution in accordance with certain rules of operation, gradually iterate to produce better and better approximation solution by means of natural genetics of choice, crossover and mutation, and so on. In each iteration, according to the individual fitness degree and the survival of the fittest principle, the search process is guided to approximate the optimal solution and ultimately a new set of representatives of the solution are produced, which can be treated as the optimal approximation solution or satisfaction solution.
The workflow and structure of the basic genetic algorithm are shown in Figure 1. Its running process is a typical iterative process, and it must complete the work. The basic steps are as follows:
Select the coding strategy and transform the parameter set space into the encoded individual space.
Define the fitness function according to the actual problem.
Identify genetic strategies including population size, selection, crossover and mutation methods, as well as determine the genetic parameters such as selection probability, crossover probability, and mutation probability.
Random initialization generates the initial population.
Calculate the fitness of the individual code string in the current population after decoding.
Use selection, crossover, and mutation operators on the group in accordance with the genetic strategy to form the next generation of population.
Determine that whether the population performance is to meet a certain target or complete the scheduled number of iterations in order to output the best individual, exit. If it is not satisfied, then return to (6).

Process of genetic algorithm.
Improvement in genetic algorithm
The fitness value of a special individual in the initial population is extraordinary (such as large). In order to prevent it from ruling the whole group and misleading the development direction of the group and make the algorithm converge to the local optimal solution, it is necessary to limit its breeding. At the end of the calculation, when the genetic algorithm is gradually converging and because the individual fitness value in the group is relatively close, it is more difficult to continue to optimize the selection result as it swings around the optimal solution. At this point, the individual fitness value should be amplified to improve the selection capacity, which is the fitness value of the calibration.
About calibration for fitness values, this chapter presents the following formula
where
The selection of the crossover probability
For the crossover probability
For the mutation probability
Adaptive genetic algorithm maintains the diversity of groups and ensures the convergence of genetic algorithms. The following two formulas can be used to dynamically adjust the crossover and mutation probabilities of an individual
Case analysis
Figure 2 shows a medium pressure of natural gas pipeline network. There are two gas sources of this pipeline network, the input pressure is 0.04 MPa, the pressure of each node on the pipe network is required not less than 0.01 MPa, and the relative density of natural gas is 0.75. Pipeline data and basic data of pipe network node are shown in Tables 1 and 2.

Branch of city natural gas pipeline network.
Pipeline data.
Node data.
Parameter analysis of the improved genetic algorithm
When the crossover probability is 0.6, the mutation probability is 0.1; in order to compare the effects of different improved genetic algorithm parameters on the optimization results, we assume that the number of evolution is 30. When the population size is changed, the variation range is [10, 100], and a value is taken in each interval of 10, that is, 10, 20, 30, 40, 50, 60, 70, 80, 90, and 100. Figure 3 shows the curves of the maximum benefit and maximum flow changing with population size. As is shown in Figure 3, maximum benefit and maximum flow increase gradually with an increase in the population size. When the population size is 100, the maximum value is reached.

Changes in maximum benefit and maximum flow with the changing of population size.
When the crossover probability is 0.6, the mutation probability is 0.1; in order to compare the effects of different improved genetic algorithm parameters on the optimization results, we assume that the population size is 100. When the number of evolution is changed, the variation range is [5, 50], and a value is taken in each interval of 5, that is, 5, 10, 15, 20, 25, 30, 35, 40, 45, and 50. Figure 4 shows the curves of the maximum benefit and maximum flow changing with the number of evolution. As is shown in Figure 4, in the range of [5, 30], maximum benefit and maximum flow increase gradually with an increase in the number of evolution. When the number of evolution is 30, the maximum value is reached. In the range of [30, 50], maximum benefit and maximum flow decrease gradually with an increase in the number of evolution. When the number of evolution is 50, the minimum value is reached; therefore, when the number of evolution is 30, maximum benefit and maximum flow get to maximum.

Changes in maximum benefit and maximum flow with the changing of number of evolution.
Comparison of different optimization algorithms
In order to verify the effectiveness, calculation accuracy, and calculation time of improved genetic algorithm, in this section, the basic genetic algorithm is compared with the improved genetic algorithm. Basic parameter settings of the improved genetic algorithm and of the basic genetic algorithm are that the population size is 100, the number of evolution is 30, the crossover probability is 0.6, and the mutation probability is 0.1.
Table 3 shows the comparison of results of the basic genetic algorithm and improved genetic algorithm. As can be seen from the table, the maximum benefit and maximum flow rate are increased by 3.09%, 1.61%, 5.98%, and 2.44%, respectively. And the results verify the effectiveness of the improved genetic algorithm.
Comparison of results of two algorithms.
Conclusion
The optimal operation of city natural gas pipeline network is a multi-objective and multi-constraint problem. In this article, optimal operation model of the city natural gas pipeline network is established on the basis of previous studies. Aiming at the shortcomings of the basic genetic algorithm, we propose two improved strategies: (1) a new calculation formula for the fitness value is presented. (2) A new calculation formula aiming at crossover and mutation probabilities of dynamically adjusting individual is created to obtain shorter calculation time and higher precision. In addition, a medium-pressure pipe network is taken as a study example. Compared with the basic genetic algorithm and the non-optimized genetic algorithm, the maximum benefit and maximum flow rate of the improved genetic algorithm are increased by 3.09%, 1.61%, 5.98%, and 2.44%, respectively. The results show that the improved genetic algorithm has better applicability in the optimal operation of natural gas pipeline network.
