Optimization of Cerbera manghas Biodiesel Production Using Artificial Neural Networks Integrated with Ant Colony Optimization

Optimizing the process parameters of biodiesel production is the key to maximizing biodiesel yields. In this study, artificial neural network models integrated with ant colony optimization were developed to optimize the parameters of the two-step Cerbera manghas biodiesel production process: (1) esterification and (2) transesterification. The parameters of esterification and transesterification processes were optimized to minimize the acid value and maximize the C. manghas biodiesel yield, respectively. There was excellent agreement between the average experimental values and those predicted by the artificial neural network models, indicating their reliability. These models will be useful to predict the optimum process parameters, reducing the trial and error of conventional experimentation. The kinetic study was conducted to understand the mechanism of the transesterification process and, lastly, the model could measure the physicochemical properties of the C. manghas biodiesel.


Introduction
The ever-increasing energy demands coupled with the low fossil fuel reserves and the resulting negative environmental impacts have driven scientists and researchers worldwide to explore alternative sources of energy that are renewable, sustainable, and environmentally friendly [1][2][3]. There are many types of renewable energy have been implemented successfully around the world, such as wave, wind, solar, bioenergy, and geothermal energy sources [4][5][6][7][8]. However, the problem with some types of renewable energy such as wind and solar are that they are only available for certain periods of time. Therefore, energy storage equipment is required to store the energy. The only energy storage devices available commercially today are batteries, in which very limited energy can be stored. Due to these reasons, scientists are trying to discover some other type of material that can store energy in significant amounts [9][10][11][12]. The renewable energy that is easiest to handle is biofuel, which has no storage problem and is easily transported. One alternative source of energy is biodiesel, which is an alternative fuel that can be produced from a variety of feedstock, including edible and non-edible plant-based oils, animal fats, and even waste cooking oils [13][14][15]. The possibilities of biodiesels are endless-the physicochemical properties of these fuels can be tweaked by making judicious selection on the types of feedstock and the types of processes used for biodiesel production (e.g., degumming, esterification, neutralization, transesterification, and purification), by blending biodiesels with other types of biodiesels or fuels such as bioethanol and diesel, or even by optimizing the process conditions of biodiesel production. Biodiesels are promising substitutes for diesel since these fuels are biodegradable, non-toxic, and produce fewer harmful exhaust emissions [16,17] Biodiesels are essentially mono-alkyl esters of long chains of fatty acids. These fuels are produced from the esterification of free fatty acids present in plant-based oils or animal fats, followed by transesterification of the esterified oils with short-chain alcohols in the presence of a catalyst. Alkalis, acids, or enzymes are used as catalysts in biodiesel production [18][19][20]. Various types of homogeneous and heterogeneous acidic or alkaline catalysts have been developed for use in biodiesel production with varying degrees of success. In general, acid-catalyzed transesterification is relatively slow (requiring longer reaction times) and moreover, there are difficulties in recovering the catalyst. In this regard, base-catalyzed transesterification is more favorable because it is faster and the process reduces the free fatty acid content of the oil to less than 1 wt. %, which results in higher biodiesel yields [21][22][23].
There are various factors that affect biodiesel yields, which include fatty acid composition and physicochemical properties of the crude oils used as the feedstock for biodiesel production. The types of processes used for biodiesel production (e.g., degumming, esterification, neutralization, transesterification, and purification) and the sequence of these processes may also affect biodiesel yields [24,25]. The process parameters chosen for biodiesel production (e.g., catalyst concentration, reaction time, methanol to oil molar ratio, reaction temperature, and stirring speed) are known to affect biodiesel yields. This was proven by a previous study [26] that produced Cerbera manghas biodiesel through a two-step laboratory-scale biodiesel production process (esterification-transesterification). The sodium hydroxide (NaOH) catalyst concentration and the methanol to oil molar ratio were kept fixed at 1 wt. % and 9:1, respectively, for the transesterification process. The experimental results showed that the conversion rate (96.8%) for the C. manghas biodiesel was reasonable, which varied depending on the catalyst concentration and the methanol to oil molar ratio.
For this study, a prediction model [artificial neural network (ANN)] was developed to forecast the process conditions for acid-catalyzed esterification and base-catalyzed transesterification of C. manghas oil. Before working on the optimization process, it was important to develop a reliable prediction model for the esterification and the transesterification processes. There have been many studies done on the C. manghas biodiesel; however, there are fewer studies working on the ANN mathematical modeling based on the transesterification process parameters. In order to obtain the highest methyl ester yield, the esterification and the transesterification process parameters, such as catalyst concentration, time of reaction, methanol to oil molar ratio, working temperature, and stirring speed, need to be optimized. Optimized process parameters reduce the cost of biodiesel production, and this creates more opportunities for biodiesel fuels to be more competitive among the fuel market. Therefore, this study created the ANN model to predict the best conditions for both esterification and transesterification processes, and the reliability of the model was determined. Statistical parameters such as mean absolute percent error (MAPE), coefficient of determination (R 2 ), root mean square error (RMSE), and relative percent deviation (RPD) were used to determine the reliability of the model. Conversion of C. manghas biodiesel was challenging work that required extensive design and modeling analyzes. Similar optimization of biodiesel production was done successfully with a variety of renewable feedstock by using the ANN model [27][28][29]. Therefore, one of the goals in this study was to apply the metaheuristic optimization algorithm (i.e., ant colony optimization) in biodiesel production to maximize the conversion rate or the biodiesel yield (more than 95%). Both the esterification and the transesterification process parameters were optimized to achieve high conversion yield. In addition, according to Ong et al. [25], using the optimum process parameters helps reduce the overall cost of biodiesel production by 30%, which emphasizes the importance of optimizing the process parameters of biodiesel production. One of the methods used for this purpose was artificial neural networks integrated with ant colony optimization (ACO) algorithm, and the steps are described in the following section.

Artificial Neural Networks and Ant Colony Optimization
One of the methods used for modeling the process parameters for biodiesel production is an artificial intelligence method called ANN. ANN has been used extensively for modeling the process parameters for biodiesel and bioethanol production, which reduces trial and error associated with conventional experimentation. In this study, ANN was coupled with ACO to optimize the parameters involved in order to produce high methyl ester yields. ANN is also known as a "black box modeling method" and is inspired from the human biological nervous system. ANN is essentially a class of non-linear computer algorithms that have gained popularity, as many believed and subsequently proved that ANN could solve science and engineering questions or problems [30,31]. Optimization of biodiesel production by the use of ANN modeling has been reported by researchers. Sivamani et al., 2018 [32] conducted optimization biodiesel production from Simarouba glauca using an artificial neural network genetic algorithm. They found that the value of mean square error (MSE) obtained from the ANNs was 0.00458, which was near the limit of acceptance for the MSE. Ayoola et al., 2019 [33] used ANN to optimize the biodiesel produced from waste groundnut oil and found regression coefficients (R) of 0.9241 and correlation coefficients (R 2 ) of 0.8539. Hence, it was deduced that the ANN had the ability to predict accuracy in biological systems.
An ANN model comprises a large number of data processing elements, which are known as nodes or neurons. These neurons are arranged in layers and are interconnected to one another. The beauty of ANN is that it is not compulsory for the user to know the relationship between the data processing elements beforehand in order to establish a correlation [34,35]. The input data are manipulated by the neurons and the interconnections of these neurons during each step of the process in order generate the output [36]. In addition, the user does not need to implement standard experimental designs when building an ANN-ACO model; it is a collective intelligence influenced by foraging the behavior of ant colonies (hence, the name). ACO coupled with ANN is indeed an ingenious idea because ACO is capable of solving complex process parameters [37,38]. Hence, the ANN-ACO approach was implemented in this work in order to exploit the benefits of mathematical models in optimizing the process parameters for both esterification and transesterification for C. manghas biodiesel.

Kinetic Study
Kinetics is one of the key areas in biodiesel research because one needs to have an in-depth understanding of reaction kinetics in order to understand the mechanisms underlying various processes, which are essential to analyze, design, simulate, and optimize reactions and processes [39]. Kinetics plays a significant role in understanding the mechanism of the two-step biodiesel production process. During the esterification process, free fatty acids were esterified rapidly and then methyl ester originated, while the transesterification process was applied to triglycerides, diglyceride, and monoacyglycerol converted into methyl esters [39,40].
Several researchers have conducted kinetic studies on esterification and transesterification, and the results show that homogeneous catalytic reactions can be attained if higher concentrations of methanol are used in the processes [39,41]. Sivakumar et al. [41] studied the mechanism of methanolysis of Ceiba pentandra oil catalyzed by potassium hydroxide (KOH). They developed a kinetic model of the process, where the reaction time and the reaction temperature were within a range of 45-65 min and 45-65 • C, respectively. The methanolysis of the triglycerides, the diglyceride, and the monoglyceride were described by a first-order kinetic model. This model appears to be the best model to describe the base-catalysed transesterification process. Ramezani et al. [42] studied the kinetics of transesterification of castor oil catalyzed using four homogeneous catalysts: (1) sodium methoxide (NaOCH 3 ), (2) sodium hydroxide (NaOH), (3) potassium methoxide (CH 3 KO), and (4) potassium hydroxide (KOH). They reported that the kinetic properties are related to the intermediates of monoglyceride and diglyceride of the four catalysts used in the transesterification process. They seemed to prefer using a pseudo first-order kinetic model to analyze the phase behavior of the reacting system on the methanolysis reaction.
It is well-known that the high free fatty acid content of biodiesel feedstocks (e.g., C. manghas oil) increases the overall cost of biodiesel production. This is because high free fatty acid feedstock requires a pre-treatment process (esterification) in order to reduce the free fatty acid content to a permissible level (less than 1 wt. %) before proceeding to the next transesterification process. Understanding the effects and the relative importance of various process parameters of the esterification process, such as catalyst concentration, time methanol to oil molar ratio, and temperature of reaction, is relatively important to attain a cost-effective pre-treatment. In addition, it is known that the immiscibility of the oil and alcohol solution limits the rate of reaction for catalytic transesterification. For this reason, vigorous stirring is needed to improve the interfacial reaction between the oil and the alcohol. Hence, kinetic studies (or rather, kinetic models) are essential to gain insight on not only the mechanisms underlying the processes but also the effects of various process parameters and other factors that may affect the rate of reaction for esterification and transesterification. Kinetic models are simple mathematical representations of the reacting system, and these models provide a good description of the system for a given initial composition. Thus, a kinetic study was conducted to understand the mechanism of the base-catalyzed transesterification process for the C. manghas biodiesel, which supplemented our optimization study.

Cerbera Manghas Oil
C. manghas (commonly known as sea mango) is a tree that produces toxic fruits (with a shape similar to mangoes). This tree belongs to the Apocynaceae family. The native distribution of this tree is from the Seychelles Islands, French Polynesia, Indonesia, Malaysia, Thailand, and Vietnam. This tree is typically found in coastal areas with mangrove forests [43]. C. manghas grow up to 15 m tall. The lifespan of C. manghas is typically 30 to 50 years, and a mature tree can produce more than 50 kg of fruits. The oil content of a C. manghas fruit is within a range of 50-60 wt. % [44]. Ong et al. reported that C. manghas seed oil is primarily composed of unsaturated fatty acids (82.4 wt. %), while saturated fatty acids constitute a smaller portion (18.8 wt. %) [26]. We found that the fatty acid composition of the crude C. manghas seed oil was composed of 68.3% unsaturated acids and 31.7% saturated acids. Table 1 shows the composition of the crude C. manghas seed oil found in this study. Thus, C. manghas seed oil resembles most non-edible commodity oils such as Jatropha curcas, Sterculia foetida, and Calophyllum inophyllum oils in terms of fatty acid composition-though the percentage of each fatty acid varies from one type of oil to another. C. manghas oil was selected for this study due to our previous works and Ong et al.'s [26] having proved that this oil has great potential for biodiesel production.

Objectives of This Study
There were four objectives to accomplish in this study. First, we optimized the process parameters (i.e., sulfuric acid (H 2 SO 4 ) catalyst concentration, methanol to oil molar ratio, reaction temperature, and reaction time) for esterification of C. manghas oil (CCMO) because of the high free fatty acid content. Second, we optimized the process parameters (i.e., KOH catalyst concentration, time, methanol to oil molar ratio, temperature of reaction, and stirring speed) for transesterification of esterified C. manghas oil (ECMO). Third, we examined the kinetics of the transesterification process. Lastly, the fourth objective was to obtain the physicochemical properties of the C. manghas methyl ester (CMME). To the extent of our knowledge, the study addressed the process conditions for optimization of both esterification and transesterification of C. manghas methyl ester. A novel and integrated prediction modeling approach was formed in this study. Moreover, the best ANN coupled with ACO modeling was chosen to optimize parameters used in biodiesel conversion processes in order to produce a high C. manghas methyl ester yield.

Materials
The CCMO was purchased from Koperasi Lestari, Cilacap, Central Java, Indonesia. The chemicals (i.e., methanol, phosphoric acid (H 3 PO 4 ), sulfuric acid (H 2 SO 4 ), and potassium hydroxide (KOH) and the filter paper were purchased from Labchem Sdn. Bhd., Selangor, Malaysia. All of the chemicals were of analytical reagent grade. The CCMO was composed of 90-98% triglycerides and small amounts of monoglyceride and diglyceride. Owing to the high amount of free fatty acids contained in the CCMO (5-10 wt. %), it required a higher amount of catalyst to neutralize the free fatty acids. Hence, a two-step process was implemented to produce the CMME: (1) acid-catalyzed esterification and (2) base-catalyzed transesterification.

Experimental Set-Up
The three-necked round bottom flasks were used for the esterification-transesterification process. The three-necked round bottom flasks were placed on a hot plate magnetic stirrer (Model: IKA C-MAG HS7, USA). The reactor was connected to a reflux condenser (in order to recover the methanol), a temperature-controlled water cooling circulation system, and a mechanical stirrer with a magnetic drive.

Parameter Optimization Biodiesel Production
Taking into the consideration the large variety of fatty acid and free fatty acid compositions in the crude oil made the process of converting the crude oil to biodiesel more complicated. Moreover, the variety of parameter conditions and uncontrollable catalytic systems made the conversion even harder. Therefore, the process required extensive and comprehensive laboratory work and scaling before commercializing the process of biodiesel production. To achieve a high conversion rate, many parameters for esterification and transesterification processes needed to be optimized. First, the amount of free fatty acid content was reduced to less than 1% to obtain high methyl ester yield through the acid-catalyzed esterification process. During the esterification process, a new ester was created from free fatty acids, while the base-catalyzed transesterification was converting a triglyceride into three methyl ester [45,46]. The esterification and the transesterification processes required homogenous catalysts such as H 2 SO 4 , HCl, NaOH, and KOH. Alkaline homogeneous catalysts are preferable for methyl ester conversion because they normally enhance the conversion process and are more economical, but overdose of alkaline catalyst causes saponification, resulting in low conversion of methyl ester [39,47]. The high acid value of C. Manghas oil was over the safe limit for a direct transesterification reaction using an alkaline catalyst. Hence, this oil required both esterification and transesterification processes to obtain a high amount of methyl ester. Many parameter optimizations of biodiesel products using esterification and transesterification were carried out by researchers [48][49][50]. Multiple techniques have been employed for process optimization, widely through mathematical models [45,51]. Therefore, this study used the mathematical correlation between process parameters developed using the Box-Behnken design of experiments to obtain optimal methyl ester. Nevertheless, the ANN model integrated with ACO was developed for the optimization of biodiesel production with consideration to limitations of the parameter range [27,29,36].

Acid-Catalyzed Esterification
A 500 mL three-necked round bottom flask was connected to a reflux condenser (in order to recover the methanol), a mechanical overhead stirrer, and a temperature-controlled water cooling circulation system. The stirring speed of the mechanical overhead stirrer was set at 800 rpm. We mixed the CCMO with methanol, which we transferred into the reactor preheated at 50 • C. Next, H 2 SO 4 (purity: 95-97%, reagent grade, ISO) was added into the reaction mixture in drops through a pipe connected to the reactor. The mixture was heated continuously throughout the esterification process over a specific period. It should be noted that the experiments varied in the H 2 SO 4 concentration (0.5 to 1.5 vol %), the methanol/oil molar ratio (3:1 to 15:1), the temperature of reaction (50 to 65 • C), and the time of reaction (45 to 90 min). After reaction, the mixture was put in a separating funnel for several hours. It was observed that two layers formed in the separating funnel after the separation process, where the upper layer was a mixture of methanol and other impurities and the bottom layer was the esterified oil. The ECMO was collected and transferred into a vacuum rotary evaporator, and then temperature was set at 60 • C for 30 min in order to examine the removal of methanol from methanol-water. Anhydrous sodium sulphate was added into the ECMO in order to confirm removal of water molecules.

Base-Catalyzed Transesterification
The same experimental set-up was used for the transesterification process. The ECMO was mixed with methanol and the mixture was transferred into the three-necked round bottom flasks preheated at a specific temperature. KOH was added into the reactor, and the reaction mixture was mechanically stirred continuously over a specific period. For the experiments, KOH concentration (0.5 to 1.5 wt. %), methanol to oil molar ratio (3:1 to 15:1), temperature of reaction (50-60 • C), time of reaction (45 to 90 min), and stirring speed (800 to 1200 rpm) were varied. After the reaction was complete, the mixture was then poured in a separating funnel and left to settle overnight. It was observed that two distinctive liquid layers formed in the separating funnel after the separation process. The upper layer was the CMME, whereas the bottom layer was a mixture of glycerin and traces of catalyst, soap, salt, and other impurities. The bottom layer was drained from the separating funnel and then purified. Next, the CMME was poured into the rotary evaporator to remove extraneous water and subsequently dried with anhydrous calcium chloride (CaCl 2 ) followed by filtration in order to purify the CMME. The CMME yield (conversion of ECMO to CMME) was determined using the following equation: where MEY represents the CMME yield in percent (%), W ecmo is the weight of the ECMO in grams (g), and W cmme is the weight of the CMME in grams (g). We measured W ecmo and W cmme using gas chromatograph after each experiment.

Physicochemical Properties of the CCMO, CMME, and Diesel
The physicochemical properties of oil and methyl ester such as kinematic viscosity, density, acid number, iodine number, flash point, heating higher value, cloud and pour point, and oxidation stability were measured in accordance with the ASTM D6751 or the EN 14214 standard test methods [52][53][54]. For sample preparation, 50 mg of methyl ester sample was measured, and 50 mg of internal standard [methyl nonadecanoate (C 19 )] was added into a 5 mL vial, and then the mixture was diluted with 5 mL of toluene. The mixture was transferred to a 2 mL vial and placed at the auto sampler of the gas chromatograph. Approximately 1 µL was inserted into the gas chromatography for Fatty acid Methyl ester identification. The fatty acid composition of the CMME was measured using a gas chromatograph equipped with a flame ionization detector and HP Innowax column with the following specifications: (1) column length 30 m, (2) inner diameter 0.25 mm, (3) film thickness 0.25 µm, and (4) split injection ratio 100:1.5. High-purity helium was used as the carrier gas. The temperatures of the injector and the detector were set at 250 • C. During the analysis, the oven temperature increased at a rate of 10 • C/min until it reached a temperature of 200 • C, and then the oven temperature was continuously heated at a rate of 5 • C/min until it reached 240 • C, which was retained for 7 min. After that, the fatty acid composition of the CMME was analyzed according to the EN 14103:2011 standard test method [24,54]. The measurement was repeated three times, and the average was taken; the summary list of equipment used to determine the properties of crude C. manghas oil and biodiesel in this study is shown in Table 2.

Design of Experiments
The Box-Behnken experimental design was implemented to analyze the data and predict the response variable by statistically fitting the experimental responses using the appropriate mathematical terminology [55]. The Design-Expert ® Version 9.0 software (StatEase, USA) was used to generate the design matrix. There were four input variables for the esterification process (i.e., H 2 SO 4 catalyst concentration, methanol to oil molar ratio, reaction temperature, and reaction time), resulting in 29 experimental runs. Five input variables were used for the transesterification process (i.e., KOH catalyst concentration, methanol to oil molar ratio, reaction temperature, reaction time, and stirring speed), resulting in 46 experimental runs. The optimization of process parameters of acid-catalyzed esterification and base-catalyzed transesterification using Box-Behnken design is shown in Tables 3 and 4, respectively.

Development of ANN Models
Artificial neural network models were developed to train the back-propagation for predicting each phenolic compound using the MATLAB 7.10.0 software (The MathWorks, Inc. USA). Three-layer feed-forward network architecture was chosen and applied with hyperbolic tangent sigmoid as the transfer function from the input layer to the hidden, and the output layer had a linear transfer function such as pureline. The tansig transfer function for hyden and pureline for the output layer are given by Equations (2) and (3), respectively [56,57]: ANN model training with the Levenberg-Marquardt back-propagation algorithm was developed to optimize the esterification process parameters. The ANN architecture consisted of three input layers with four inputs (i.e., H 2 SO 4 catalyst concentration, methanol to oil molar ratio, reaction temperature, and reaction time), hidden layers with the optimum number of neurons, and a single output variable (i.e., acid value). Likewise, the Levenberg-Marquardt (LM) back-propagation training algorithm was developed to optimize the transesterification process with some minor differences. The multilayer feed-forward neural network had five inputs (i.e., KOH catalyst concentration, methanol to oil molar ratio, reaction temperature, reaction time, and stirring speed), hidden layers with the optimum number of neurons, and a single output variable (i.e., CMME yield). The value of MSE values reached a minimum, and average R values close or equal to 1 indicated that the error of our model decreased.

Sensitivity Analysis of the ANN Model Developed for Base-Catalyzed Transesterification
The relative importance of each input variable was determined using the Garson's algorithm (i.e., catalyst concentration, methanol to oil molar ratio, reaction temperature, reaction time, and stirring speed) on the output variable by partitioning the connection of weights [58]. This is given by Equation (4): where N i and N h represent the number of input and hidden neurons and I j is the relative importance of the jth input variable on the output variable, respectively. W is the connection weight. The superscripts i, h, and o represent the input, the hidden, and the output layer, respectively. The subscripts k, m, and n refer to the input, the hidden, and the output neurons, respectively.

Integration of ANN Models with ACO
ANN models integrated with ACO were well-trained and tested in order to predict the acid value and the CMME yield for the esterification and the transesterification processes, respectively, at various combinations of independent variables. ACO is a probabilistic technique for solving computational problems, which can be reduced to finding good paths through graphs. Ant colony optimization algorithms are inspired by the foraging behavior of ant colonies, as the name suggests [59]. In nature, ants leave pheromone from their nest along the route in order to identify foods by following other members of the colony [37]. The probability of an ant moving from node i to node j is given by Equation (5): where α is a parameter used to control the influence of τ (i,j) , τ (i,j) is the amount of pheromone on edge i,j while τ (i,j) and n (i,j) represent the desirability of edge i,j (typically 1/d i,j ), and β is a parameter used to control the influence of n (i,j) . This pheromone is updated according to Equation (6): where ρ is the rate of pheromone evaporation, τ (i,j) is the amount of pheromone on edge i,j and ∆τ (i,j) is the amount of pheromone deposited. The ant deposits some pheromone, and the pheromone level of edge i,j is given by Equation (7): where L k is the cost of the kth ant's tour (typically length) [37,60] Energies 2019, 12, 3811 10 of 21

Kinetic Study
The kinetic study was conducted to find out the mechanism of transesterification of C. manghas oil. The kinetic study was performed based on the optimum process parameters for base-catalyzed transesterification.
The transesterification process involves the reaction between three moles of alcohol and one mole of triglyceride, as shown in Equation (8): The first-order kinetic model was used to model the kinetics of the transesterification process. Thus, the increase in the amount of products corresponded to the decrease in the amount of the limiting reactant (i.e., triglyceride), which was represented by the global reaction rate constant. Hence, in this study, the amount of CMME formed during the reaction defined the role of each reactant in a reaction and could be used by allowing for data plotting and applying a linear equation to fit the CMME yield with respect to time in order to examine the kinetics of the transesterification process. The rate equation per unit time (r) for a first-order reaction is given by Equation (9): where a is the methyl ester conversion, and k(T) is the temperature-dependent reaction rate (in Kelvin).
It should be noted that k is the global reaction rate constant, which was assumed to obey the Arrhenius law [Equation (10)]: whereŘ is the gas constant (8.314 J mol −1 K −1 ) and A is the frequency factor, E is the activation energy. For a simple first-order kinetic model, f (a) = (1 − a) n . Equation (9) can be rewritten as: Thus, the numerical value of the definite integral for k is given by: Thus, plotting [(1 − (1 − a) 1−n )/1 − n] versus time (n 1) results in a linear plot with slope k for a good value of n, where n represents the order of reaction. In order to define the acceptable value for n, the plot of [(1 − (1 − a) 1−n )/1 − n] versus time (n 1) should give an optimum linear plot for the three reaction temperatures (318, 323, and 328 K) considered in this study. Here, the linear plot was optimum when the correlation coefficient (R 2 ) for all data points was maximal for each reaction temperature. Next, it could be determined in excess of the activation energy and the frequency factor using Equation (10). We plotted the reciprocal of the reaction temperature (1/T) versus the rate constant (ln k) and determined the global reaction rate constant for each reaction temperature from this plot. This plot was also a linear plot with the slope −E/Ř T, and the intercept ln A.

Physicochemical Properties and Fatty Acid Composition of the CCMO
The physicochemical properties of the CCMO are summarized in Table 5. The viscosity at 40 • C and the density at 15 • C were 32.83 mm 2 /s and 920.6 kg/m 3 , respectively. The acid number, the iodine number, and the flash point were 24.52 mg KOH/g, 122.6 mg I2/100 g, and 150.5 • C, respectively. The fatty acid composition of the CCMO was determined according to the EN 14214 standard test method, and the results are presented in Table 1. CCMO contained a higher proportion of unsaturated fatty acids (68.3 wt. %) compared with saturated fatty acids (31.7 wt. %). Oleic acid (C18:1) appeared to be the dominant fatty acid for this oil, followed by palmitic acid (C16:0) and linoleic acid (C18:2), with values of 45.0, 22.8, and 22.4 wt. %, respectively. The acid value of crude C. manghas oil was 13.41 mg KOH/g. The result obtained from this research was much higher than that presented by Ong et al. [26], and the obtained viscosity of CCMO in this study was similar with the previous study. It could be seen that CCMO had very high viscosity. High viscosity indicated good lubrication properties, which are favorable for diesel engines due to the large molecular mass and the chemical structure However, high viscosity also causes problems, and especially regarding fuel flow and injection spray characteristics in the engine. It is recommended that crude oils should be converted to biodiesel through transesterification in order to minimize the viscosity. The CMME from CCMO was successfully produced through the esterification-transesterification process. Indeed, it was found that the investigated parameters affected the acid value of the C. manghas oil. Likewise, KOH catalyst concentration, methanol to oil molar ratio, reaction temperature, reaction time, and stirring speed affected the CMME yield. Optimizing these process parameters maximized the conversion of CCMO into CMME. It was also found that the CMME yield was dependent on the physicochemical properties of the CCMO. Optimization of the process parameters for acid-catalyzed esterification and base-catalyzed transesterification was achieved using ANN models integrated with ACO. When performing ANNs, choosing a suitable number of neurons in the hidden layer in a cross-validation scheme in order to prevent overfitting to training data for the complexity of the experimental dataset was imperative [25,32]. The highest C. Manghas methyl ester yield was obtained through optimization parameter of ANN coupled with ACO models for esterification and transesterification processes. To prove the credibility of the optimization results, the experimental data for the four input variables used for the esterification process and the five input variables used for the transesterification process were included.
In total, our data comprised 29 and 46 models for the esterification and the transesterification processes, respectively, using ANN. For both of these processes, 70% of the data points were used for training, whereas the remaining 30% were used for validation and testing (i.e., validation and testing phases each consisted of 15% of the data points). A multi-layer perception (MLP) network with one hidden layer and the Levenberg-Marquardt training algorithm were used for testing, which varied the number of neurons from five to 10. Thus, we determined the correlation coefficients (R) and the mean squared errors (MSE) used for all cases, as shown in Table 6.
The neural network architecture for the esterification and the transesterification processes is shown in Figure 1a,b, respectively. For the esterification process, the number of neurons in the input layer was four, whereas the number of neurons in the output layer was one (Figure 1a). Here, the inputs were catalyst concentration, methanol to oil molar ratio, reaction temperature, and reaction time, whereas the output was the acid number of the C. manghas oil.
There were five neurons in the input layers, whereas there was one output layer for the transesterification process, as shown in Figure 1b. Here, the inputs were the same as those for the esterification process but with one additional input (stirring speed), and the output was the CMME yield. The optimum numbers of hidden neurons were 4-10-1 and 5-7-1 for the esterification and the transesterification processes, respectively. The number of hidden neurons that resulted in the highest R and the lowest MSE represented the optimum number of hidden neurons, as shown in Table 6. time, whereas the output was the acid number of the C. manghas oil. There were five neurons in the input layers, whereas there was one output layer for the transesterification process, as shown in Figure 1b. Here, the inputs were the same as those for the esterification process but with one additional input (stirring speed), and the output was the CMME yield. The optimum numbers of hidden neurons were 4-10-1 and 5-7-1 for the esterification and the transesterification processes, respectively. The number of hidden neurons that resulted in the highest R and the lowest MSE represented the optimum number of hidden neurons, as shown in Table 6.   Figure 2a,b shows the acid number and the CMME yield obtained from experiments plotted against those predicted by the ANN models for the esterification and the transesterification processes, respectively. The coefficients of determination (R 2 ) were 0.9882 and 0.9855 for esterification and transesterification, respectively. The high R 2 values (more than 95%) indicated that the ANN models described more than 95% of the variability in the acid number and the CMME yield. In addition, there was excellent agreement between the experimental and the predicted data for both models judging from the plots, since the experimental values fell close to the regression lines. Hence, it could be concluded that the ANN models were reliable to predict the acid number and the CMME yield in parameters affecting the process parameters for the esterification and the transesterification processes.
Next, the ANN model was integrated with ACO to predict the optimum process parameters for CMME production. For the esterification process, it was found that optimum H 2 SO 4 catalyst concentration, methanol to oil molar ratio, reaction temperature, and reaction time were 0.94 vol %, 10.5:1, 54.5 • C, and 71 min, respectively. The acid value predicted by the ANN model under these optimum process parameters was 3.27 mg KOH/g. The ANN model was validated by conducting four independent experiments for the esterification process using these process parameters, and it was found that the average acid value of the C. manghas oil was 3.42 mg KOH/g.
For the transesterification process, it was found that optimum KOH catalyst concentration, methanol to oil molar ratio, reaction temperature, reaction time, and stirring speed were 1.1 wt. %, 10.9:1, 55 • C, 72 min, and 1100 rpm, respectively. The corresponding CMME yield predicted by the ANN model was 98.72%. Likewise, the ANN model was validated by carrying out five independent experiments with these optimum process parameters, and it was found that the average CMME yield was 97.89%. The results shown in Figure 2 indicate that there was excellent agreement between Energies 2019, 12, 3811 13 of 21 experimental and predicted data for both acid value and CMME yield. ANN coupled with ACO models were reliable in predicting the parameters involved for esterification and transesterification processes.
For the transesterification process, it was found that optimum KOH catalyst concentration, methanol to oil molar ratio, reaction temperature, reaction time, and stirring speed were 1.1 wt. %, 10.9:1, 55 °C, 72 min, and 1100 rpm, respectively. The corresponding CMME yield predicted by the ANN model was 98.72%. Likewise, the ANN model was validated by carrying out five independent experiments with these optimum process parameters, and it was found that the average CMME yield was 97.89%. The results shown in Figure 2 indicate that there was excellent agreement between experimental and predicted data for both acid value and CMME yield. ANN coupled with ACO models were reliable in predicting the parameters involved for esterification and transesterification processes.

Sensitivity of the ANN Model Developed for Base-Catalyzed Transesterification
The new data using weights and biases of a developed ANN for the base-catalyzed transesterification process are presented in Table 7. Figure 3 shows the relative importance of each input variable (i.e., process parameter) on the output variable (i.e., CMME yield). It WAs evident that

Sensitivity of the ANN Model Developed for Base-Catalyzed Transesterification
The new data using weights and biases of a developed ANN for the base-catalyzed transesterification process are presented in Table 7. Figure 3 shows the relative importance of each input variable (i.e., process parameter) on the output variable (i.e., CMME yield). It WAs evident that the methanol to oil molar ratio haD the largest parameter on transesterification of the C. manghas oil, as indicated by its highest relative importance (0.381), followed by the catalyst concentration of KOH (0.2056), the reaction time (0.1902), and the stirring speed (0.1546). Interestingly, reaction temperature had the least effect on the transesterification process, as indicated by its lowest relative importance (0.0665).   Figure 4 shows the CMME yield as a function of the time for three different reaction temperatures (318, 323, and 328 K). The graphs were plotted based on optimum KOH catalyst concentration (1.2 wt %), methanol to oil molar ratio (11:1), and stirring speed (1000 rpm) for the transesterification process. It was observed that the transesterification process was characterized by a decreasing rate of reaction, since the slope of each plot was steeper during the first 45 min of transesterification, and the slope became flatter with an increase in time. It was observed that the CMME yield was higher for higher reaction temperatures. The highest CMME yield was obtained at 328 K. The higher CMME yields at higher reaction temperatures may have been due to the higher global reaction rate constant, which was derived from the Arrhenius law.

Kinetic Study
Most transesterification processes involved a three-step reaction, where one mol of triglycerides required 3 mol of methanol and then produced three mol of methyl ester [61,62]. In this study, a onestep kinetic model was used to represent the complete transesterification reaction. The global reaction  Figure 4 shows the CMME yield as a function of the time for three different reaction temperatures (318, 323, and 328 K). The graphs were plotted based on optimum KOH catalyst concentration (1.2 wt %), methanol to oil molar ratio (11:1), and stirring speed (1000 rpm) for the transesterification process. It was observed that the transesterification process was characterized by a decreasing rate of reaction, since the slope of each plot was steeper during the first 45 min of transesterification, and the slope became flatter with an increase in time. It was observed that the CMME yield was higher for higher reaction temperatures. The highest CMME yield was obtained at 328 K. The higher CMME yields at higher reaction temperatures may have been due to the higher global reaction rate constant, which was derived from the Arrhenius law.

Kinetic Study
Most transesterification processes involved a three-step reaction, where one mol of triglycerides required 3 mol of methanol and then produced three mol of methyl ester [61,62]. In this study, a one-step kinetic model was used to represent the complete transesterification reaction. The global reaction rate constant for the overall reaction was obtained. Hence, the three reaction steps (with formation of diglyceride, monoglyceride, and glycerol) combined into a single step [63]. The highest CMME yield found was attained when the KOH concentration and the methanol to oil molar ratio were 2.0 wt. % and 6.03:1, respectively. We plotted ln k versus 1/T plot and determined the activation energy and the frequency factor, which are represented by the slope and the intercept of plot, respectively. It was found that the activation energy was 79 kJ/mol, whereas the frequency factor was 2.98 (1010) min -1 . The activation energy for transesterification of the C. manghas oil was within the acceptable range (33.6-84.0 kJ/mol). However, the decrease in the transesterification reaction may have been due to the slow reaction rate and the deactivation of the KOH catalyst with an increase in time as well as contamination of the KOH catalyst, which reduced the reactivity of the reactants. the frequency factor, which are represented by the slope and the intercept of plot, respectively. It was found that the activation energy was 79 kJ/mol, whereas the frequency factor was 2.98 (1010) min -1 . The activation energy for transesterification of the C. manghas oil was within the acceptable range (33.6-84.0 kJ/mol). However, the decrease in the transesterification reaction may have been due to the slow reaction rate and the deactivation of the KOH catalyst with an increase in time as well as contamination of the KOH catalyst, which reduced the reactivity of the reactants.

Global Reaction Rate Constant
In this study, the set n = 1.1 and was plotted [1 − (1 − a) 1 − 1.1 ]/ (1 − 1.1) as a function of time, as shown in Figure 5. The slope of each graph was determined and is summarized in the results in Table  8. The slope of the [1 − (1 − a) 1 − 1.1 ]/(1 − 1.1) versus time plot represents the global reaction rate constant. The R 2 values were determined and are shown in Figure 5 and Table 8. Indeed, the R 2 value was high for each plot (more than 0.90), which justified the assumption of the five parameter optimizations made for this analysis. The R 2 value is an indicator of the accuracy (and hence, reliability) of the prediction models, whereby a higher R 2 value indicates higher accuracy. This indicates that the ANN model was reliable as a prediction model because of its high accuracy and low error values. It is evident from the residual error of the ANN model that there was good fit between the predicted and experimental data

Global Reaction Rate Constant
In this study, the set n = 1.1 and was plotted [1 − (1 − a) 1 − 1.1 ]/ (1 − 1.1) as a function of time, as shown in Figure 5. The slope of each graph was determined and is summarized in the results in Table 8. The slope of the [1 − (1 − a) 1 − 1.1 ]/(1 − 1.1) versus time plot represents the global reaction rate constant. The R 2 values were determined and are shown in Figure 5 and Table 8. Indeed, the R 2 value was high for each plot (more than 0.90), which justified the assumption of the five parameter optimizations made for this analysis. The R 2 value is an indicator of the accuracy (and hence, reliability) of the prediction models, whereby a higher R 2 value indicates higher accuracy. This indicates that the ANN model was reliable as a prediction model because of its high accuracy and low error values. It is evident from the residual error of the ANN model that there was good fit between the predicted and experimental data.     Figure 6 shows the plot of ln k versus the reciprocal of the reaction temperature (1/T). It was found that the activation energy for C. manghas oil was 25.12 kJ mol −1 , whereas the pre-exponential factor of the transesterification process was 356 kJ mol −1 .  Figure 6 shows the plot of ln k versus the reciprocal of the reaction temperature (1/T). It was found that the activation energy for C. manghas oil was 25.12 kJ mol −1 , whereas the pre-exponential factor of the transesterification process was 356 kJ mol −1 .

Physicochemical Properties of the CMME
The physicochemical properties of the CMME were produced and measured under optimum conditions in accordance with the ASTM D6751 and the EN 14214 standard test methods, and the results are summarized in Table 9.
It was observed that the physicochemical properties of the CMME were improved, and the results obtained were optimized process parameters predicted by the developed ANN models for esterification and transesterification processes. The results indicate that it is imperative to optimize

Physicochemical Properties of the CMME
The physicochemical properties of the CMME were produced and measured under optimum conditions in accordance with the ASTM D6751 and the EN 14214 standard test methods, and the results are summarized in Table 9.
It was observed that the physicochemical properties of the CMME were improved, and the results obtained were optimized process parameters predicted by the developed ANN models for esterification and transesterification processes. The results indicate that it is imperative to optimize the process parameters for esterification and transesterification processes in order to enhance the properties of the CMME.
The kinematic viscosity at 40 • C of the CMME was 3.92 mm 2 /s. The density at 15 • C of the CMME was 838.5 kg/m 3 , which was within the range (860-880 kg/m 3 ) given in the ASTM D6751 standard. In addition, the acid value of the CMME was 0.15 mg KOH/g, which was significantly lower than the maximum limit (0.50 mg KOH/g) stated in the ASTM D6751 standard [24,25,54]. From Table 9, it can be seen that CCMO obtained in the present study possessed lower kinematic viscosity, density, and acid value compared to previous results. Moreover, it was found that the optimization process resulted in a slight improvement of the properties of CMME.
The flash point of the CMME was 150.5 • C, which was lower compared to the previous study of 159.5 • C. This is an important property, as this indicates that biodiesel is not flammable and is safe to be used, especially during transportation, handling, and storage. Therefore, C. manghas biodiesel is desirable because it has a higher flash point than diesel, which reduces the risk of fire hazards when the biodiesel is stored and transported.
The Fatty acid Methyl Ester content of the CMME was 99.5 wt. %, which was slightly higher than the minimum value (96.5 wt. %) specified in the ASTM D6751 standard. CMME consisted of 73.0 wt. % of unsaturated Fatty Acid Methyl Ester compared with 26.5 wt. % of saturated Fatty Acid Methyl Ester content. The major Fatty Acid Methyl Ester contents of CMME were oleic acid (59.94%), followed by palmitic acid (18.75 wt. %), linoleic acid (13.06%), and stearic acid (7.78 wt. %). In general, the physicochemical properties of the CMME fulfilled the fuel specifications stipulated in the ASTM D6751 standard. This indicates that C. manghas oil is a potential feedstock for biodiesel production, provided that the optimum process parameters are used for esterification and transesterification.

Conclusions
In this study, the process parameters were optimized for acid-catalyzed esterification and base-catalyzed transesterification of C. manghas oil using ANN models integrated with ACO. Two ANN models (one for esterification and one for transesterification, respectively) were developed, and the Levenberg-Marquardt training algorithm was used for the ANN models.
For esterification, four parameters were optimized in order to minimize the acid value of the CMMO. The optimum methanol/oil molar ratio, H 2 SO 4 catalyst concentration, reaction temperature, and reaction time were 10.5:1, 0.94 vol %, 54.5 • C, and 71 min, respectively. For transesterification, five parameters were optimized to obtain high CMME yield. The optimum catalyst concentration, methanol to oil molar ratio, reaction temperature, reaction time, and stirring speed were 1.1 wt. %, 10.9:1, 55 • C, 72 min, and 1100 rpm, respectively.
The ANN models were validated by carrying out laboratory experiments for the esterification-transesterification process using these optimum process parameters. The average acid value obtained from experiments and the predicted acid value were 3.27 and 3.42 mg KOH/g, respectively. Likewise, the average CMME yield obtained from experiments was close to that predicted by the ANN model, with values of 97.89 and 98.72%, respectively. Based on the results, it can be concluded that the ANN models integrated with ACO are reliable to predict the process parameters for acid-catalyzed esterification and base-catalyzed transesterification, and we believe that these models can be used for other types of biodiesels as well.
The kinetic study was conducted to understand the mechanism of the transesterification process for C. manghas oil. It was found that the transesterification process was characterized by a decreasing rate of reaction, where the rate of reaction was faster during the first 45 min of transesterification and slowed down as the transesterification progressed. Applying a kinetic model was valuable in clarifying the release mechanism, which was helpful in both the experimental data and the kinetic model with the R 2 value of 0.9.
This showed that the proposed mechanism and the developed kinetic model were well justified, and the activation energy was 79 kJ/mol, whereas the frequency factor was 2.98 (1010) min −1 . The CMME yield was higher for higher reaction temperatures, and the highest CMME yield was obtained at 328 K. The higher CMME yield may have been due to the higher global reaction rate constant at higher temperatures. In addition, the global reaction rate constants obeyed the Arrhenius law.
Lastly, the measured CMME physicochemical properties fulfilled the specifications given in the ASTM D6751 standard. Most of the physicochemical properties of the CMME were inferior compared with those for diesel (except for the flash point) even though the CMME was produced through an optimized esterification-transesterification process. Moreover, the physicochemical properties of the