Abstract
An improved mayfly algorithm is proposed for the energy saving optimization of parallel chilled water pumps in central air conditioning system, with the minimum energy consumption of parallel pump units as the optimization objective and the speed ratio of each pump as the optimization variable for the solution. For the problem of uneven random initialization of mayflies, the variable definition method of Circle chaotic mapping is used to make the initial position of the population uniformly distributed in the solution space, and the mayfly fitness value and the optimal fitness value are incorporated into the calculation of the weight coefficient, which better balances the global exploration and local exploitation of the algorithm. For the problem that the algorithm is easy to fall into the local optimum at the later stage, a multi-subpopulation cooperative strategy is proposed to improve the global search ability of the algorithm. Finally, the performance of the improved mayfly algorithm is tested with two parallel pumping system cases, and the stability and time complexity of the algorithm are verified. The experiments show that the algorithm can get a better operation strategy in solving the parallel water pump energy saving optimization problem, and can achieve energy saving effect of 0.72% 8.68% compared with other optimization algorithms, and the convergence speed and stability of the algorithm have been significantly improved, which can be better applied to practical needs.
Keywords
Introduction
With the improvement of people’s living standards and the demand for indoor comfort, the central air conditioning system has gradually become an essential air conditioning equipment for large public buildings. The parallel form of multiple chilled water pumps is a typical structure of the central air conditioning system [1]. As the main energy consuming equipment of the central air conditioning, the parallel water pumps account for about 25% to 30% of the total energy consumption of the central air conditioning. It has a lot of room for energy conservation and consumption reduction, and in recent years, the energy-saving operation of pumps has received increasing attention [2]. Under the condition of ensuring the indoor load demand and the safe operation of the system, according to the end load and temperature demand, it is necessary to quantitatively change the chilled water flow to achieve the purpose of energy saving and consumption reduction. Because different types of pumps have different equipment parameters, the start and stop state and speed of pumps can be adjusted to meet different pipe network flow requirements. Therefore, how to reduce the operating energy consumption of pumps and improve the operating efficiency of parallel pumps has become an important research content of building energy conservation in recent year.
Researchers have adopted many methods to solve the optimal allocation of the speed ratio and the number of running units of parallel variable-frequency pumps. The commonly used methods are mathematical programming and meta heuristic algorithm.
Literature [3, 4]calculates the power consumption of the pumping system by establishing the mathematical model of the operation of two parallel water pumps and using three methods of flow control: with the minimum energy consumption and the maximum reliability, trade-off control between efficiency and reliability. Literature [5] proposed a new decentralized control estimation algorithm of log linear model under a new decentralized control framework for the Centralized Optimal Scheduling of parallel water pumps in central air conditioning systems. A new generation of population is generated based on the random sampling method of log linear probability model, and the parameters of the probability model are updated based on the dominant population. In the optimization process, each pump is optimized by exchanging information with adjacent pumps. The results show that, The algorithm is an efficient decentralized optimization algorithm with good versatility and scalability, which can optimize the operation strategy of the same type of parallel pump and achieve the purpose of energy saving. Literature [1] established the analysis model of parallel water pump units, studied five control strategies in detail for four identical parallel water pumps, analyzed the strategies under different pressure differences, and proposed a hybrid control strategy combining single pump frequency conversion and power frequency pump volume control, which is most suitable for variable flow chilled water systems with low flow ratio or high supply and return water pressure difference. Literature [6] proposes a prediction algorithm for parallel operation of variable speed pumps (VSP) in steady-state operation, so that its operation is close to the best efficiency point (BEP) of the pump, and solves the complex optimization task of maximizing the total efficiency of the pump system and minimizing energy consumption. Reference [7] studies a steady-state operation prediction algorithm for all the same variable-speed pump sets close to the pump’s best efficiency point (BEP). Predict the start and stop state of the water pump according to the required pressure and variable flow demand. The best pump working (Q, H) area, the most effective combination between Q, H and different pump numbers and the boundary between them are calculated and visualized. It provides a simple programmable input for the pump station control system, and takes the existing pump station as an example to illustrate the application of the algorithm.
Literature [8] established an optimization model of the parallel pump system. In order to obtain the optimal number of pumps turned on and speed of the pump, particle swarm optimization algorithm was used to improve the working point of the parallel pump, effectively reducing the system power consumption of the parallel pump and improving the reliability of the pump unit. Literature [2] designs a parallel pump system, establishes the pump optimization model under different load requirements, takes the maximization of pump efficiency as the goal, and adopts genetic algorithm to obtain the optimal output data of pump speed and valve position, which effectively improves the efficiency and reliability of the pump. Literature [9] proposes a distributed control structure for parallel water pumps. The main controller is replaced by multiple independent distributed controllers. These controllers cooperate with each other to deal with global tasks, and the artificial fish swarm algorithm is transplanted to the proposed controller to optimize the operation of parallel water pumps. The proposed algorithm is compared with other common heuristic algorithms in terms of effect and stability. The results show that, The distributed artificial fish swarm algorithm has obvious advantages in computational efficiency and accuracy. Literature [10] proposed a distributed optimal control algorithm for the start and stop status and flow setting value of parallel water pumps. First, in order to process network information, the breadth first search algorithm was applied to build a tree for message exchange. Second, all nodes coordinate with each other and randomly sample the speed ratio. The algorithm solves the optimization problem of parallel water pumps in a distributed way. Experiments show that the algorithm strictly meets the demand constraints, and shows good energy-saving potential, convergence guarantee and flexibility. Literature [11] proposed an asynchronous distributed control algorithm with convergence guarantee for parallel water pumps in air-conditioning systems. Under bounded delay, the algorithm makes optimal control decisions for the water pumps to minimize the energy consumption of the water pumps when meeting the system requirements. Numerical simulations were carried out on six parallel pumps under different working conditions. The results show that the method strictly meets the constraints and minimizes the system energy consumption, making full use of parallel computing resources, The asynchronous method runs nearly 46% faster than the synchronous setting. Literature [12] models the cooling water circuit composed of cooling tower, cooling water pump and heat exchanger, and uses particle swarm optimization algorithm to fit the model to the actual industry data, so as to achieve the purpose of system energy-saving optimization.
To sum up, the mathematical programming method [13] and meta heuristic algorithm [14] have good results in solving the optimal configuration of parallel pumps. However, the mathematical programming method can not fully consider the actual situation of the central air-conditioning system, and the accuracy of the solution is not high; Most meta heuristic algorithms have the problems of slow convergence speed and low search efficiency [15]. Therefore, it is of great significance to study an intelligent algorithm with fast convergence speed and high search accuracy for solving the optimal configuration of parallel pumps.
Mayfly algorithm [16] (mayfly algorithm, MA) is a new swarm intelligence algorithm proposed by Konstantinos zervoudakis and Stelios tsafarakis. Inspired by the flight behavior and mating process of mayflies, this algorithm has better convergence speed and accuracy than other swarm intelligence algorithms, And the random flight and wedding dance behavior in the algorithm can effectively balance the global exploration and local search requirements of the population.
Literature [17] applies MA algorithm to UAV track planning, using exponentially decreasing inertia weight, adaptive Cauchy mutation and improved crossover operator to effectively search the best flight path. Literature [18] adopts the modified MA algorithm to effectively optimize the combined cooling, heating and power system, which improves the fuel consumption, cost and carbon emission of the system to the greatest extent compared with the separated power generation system (SGS). Literature [19] uses multi-objective MA algorithm to evaluate the performance of voltage stability index in multi-objective optimal power flow of modern power system. The results show that this method has achieved the optimal system performance and the lowest system cost and loss in terms of reducing system generation cost, reducing transmission loss and simulation time under normal and emergency conditions. Reference [20] uses chaotic MA algorithm to optimize the model parameters of proton exchange membrane fuel cell (PEMFC). The results show that chaotic mapping eliminates the possibility of local minima, thereby improving the accuracy of the algorithm. Chaotic MA algorithm is an effective method to estimate the parameters of PEMFC model. Literature [21] aims at the fact that the traditional photovoltaic array maximum power point tracking (MPPT) is easy to fail in complex environments, and the existing intelligent optimization algorithm has shortcomings such as slow convergence speed, low convergence accuracy, poor stability and so on. MA algorithm is used to track the maximum power point (MPP) of photovoltaic system through two populations. Experiments show that this method can quickly and accurately track the MPP of photovoltaic system under complex environmental conditions. Literature [22] proposed an optimization method of MA algorithm to solve the antenna array synthesis problem, which improves the optimization performance of pattern synthesis of uniform sparse linear array. The results show that MA algorithm has significant effects in null control and convergence speed. To sum up, mayfly algorithm has a significant effect in solving the optimization problem. Solving the flow distribution problem of parallel pumps is a continuous optimization problem. To sum up, mayfly algorithm has a significant effect in solving the continuous optimization problem. Therefore, this paper uses this algorithm to solve the optimal configuration problem of parallel pumps.
Similar to all meta heuristic algorithms, MA algorithm cannot adaptively adjust the relationship between local exploration and global development in the process of implementation, and is easy to fall into local optimal solution. In addition, due to the guiding effect of population optimization (gbest) and individual optimization (sbest) on mayfly population, the randomness of mayfly population distribution in the solution space is reduced, which reduces the search efficiency of the algorithm. In view of this defect of MA algorithm, this paper improves the initialization, inertia weight and population classification of MA algorithm, and an improved mayfly algorithm (IMA) algorithm is proposed.
The improved mayfly algorithm has excellent energy saving effect in solving the energy saving optimization problem of parallel water pumps in central air-conditioning system. Through experimental verification, compared with GA, PSO, DE and other common algorithms, the energy saving effect of IMA algorithm can reach 1.86% 8.68%. At the same time, the stability and time complexity of the algorithm are also verified and analyzed to ensure that the stability and time consumption of the algorithm are equal to or even better than those of the Ephemera algorithm before improvement, while the convergence accuracy is improved. Therefore, the IMA algorithm proposed in this paper can be well applied to practical engineering problems, and is an effective method to reduce energy consumption in central air-conditioning systems.
Problem description
The parallel water pump unit is composed of two or more water pumps, and its connection mode is shown in Fig. 1. The rotation speed ratio of a single water pump of the water pump unit can be adjusted to reasonably adjust the rotation speed ratio of each water pump under the condition of meeting the head required for operation and the overall flow demand of the pipe network, so as to minimize the total energy consumption of the whole parallel water pump unit.

structure diagram of air conditioning cold station system.
Each pump has different energy consumption characteristics and equipment parameters, and the actual operation characteristics of the same type of pump are different due to historical operation characteristics and installation conditions. Therefore, the flow task should be reasonably allocated according to the performance of different pumps. By adjusting the speed ratio of variable frequency pumps, the flow demand of the whole pipe network can be allocated to each pump to meet the water flow demand of the air conditioning system.
The mathematical notations used in this paper are shown in Table 1.
Mathematical notations related to the text
When the parallel inverter pumps take fixed differential pressure control, the differential pressure H at both ends of the pumps is not equal to the differential pressure setting value H
set
, the pump speed needs to be adjusted to meet the end demand flow rate Q
S
. The relationship between flow rate and pressure head in the pipe network system when the parallel pumps are working is shown in equation [9]:
Where, S is the resistance of the pipe network and Q S is the total flow required by the system,m3/h; Q is the actual flow of the water pump.
When the pump operates at the rated speed, its head-flow curve and efficiency-flow curve can be expressed as the following quadratic curve.
Among them, a,b,c,j,k,l is the operating parameters of the water pump, and Q0, H0, η0 is the flow, head and efficiency of the water pump under the rated state.
When the pump speed changes, according to the similarity of the pump, its performance parameters change as follows [23]:
Where, Q i , H i , η i and n i respectively represent the actual flow, lift, efficiency and speed of each pump, and n0 is the rated speed of the pump.
The speed ratio of the i water pump is expressed in ω ;
i
, which is expressed as formula (4):
When the water pump operates at any speed, substituting Equation (3) into Equation (2) includes:
The power of the water pump unit can be determined by the head and speed ratio of each water pump:
Where, P is the output power of the whole water pump unit, kW; n is the number of parallel water pumps.
It can be seen from Equation (5) that the head flow curve of the pump under a certain speed ratio is a parabola with the opening downward. In order to make the quadratic equation have a real number solution, that is, the pump meets the flow head demand at the current speed, the following constraints are put forward, otherwise the pump is shut down:
For the configuration optimization of parallel water pumps, it can be described as the combination of pump speeds that minimize the energy consumption of the pump unit under the condition of meeting the required flow Qs of the system. The optimization problem can be summarized into the mathematical description of Equation (9), as follows:
Basic principle of mayfly algorithm
Mayfly optimization algorithm is one of the biological heuristic algorithms for optimization problems [24]. Initially, two groups of mayflies were randomly generated, representing male and female populations respectively. That is, each mayfly is randomly placed in the problem space as a candidate solution x = (x1, …, x d ) represented by a d-dimensional vector. And its performance is evaluated according to the predetermined objective function f(x). The velocity v = (v1, …, v d ) of a mayfly is defined as the change of its position. The flight direction of each mayfly is the dynamic interaction of individual and social flight experience. In particular, each mayfly will adjust its trajectory to the best position of the individual so far (pbest), and the best position obtained by any mayfly in the group so far (gbest).
Movement of male mayflies
The aggregation of male mayflies in groups means that the position of each male mayfly is adjusted according to the experience of itself and its neighbors. Assuming that
Male mayflies they move constantly. Therefore, the velocity of male mayflies is calculated as follows:
Where
Unlike males, female mayflies do not flock. They fly to males to breed. Suppose
Since the attraction process is stochastic, it is decided to model it as a deterministic process. That is, according to their health attributes, the best female should be attracted by the best male, and the second best female should be attracted by the second best male. Therefore, considering the minimization problem, the velocity is calculated as follows:
Where
The crossover operator represents the mating process of two mayflies: a parent is randomly selected from the male and female populations, and the female mayflies mate to produce offspring. The result of crossing is two offspring, which produce the following:
Where male is the male parent, female is the female parent, and offspring is the offspring mayfly. L is the random factor of [-1,1].
MA algorithm introduces Gaussian mutation and mutations occur in a random dimension for the offspring mayfly. If the number of mayfly population is N, define the mutation probability m, and the number of mutations in the offspring is N•m. The variation formula is:
Among them, offspring n is the nth dimension of variant mayfly, σ is the standard deviation of normal distribution, N n (0,1) is the standard normal distribution with mean value of 0 and variance of 1.
Similar to all meta heuristic algorithms, MA algorithm cannot adaptively adjust the relationship between local exploration and global development in the process of implementation, and is easy to fall into local optimal solution. In addition, due to the guiding effect of population optimization (gbest) and individual optimization (sbest) on mayfly population [25], the randomness of mayfly population distribution in the solution space is reduced, which reduces the search efficiency of the algorithm [26]. Aiming at this defect of MA algorithm, the initialization, inertia weight and population classification of MA algorithm are improved, and an improved mayfly algorithm (IMA) is proposed.
When applying the improved mayfly algorithm to solve the flow distribution problem of parallel pumps, the minimum energy consumption of parallel pumps is the optimization goal, the speed ratio of each pump is the optimization variable, and the flow demand of the pipe network is the constraint condition. The specific steps of the algorithm are shown in Fig. 2.

IMA algorithm flow chart.

Effect diagram of different initialization methods.
Initialization
In MA algorithm, the positions of each dimension of mayfly individuals are randomly generated during initialization, which will lead to uneven distribution of the initial population in the solution space, low coverage and low differences between individuals. The distribution effect of randomly initialized mayflies is shown in Fig. 2(a), (b). Using chaotic map to initialize population can effectively improve this kind of problem. Its principle is to use the unpredictability and aperiodicity of chaos to map variables into the chaotic space [27], and finally linearly transform the solution into the optimal variable space. At present, the common chaotic mapping methods include Circle chaotic mapping [28], Tent chaotic mapping [29] and Logistic [30] chaotic mapping. The experiment shows that the Logistic algorithm has low efficiency, poor convenience, and is sensitive to the initial parameters. The density of the edge position of the mapping point is high and the density of the middle area is low, leading to low efficiency and poor convenience of the algorithm. The Tent map has better uniformity than the Logistic map, but the period of the chaotic sequence of the Tent map is smaller and the period point is uncertain. The Circle map has a simple structure, the distribution density of the results presented by the map is relatively uniform, and has good ergodicity. Comprehensively considering the operation characteristics of parallel pumps, this paper applies the Circle mapping method to the initialization of IMA algorithm. To solve the problem of non-uniform distribution of chaotic values of Circle map, this paper improves some parameters of Circle map formula to make its chaotic value distribution more uniform.
Solving the flow distribution problem of parallel pumps is a continuous optimization problem. It is set that the position of each mayfly individual is represented by the sequence combination of the speed ratio of each pump in the pump unit, that is ω
i
= xi,j, each mayfly individual represents a feasible solution to the flow distribution problem of parallel pumps, and at the same time, it is necessary to meet the predefined range of the pump speed ratio:
At the beginning of the algorithm, initialize the initial value of group M mayfly operators, Let xi,j = (xi,1, xi,2,…, xi,j,…, xM,D) (1 ≤i≤M,1 ≤j≤D) be the current position of the ith mayfly, and the initial mayfly expression of the original Circle chaotic map is:
Where M is the population density, D is the dimension of the solution space, xi,j is the component of the i -th mayfly in the j-dimensional space, and b i is the chaotic variable, bi∈ (0,1). The mapping distribution diagram and frequency distribution diagram are shown in Fig. 2(c), (d). It can be seen that the distribution of Circle chaotic mapping values is relatively concentrated in the interval [0.1,0.5]. Therefore, the parameters of the Circle mapping formula are adjusted to meet the requirements of initializing the uniform distribution of mayflies. The mapping distribution diagram and frequency distribution diagram are shown in Fig. 2(e), (f).
The Circle chaotic mapping expression after parameter improvement is:
Use the following formula to generate the speed ratio sequence value of N groups of water pump units:
Where, j ∈ (1, D) , i ∈ (1, M), b i are chaotic random variables.
It can be seen from the comparison of the following figure that the initial population generated by the improved Circle map is more evenly distributed than the randomly initialized population and the population of the original Circle map. The mayfly population has a larger search range in the solution space, which increases the diversity of population positions, and improves the algorithm in terms of being easy to fall into local optimization problems and improves the search efficiency of the algorithm.
The speed and position update of mayfly individuals is the core content of this algorithm, but the traditional method only updates mayfly’s individual optimization and global optimization, which will lead to the imbalance of the algorithm’s global exploration and local development capabilities [31]. In order to better control the balance between mayfly’s global exploration and local development capabilities, dynamic inertia weight coefficients are introduced. Therefore, the speed update of male mayfly is modified as follows [16]:
The speed update formula of female mayflies is modified as follows:
At present, the adjustment strategy for the inertia weight coefficient is mainly the dynamic adjustment of the coefficient in order to adapt the nonlinear iteration rule of the algorithm [32], and the adjustment process has a strong correlation with the number of iterations of the algorithm. However, the inertia weight coefficient decreases nonlinearly only with the increase of the number of iterations, that is, the larger inertia weight at the beginning of the iteration maintains the global search ability of the algorithm, and the smaller inertia weight at the end of the iteration maintains the local development ability of the algorithm, but the inertia weight decreases monotonously during the iteration process, which cannot adapt to the repeated fluctuations of mayfly individuals. For example, in the late stage of iteration, for poor mayflies with large fitness and far away from the optimal solution, a larger inertia weight coefficient should be given to enhance the global search ability of mayfly individuals, but at this time, the inertia weight coefficient has been reduced to a smaller value, resulting in the slow update speed of poor mayflies, making the algorithm unable to find the optimal solution quickly. In addition, the traditional inertia weight coefficient adjustment strategy in an iteration cycle, because the inertia weight is only related to the number of iterations, the inertia weights of mayfly individuals are equal in one iteration, which reduces the diversity of mayfly population, resulting in the algorithm can not converge quickly.
In order to make up for the above defects, this paper proposes the following inertia weight update strategy:
Where gmax and gmin respectively represent the maximum and minimum values of inertia weight, f
i
represents the fitness value of the current mayfly individual, f
p
represents the historical optimal fitness value of the current mayfly individual, and
The improved inertia weight method introduces the individual fitness value and the optimal fitness value of mayflies, and solves the problem that the inertia weights of different mayflies are the same in an iteration cycle and the inertia weights only decrease monotonically with the number of iterations. In addition, due to the strong correlation between the inertia weight and the fitness value, when the mayfly position is in the optimal solution range, the inertia weight is adjusted to a very small value according to its update formula, so as to strengthen the local development ability of the mayfly individual and realize rapid and accurate optimization. In addition, in the same iteration cycle, different mayflies have different inertia weights according to their own fitness values, so as to enhance the diversity of mayfly speed update and improve the optimization efficiency of the algorithm. If the mayfly individual approaches the optimal solution in the middle of the iteration, the improved inertia weight method avoids the problem that the mayfly deviates from the limit range of the optimal solution due to the large inertia weight of the traditional method, speeds up the mayfly search time, and makes the algorithm converge quickly.
Figure 4 is a schematic diagram of inertia weight updating of a group of female mayflies with a population size of 200 at the initial stage of iteration. From the diagram, it can be seen that the inertia weight updating strategy proposed in this paper has a strong correlation with the fitness value, the updating trend of inertia weight coefficient has a good tracking relationship with its fitness value, and different mayflies have their own independent inertia weight coefficients in the same iteration times, The fitness value of different mayflies determines whether their task is global exploration or local development, which greatly improves the search efficiency of the algorithm.

Correlation diagram between mayfly fitness value and inertia weight.
In order to further improve the convergence speed and accuracy of the algorithm, avoid the algorithm falling into the local optimal solution, and enhance the global search ability of the algorithm, this paper introduces a multi subpopulation collaborative strategy, that is, the entire mayfly population is divided into four subpopulations, and the best mayfly sbest of each subpopulation is used to reflect the evolution state of the subpopulation. If the sbest can gradually approach the optimal solution according to the increase of the number of iterations, the subpopulation will evolve independently, There is no need to communicate with other subpopulations [33]. The stop detector is introduced. If there is evolutionary stagnation in the subpopulations, the activation samples are generated through the information interaction between multiple groups to promote the stagnant subpopulations to continue to search for optimization. In addition, in order to avoid the premature convergence of the algorithm caused by the premature aggregation of subpopulations, the subpopulation exclusion mechanism is introduced.
Multi subpopulation collaborative strategy is to achieve the purpose of coevolution through information interaction between subpopulations [34], and enhance population diversity [35].When a subpopulation falls into a local optimal solution, blind information exchange will lead to adverse information spreading among other subpopulations, and premature convergence is easy to occur. Therefore, in the multi group cooperative strategy, the detection of the evolution state of subpopulations is particularly important. The algorithm can judge whether the evolution stagnation of subpopulations occurs according to the detection results, and then activate the stagnation subpopulations to re evolve, The best mayfly of each subpopulation (sbest j , j = 1, 2, …, H, Where H is the number of subpopulations) represents the state of subpopulation j, The sbest of the optimal subpopulation represents the optimal value of the population, that is sbest j = gbest. The stagnation detection counter judges the evolution state of the subpopulation by detecting the best mayfly sbest of the subpopulation, If the sbest j is in the status of update stagnation, sbest j can not guide the subpopulation to continue to explore the optimal solution, but other mayflies within the subpopulation will gradually approach sbest j , resulting in the algorithm falling into local optimal solution. To avoid this kind of situation, the stagnation counter θ is introduced. When the stagnation times of the subpopulation exceed the threshold Theta, the activation samples will be constructed through the information interaction between the stagnation subpopulation and the optimal subpopulation. The specific method is shown in Fig. 5. When the sbest j is in the continuous update state, such subpopulations do not need to intervene and turn off the stagnation detection counter.

Flow chart of building activation samples.
1) Build activation samples
Activating the stagnant subpopulation, which can continue to explore in other areas of the solution space, is conducive to improving the diversity of mayfly population and the global search ability of the algorithm. Use the crossover mutation operator [36] to exchange information between the group optimal solution (gbest) and the stagnant subpopulation:
Where r
d
is the random mutation factor within the range of [0,1], Even if gbest cannot be updated automatically, the mutation factor is introduced to make the active sample become the mutation sample of gbest, which helps the algorithm jump out of the local optimization.
2) Exclusion strategy
In order to fully explore all potential solutions in the solution space, mayflies should be dispersed in the solution space as much as possible, and each mayfly subpopulation should explore different spaces. Therefore, the improved Circle chaotic mapping method is used in the initialization of the algorithm, and good results are achieved. However, with the increase of the number of iterations, other subpopulations will gather together prematurely under the guidance of the optimal solution, which will reduce the search efficiency of the algorithm, and may even lead to the local optimization of the algorithm.
In order to avoid premature aggregation of mayflies, this paper introduces a subpopulation exclusion strategy. When the mayflies of other subpopulations approach the optimal solution, the mayflies will be excluded,. The current optimal subpopulations continue to be explored and are not affected by the exclusion strategy.
Where, r
d
is a random number within the range of [0,1]. Because the repulsive region of mayfly must be within the search range of feasible solution.Therefore, the upper and lower bounds

Exponential function in Equation (26).

Schematic diagram of multi subpopulation collaboration strategy structure.
To visually describe the overall flow of the IMA algorithm, the pseudo-code of the algorithm is attached below.
Test cases
This paper selects the flow distribution of two typical chilled water circulating pump systems for air conditioning as the research object to verify the performance of IMA algorithm. The system in case 1 is composed of four variable-frequency pumps with rated flow of 200 m3/h in parallel. The total design flow of the system is 783 m3/h and the design head is 25 m; The system in case 2 is composed of three variable-frequency water pumps with rated flow of 2080 m3/h and one set of 1050 m3/h in parallel. The total design flow of the system is 5783 m3/h and the design head is 50 m. The two cases are composed of four identical pumps in parallel and three large and one small pumps in parallel, and there is a large difference between the rated flow of the two groups of pumps. The purpose is to test the ability of IMA algorithm to solve the flow distribution problem of parallel pumps under different parallel pump systems and different working conditions. The circulating water pump unit adopts constant pressure control [37], and the operating parameters of each pump of the same model in the system are the same, but the actual operating curves of each pump are different due to the difference in the actual speed and flow of the pump during long-term operation [38]. Therefore, the performance parameters of the pump unit obtained from the actual test are shown in Table 2.
List of characteristic parameters of water pump
List of characteristic parameters of water pump
In solving high-dimensional complex optimization problems, swarm intelligence algorithms are often more difficult to obtain good optimization results. In order to verify the optimization-seeking ability of the IMA algorithm in dealing with energy-saving optimization problems of parallel pumps, this paper verifies the practical application effect of the algorithm through comparative experiments, stability analysis, time complexity analysis and other indicators. In this paper, the parameters of IMA algorithm are repeatedly tested and adjusted, and the final parameter settings can be referred to the following Table 3, and other algorithm parameters can refer to the references.
Experimental parameter setting
Experimental parameter setting
Energy saving effect analysis
In order to verify the feasibility of IMA algorithm in solving the flow distribution problem of parallel pumps, the mayfly algorithm before and after the improvement is used to test under different working conditions, and the experimental results are compared with the results of GA [39], PSO [40] and DE [41] optimization algorithms. In the experiment of case 1, firstly, MA algorithm is compared with GA and PSO algorithm to verify the feasibility of MA algorithm in solving the flow distribution problem of parallel pumps. In order to verify the effectiveness of IMA algorithm proposed in this paper in solving the flow distribution problem of parallel pumps, the optimization results of IMA algorithm and MA algorithm are also compared. The results are shown in Table 3.
It can be seen from Table 4 that when MA algorithm is not improved, its optimization ability is equivalent to that of GA and PSO. However, when the system is at 80% and 50% flow demand respectively, the search result of GA and MA algorithm is not the optimal solution of the search space, and the algorithm falls into local optimal value under this working condition. After the MA algorithm is improved, the IMA algorithm has significantly improved its optimization ability. Compared with GA algorithm, IMA algorithm can save energy by 0.72% 8.68%; Compared with PSO algorithm, IMA algorithm can save energy by 0.72% 1.88%; Compared with the improved MA algorithm, the energy-saving effect of IMA algorithm can reach 0.02% 4.51%, which proves that IMA algorithm can achieve relatively good energy-saving effect under different traffic demands.
In the experiment of case 2, in order to further verify the effectiveness of the improved mayfly algorithm in solving the flow distribution problem of parallel pumps, the optimization results of IMA algorithm are compared with those of GA, DE and MA algorithms. The experimental results are shown in Table 5.
In the optimization results in Table 5, the optimization results of IMA are compared with those of GA, DE, MA and other algorithms. Under the same traffic demand, the optimization results of IMA algorithm save 1% energy compared with GA 1.86% 7.66%, saving 0.01% 7.15% energy compared with DE algorithm. Especially when the traffic demand is 90%, GA and de algorithm fall into local optimization, while IMA algorithm saves 7.66% and 7.15% energy respectively. Compared with MA algorithm, when the traffic demand is less than 80%, the energy-saving effect of the algorithm is equivalent.
When the traffic demand is 90%, the energy-saving effect of the algorithm is 1%, and the overall energy-saving effect is ideal. Therefore, IMA algorithm shows better optimization effect when solving complex optimization problems with different pump combinations and large flow demand. Compared with other optimization algorithms, IMA algorithm has obvious advantages, which shows the feasibility of IMA algorithm in solving the flow distribution problem of parallel pumps.
In two case experiments, the convergence curve of IMA algorithm is shown in Fig. 8. It can be seen from the figure that the IMA algorithm has completed the iterative convergence process 20 generations ago under different flow demands when solving the flow distribution problem of parallel pumps, and has good convergence. Especially under the low traffic demand of case 1, the algorithm can quickly complete the search within 10 generations. Moreover, the curve at the early stage of algorithm convergence is steep, which indicates that the algorithm has good local development ability in the early stage. Thanks to the introduction of dynamic inertia weight coefficient, the relationship between global exploration and local development is well adjusted.

Convergence curve of IMA algorithm in different cases.
To avoid the error caused by the randomness of the algorithms, all algorithms are solved 30 times independently for each working condition. The mean and standard deviation of the 30 solutions are used to measure the performance of the algorithms. The mean value is used to measure the algorithm’s optimization accuracy, and the standard deviation is used to measure the stability of the algorithm, and the experimental results are shown in Table 6.
Comparison of algorithm optimization results under various working conditions
Comparison of algorithm optimization results under various working conditions
According to Table 6, the standard deviation of IMA algorithm is in the order of 10–6 under various working conditions. Compared with MA algorithm, it has a slight improvement in stability and makes up for the defect that MA algorithm falls into local optimum under some working conditions. Compared with GA and DE algorithms, IMA algorithm has obvious advantages in stability, and can converge to the global optimum in energy saving effect. This shows that IMA algorithm has stronger local search ability and is more stable in solving problems with multiple local minima. To verify the impact of the introduction of improvement measures on the stability of the algorithm, MA and IMA algorithms are run independently for 30 times under each traffic demand in this paper. The relative error between the results and the optimal value is shown in Fig. 9.
For Ma algorithm, it can be seen from Fig. 9(a) and (b) that the relative error of Ma algorithm in case 1 is lower than 6×10–4. When the flow demand is 90% and 80%, the relative error curve fluctuates greatly, and the relative error curve of algorithm under other conditions is relatively flat. In case 2, the MA algorithm is relatively stable, and the relative error is less than 4×10–4. When the flow demand is 80%, 70%, 60% and 50%, the relative error curve is very flat and less than1×10–4. Therefore, MA algorithm has good stability.

Relative error diagram of MA algorithm and IMA algorithm in different cases.
For IMA algorithm, it can be seen from Fig. 9(c) and (d) that the relative error of IMA algorithm in case 1 is lower than 3×10–5, and the relative error is relatively stable when the flow demand is 50% and 40%. In case 2, the IMA algorithm is relatively stable as a whole, and the relative error curves under various flow conditions are close to 0. At the same time, the relative error of IMA algorithm in both cases is in the order of 10–5, which is slightly improved compared with MA algorithm, indicating that IMA algorithm does not reduce the stability of the algorithm due to the introduction of improvement measures. IMA algorithm inherits the advantages of MA algorithm in stability.
Define M and iter as the population size and the number of iterations of the algorithm, d as the dimension of the solution space, the parameter initialization time as t1, the time for the parameter to act on each dimension as t2, and the time to solve for the fitness value as f. Then the time complexity of the MA algorithm in the initialization phase is:
Suppose that the renewal time of mayflies in each dimension is t3, and the time of mating to produce offspring mayflies and mutation is t4, then the time complexity of this stage is:
In summary, the time complexity of the MA algorithm is:
In the IMA algorithm, the time to initialize the population location using Circle chaos is O(Md), and the time complexity of the initialization phase is:
Let the update time of inertia weights in each dimension be t5, the number of subgroups of the multi-subpopulation collaborative strategy be n,the time to detect the evolutionary state of subpopulations be t6,then the time complexity of this stage is:
Thus the time complexity of the IMA algorithm is:
Since T′ = T, it shows that the time complexity of the IMA algorithm is in the same order of magnitude as MA, which indicates that the higher convergence accuracy, faster convergence and better stability of the IMA algorithm are obtained at the expense of less computational time complexity.
In this paper, an improved mayfly algorithm (IMA) is proposed to solve the flow distribution problem of parallel water pumps. The optimization objective of this problem is to minimize the energy consumption of parallel pumps, and the speed ratio of each pump is used as the optimization variable for algorithm optimization. Firstly, Circle chaos mapping is used in the initialization of the algorithm, which makes the search range of mayfly population in the solution space more uniform and increases the diversity of population location. The calculation of inertia weight introduces mayfly individual fitness value and optimal fitness value, which better balances the global exploration and local development capabilities of the algorithm. Aiming at the problem that mayfly algorithm is easy to fall into local optimal solution, a multi sub cooperative strategy is proposed. According to the optimal mayfly position of the subpopulation, the evolution state of the subpopulation is detected, the subpopulation is activated and stopped, and the exclusion mechanism is introduced. There is an exclusion relationship between the optimal subpopulation and the ordinary subpopulation, which improves the diversity of mayfly positions and the global search ability of the algorithm.
The experimental results show that: (1) Compared with the traditional optimization algorithm and the improved Ma algorithm, the energy-saving effect of IMA algorithm in case 1 can reach 0.72% 8.68%, and the energy-saving effect in case 2 can reach 1.86% 7.66%, indicating that IMA algorithm has a significant energy-saving effect in solving the flow distribution problem of parallel pumps; (2) IMA algorithm has completed the iterative convergence process before 20 generations when dealing with the requirements of various working conditions. Especially in the simple optimization problem of case 1, the algorithm converges within 10 generations, which shows that IMA algorithm has high optimization efficiency in solving the flow distribution problem of parallel pumps. (3) Compared with Ma algorithm, IMA algorithm has better performance in stability. The relative error of Ma algorithm before and after the improvement is increased from 10–4 to 10–5 orders of magnitude under each working condition, which shows that the introduction of improvement measures has significantly improved the stability of the algorithm.
To sum up, IMA algorithm has high convergence accuracy, high optimization efficiency and good stability, and can meet the actual engineering needs. It is an effective method for energy-saving optimization of air conditioning system. However, the deficiency of the existing research is that this paper only optimizes the energy saving of the chilled water pump of the air conditioning system, and does not optimize the energy saving of other equipment on the side of the chilled water system. In the later work, IMA algorithm is applied to the energy-saving optimization of chilled water system.
Footnotes
Acknowledgments
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this paper: This work was supported by the “Research on the Design Method of Smart Energy Management System for Large Public Buildings based on Double Carbon Goals” (z20220231).
The authors are thankful to the anonymous reviewers for valuable suggestions.
References
: (2021), pp. 361–368.