*4.2. IAO Algorithm*

The original performance of the AO algorithm is better than most intelligent algorithms already. However, similar to other heuristic algorithms, the AO algorithm still has the problem of slow convergence and the tendency to fall into local optimum. The AO algorithm is improved to increase the convergence speed and convergence accuracy. First, the logistic chaotic mapping is used for the initialization process of the population. Thus, the initial distribution of individuals in the aquila population is improved. Second, mutation, hybridization, and competition strategies from the differential evolution algorithm are introduced into the population update to improve the diversity of the population. Finally, the aquila in the optimal position will execute the levy flight strategy, thus preventing it from falling into local extremes.

#### 4.2.1. Logistic Chaos Mapping Strategy

The initialization quality of the population affects the entire population search process. In the initial stage, a more random initial distribution enables individuals to perform a better search for the global. Individuals have a greater probability of approaching the optimal solution, thus increasing the accuracy and iteration speed of the algorithm. In this study, the logistic chaotic mapping is selected for the initialization process of the population. The specific expressions are as follows:

$$r\_i = \mu \times r\_{i-1} \times (1 - r\_{i-1}), \quad i \in [2, 3, \dots, N] \tag{31}$$

$$X\_i = r\_i \times (LB - LB) + LB \tag{32}$$

where *ri* denotes the *i*-th random value generated by the chaotic mapping, *Xi* denotes the initialized position of the individual after the chaotic mapping, and *UB* and *LB* are the upper and lower bounds of the search space.

#### 4.2.2. Mutation, Hybridization, and Competition Strategies

To improve the diversity of the aquila population during the predation, and thus, to solve the problems caused by the lack of diversity during the search process, mutation, hybridization, and competition strategies are introduced after each iteration of the population. The execution process is as follows:

$$dI\_i(t) = X\_{q1}(t) + F \times \left[X\_{q2}(t) - X\_{q3}(t)\right] \tag{33}$$

$$\begin{cases} \quad F = F\_0 \times 2^{\pi} \\ \quad \pi = \exp\left(1 - \frac{T}{1 + T - t}\right) \end{cases} \tag{34}$$

where *Xq*1(*t*), *Xq*2(*t*) and *Xq*3(*t*) are three different individuals within the population after the *t*-th iteration, *Ui*(*t*) is the new individual position generated by mutation, and *F* is the dynamic mutation parameter. Then, the new population generated by mutation and the original population are crossed to produce the hybrid population by hybridization. The specific hybridization process is as follows:

$$V\_i(t) = \begin{cases} \llcorner \mathcal{U}\_i(t) & \text{rand} \le \text{CR} \\ \llcorner \mathcal{X}\_i(t) & \text{else} \end{cases} \tag{35}$$

where *Vi*(*t*) denotes the position of the new individual produced by hybridization, and CR is a random parameter taking values between 0.5 and 1. Finally, the new population produced after the mutation and hybridization process competes with the original population to keep the superior individuals. The specific competition process is as follows:

$$X\_{nrw\\_i}(t) = \begin{cases} \begin{array}{cc} V\_i(t) & f[V\_i(t)] \le f[X\_i(t)] \\ X\_i(t) & else \end{array} \end{cases} \tag{36}$$

where *Xnew\_i*(*t*) denotes the location of the individual generated after the competition, and *f* denotes the fitness function, which is the objective function in this study.

Compared with the original population, the positions of all individuals in the new population undergo a larger perturbation. The search range is wider in the early iterative stage, thus avoiding falling into the local optimum. The introduction of the competition strategy retains the better individuals in the population and eliminates the worse ones, which further improves the convergence accuracy of the algorithm.

#### 4.2.3. Levy Flight Strategy

The levy flight strategy is already involved in the position update formulation of the original algorithm, but it is necessary to execute the strategy again for the optimal individual. After all individuals in the population have completed one complete iteration, the current best individual is selected for levy flight. The fitness values of the individual are compared before and after the execution of levy flight strategy to update the optimal individual position. The process is shown as follows:

$$X\_{new\\_best}(t) = \begin{cases} X\_{lrev\\_best}(t) & f[X\_{lrev\\_best}(t)] \le f[X\_{best}(t)]\\ X\_{best}(t) & else \end{cases} \tag{37}$$

$$X\_{lcvy\\_best}(t) = X\_{lbest}(t) + 0.05 \times Levy(D) \tag{38}$$

where *Xbest*(*t*) denotes the optimal individual position in the population after the *t*-th iteration, *Xlevy\_best*(*t*) denotes the updated position of the optimal individual position after the levy flight strategy, and *Xnew\_best*(*t*) is the optimal individual position after the selection.

Figure 2 shows the flow chart of the optimal configuration of the CCHP system based on the IAO algorithm. The specific steps are as follows:

Step 1 Input load and weather data, and parameters of equipment and the algorithm; Step2Initializingthepopulationwiththe logisticchaosmapping;

 Step3Calculatethecurrentposition of theindividualandthefitnessvalue;

Step 4 The aquila individual enters the search and catch stage;

Step 5 The population obtained from Step 4 performs mutation, hybridization, and competition strategies through Equations (33), (35), and (36) to obtain a new population, thereby retaining the individuals with low fitness value;

Step 6 The optimal individual performs the Levy flight strategy according to Equations (37) and (38);

Step 7 Judge whether the maximum number of iterations is reached, and if not, return to Step 3, otherwise execute the next step;

Step 8 Save data and output the objective function value.

**Figure 2.** The flow chart of optimal configuration based on the IAO.
