A novel approach to forecast global CO2 emission using Bat and Cuckoo optimization algorithms

This paper presents the application of Bat and Cuckoo optimization algorithm methods to forecast Global CO2 emerged from energy consumption. The models are developed in two forms (linear and exponential) and used to estimate to develop Global CO2 emission model values based on the uses global oil, natural gas, coal, primary energy consumption. The available data are partly used for finding optimal, or near optimal values of weighting parameters (1980–2013) and partly for testing the models (2014–2018). The performance of methods is evaluated with mean squared error (MSE), root mean squared error (RMSE), Mean absolute error (MAE). According to the simulation results obtained, there is a good agreement between the results obtained from BA Global CO_2 emission models (BA-GCO_2) and COA Global CO_2 emission models (COA-GCO_2) but COA- exponential model outperformed the other models. The modeling approach recommended a helpful and reliable method for forecasting global climate changes and environmental decision making.• The article provides a method for forecasting and climate policy decision making.• The method presented in this article can be useful for experts, policy planners and researchers who study greenhouse gases.• The analysis obtained herein by Metaheuristic Algorithms solver can serve as a standard benchmark for other researchers to compare their analysis of the other methods using this dataset.


Introduction
The use of non-classical methods in identifying models and predicting the behavior of complex systems has long been common in scientific circles. In many complex and especially non-linear systems, which modeling and subsequently their prediction and control through classical and analytical methods seems very difficult and sometimes impossible, non-classical methods that have features such as episteme-based intelligence and expertise are used. Nowadays, new methods have been developed for modeling and predicting various phenomena, in which evolutionary algorithms have a special place among them. This paper presents a combination of optimization algorithms (Bat and Cuckoo) and regression analysis (linear and exponential) to forecast Global CO2 emission. COA and BA are developed to Global CO 2 emission values based on the natural gas, primary energy, global oil, coal consumption . The models have been developed in two forms (linear, exponential) The linear form of the equation for Global CO 2 emission model is written as follows: The exponential form of the equation for Global CO 2 emission model is written as follows: Where y represents the estimated Global CO 2 emission and Z i values represent the four independent variables used as the predictors of y (Z 1 is global oil consumption, Z 2 is natural gas consumption, Z 3 is coal consumption and Z 4 is primary energy consumption).

Bat algorithm
The Bats Algorithm (BA) developed by Yang (2008) is a population-based meta-heuristic algorithm, in which it then was extended in 2010 [1] . Sound position feature enables bats to obtain their prey. In this matter, the bats generate very loud sound pulses and receive the echoes of the sounds as they return from the surroundings. Here, the pulses contain several characteristics that depend on the bat's hunting strategy and the type of animal they intend to hunt. It should be mentioned bats could produce a three-dimensional space around themselves by delaying the reflection and detection of reflection, the time difference between the two ears, and the change in the loudness of the reflected sound. Moreover, they can distinguish the distance, direction, and even the velocity of their prey. The logic of this algorithm is that each virtual bat flies randomly at a velocity equal to ν i . Its position, i.e. x i , is the final solution. In this way, a bat varies the loudness ( A i ) and pulsation emission rate ( r i ) during a search to locate a prey. Besides, searching is also intensified using a local random walk. The selection of the best continues as long as one of the stop criteria is met. [2][3][4]  For simplicity, to create a BA, only some of the characteristics of bats are utilized as follows: 1. All bats employ the ability of sound position to detect the distance while they can distinguish between food and obstacles. 2. Although the loudness can be changed in different ways, it is assumed that the loudness can be varied from a large positive value of A 0 to a small value of A min .
3. All bats randomly fly to find their prey at a velocity of ν i in a position x i with a constant frequency f min , a variable wavelength λ, at a loudness A 0 In addition to the aforementioned simplification assumptions, other approximations have also been conducted in BA design such as f is usually in the range of [f min , f max ]. The amplitude of the wavelength should be chosen in accordance with the size of the problem being solved, and then it should be changed to a smaller size. In this algorithm, the position (one solution) and the velocity of each bat in the t + 1 step is measured as follows: where β ∈ [0, 1] is a uniform random vector and x best is the best global position among bats that are obtained up to now. The updating procedure of both position and velocity in bats contains similarities to the particle swarm optimization (PSO) algorithm, in which f controls particle velocity and swarm. Indeed, the BA can be well known as a combination of the PSO algorithm without taking advantage of the best local response of the i-particle, along with a local search based on the loudness and pulsation emission rate. [5 , 6] . Based on these approximations and idealization, the basic steps of the Bat Algorithm (BA) can be summarized as the pseudo code shown in Fig. 1 .
For the local search section, one solution is selected from the best current solutions, and then a new solution is locally generated for each bat using a random walk, i.e.
x new = x old + εA t i (6) where ε ∈ [0, 1] is a random value and A t t is the mean loudness of all bats at the time t . As a bat decreases its loudness ( A i ) when it detects a prey, and then increases its pulsation emission rate( r i ), both r i and A i must be updated during the repetition process using the following relationships.

Cuckoo optimization algorithm
The cuckoo algorithm is a new method of deliberate global search inspired by the life of a bird called cuckoo. [9] Like other evolutionary algorithms, COA starts with an initial population. It is a population of cuckoos. These cuckoos have a number of eggs that will dump in some host birds' nests. Some of these eggs, which are more similar to the host bird's eggs, have a better chance of growing into a mature cuckoo. Other eggs are identified and killed by the host bird. The number of grown-up eggs indicates the appropriateness of the nests in that area. The more eggs can survive in an area, the more profit (willingness) is ascribed to that area. Therefore, the situation in which more eggs survive will be the parameter that COA intends to optimize. Cuckoos search for the best area to maximize their eggs survival rate. Each cuckoo accidentally dumps eggs in the host bird's nest, which is within its egg-laying radius or ELR. In an optimization problem, each variable has an upper limit, var hi and a lower limit var low , and each ELR can be defined using these limits. The ELR ratio for each cuckoo is determined as function (9).
NI is the maximum number of iterations, gn is the current iteration, and α is the variable with which the maximum value of ELR is set. When all the cuckoos have laid their eggs, some of the eggs, which are not much similar to the host bird's eggs, are identified and thrown out of the nest [10] . Another interesting point about cuckoos is that only one egg can grow in each nest. The main steps of COA are presented in Fig. 3 as a pseudo-code.
When the chicks grow and mature, they live in their own environment and groups for a while, but when the time for egg-laying approaches, they migrate to better habitats where there are higher chances for the egg's survival. After the formation of cuckoo groups in different biological areas (problem search space), the group with the best position is selected as the target point for other cuckoos to immigrate. When adult cuckoos live in all over the environment, it is difficult to determine which cuckoo belongs to which group. To solve this problem, the cuckoos grouping is done by Kmeans clustering method. Now that cuckoo groups have been formed, their mean profit value is calculated to obtain the relative optimality of the group's habitat. Then the group with the highest mean profit value (optimization) is selected as the target group and other groups migrate toward it. While migrating toward the target point, the cuckoos do not travel all the way directly to the target location. They only travel part of the way and have a deviation along that path. You can clearly see this movement in Fig. 4 .
When all cuckoos migrate to the target point and their new habitats are identified, each cuckoo lays a number of eggs. Depending on the number of eggs of each cuckoo, an ELR is determined for it and then egg-laying begins. Considering the fact that there is always a balance in the bird population in nature, a number like N max controls and limits the maximum number of cuckoos that can live in an environment. After a few iterations, all the cuckoos reach an optimal point with the maximum similarity of the eggs to the host birds' eggs, and the location with the maximum food resources. This habitat has the most overall profit and the least number of egg losses. The formula for the migration operator in the cuckoo optimization algorithm is function (10). Where X i ( k ) is the position of each cuckoo in iteration k, X GlobalBest is the best optimal point in each group. Fig. 5 presents a flow diagram of bat algorithm.

Optimization and method validation
Application of Bat algorithm (BA) together with Cuckoo Optimization Algorithm (COA) techniques to estimate the Global CO 2 emission is the main objective of this paper .
The fitness function for selecting candidates for optimal coefficients is defined as: Where Y observed and Y predicted are the observed and predicted Global CO 2 emission respectively, and k is the number of observations. [11] In addition, error metrics MSE, 1 MAE, 2 RMSE 3 were used to compare the performance of linear and exponential models to provide the best data analysis. These errors are specified in the forms of Eqs. (12) -(14) 1 Mean squared error. 2 Mean absolute error. 3 Root mean squared error. Global CO 2 emission from 1980 to 2018 is considered as a case in point in this paper. The available data is partly used for finding the optimal, or near optimal, values of the weighting parameters (1980-2013) and partly for validating the methods (2014-2018). [12] Following steps are conducted for estimating Global CO 2 emission between 1980 and 2018: Step 1: natural gas, global oil, primary energy, coal consumption and Global CO 2 emission need normalizing according to Eq. (15) :  Table 2 The best-obtained weighting factors by COA and BA optimization algorithms.    Table 1 .
Step 2: The proposed methods are used in order to determine corresponding weighting factors (C i ) for each model according to the lowest objective functions. [11] Step 3: The best results of step 2 for each model and less average relative errors in the testing period are chosen (i.e., the related data from 2014 to 2018). The best-obtained weighting factors by COA and BA for linear and exponential models are shown in Table 2 .
The obtained values of MSE, RMSE and MAE for both methods are presented in Table 3 . It can be seen that there is a good agreement between the results obtained from BA Global CO 2 emission models ( BA − G C O 2 ) and COA Global CO 2 emission models ( COA − G C O 2 ) but COAexponential model outperformed the other models. Tables 4 and 5 for the modeling and the testing data show the performance of the Bat and cuckoo optimization algorithm for all models. The findings proved that the recommended exponential model was more appropriate tool for forecasting Global co2 emission. a Actual data is in million tonnes of carbon dioxide.

Conclusion
The point of this study is to demonstrate to the authorities the significance of utilizing option estimating strategies. Therefore, in this study COA (cuckoo optimization algorithm) has been successfully used to estimate Global CO 2 emission based on global oil, natural gas, coal, primary energy consumption. To make a conclusion, this paper presented helpful suggestions and novel insights for experts and policy planners. It recommended a strong tool for developing energy programs. Forecasting Global CO 2 emission can as well be studied by neural networks or other new metaheuristics including harmony search, simulated annealing, etc. The results of different methods may be compared with COA method.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.