Optimization Algorithm Applied to Environmental Control in Broiler Houses

The present study aimed to apply the Simulated Annealing (SA) optimization algorithm to find the ideal control of broiler housing rearing environment at 21, 28, 35, and 42 days of growth. Data from four types of houses using environmental control and similar flock density were recorded weekly in the morning and afternoon, during two seasons (summer and winter). The variables related to environmental and air quality data (temperature, relative humidity, air velocity, ammonia, and carbon dioxide concentrations) were registered and organized into the database to provide a descriptive analysis. The ideal rearing conditions were established as a goal, and we used the Simulated Annealing optimization algorithm to process the data. Such an approach may be applied in the cases that the ideal condition of optimization has multiple objectives, and when each variable is the result of a process. The model was implemented considering the optimal controlled environmental condition that depends on the age of broilers. Results indicated that there was a large dispersion of the data collected from the environmental variables. The process suggested that the optimized functions lead to absolute values obtained by the algorithm for each of the environmental factors of the controlled environmental system, representing the optimal condition of the environment found for each broiler age, considering the interactions of the variables. The maximum optimization was prominent to 21 and 35-d old birds, representing 4048% of the improvement of the process. 28 and 42-d old birds might benefit from the controlled environmental optimization process by up to 30%.


INTRODUCTION
The ideal conditions of air temperature and relative humidity for broiler chickens rearing throughout the growth allows the best performance. In current literature (Yahav, 2000;Quinteiro-Filho et al., 2012;Olfati et al., 2018;Yousaf et al., 2019), authors state the importance of maintaining the proper thermoneutral zone for allowing the birds to avoid heat or cold stress according to the stage of growth. Such conditions demand the use of controlled environmental systems tuned to the age of the broilers.
According to Meluzzi & Sirri (2008), when the outside temperature is above 30 °C, the temperature inside the house must not exceed 3°C concerning the outside temperature, whereas if the outside temperature is below 10 °C, the humidity must not exceed 70%. When the relative humidity is below 50%, there is an increase in dust and microorganism dispersion in the air, leading to respiratory diseases (Yahav, 2000). Relative humidity above 80% hinders the latent heat loss of the birds, generated by an environment with a high flock density in a cooler period. Therefore, controlling the relative humidity using adequate Benvenga MAC, Nääs IA, Lima NDS, Carvalho-Curi TMR, Reis JGM

Optimization Algorithm Applied to Environmental Control in Broiler Houses
airflow is essential to achieve thermal comfort inside broiler housing.
Ventilation rate and distribution is a critical aspect in controlled environmental systems in broiler houses. Inadequate ventilation might lead to high concentrations of noxious gases, impairing the birds' breathing and damaging the eyes with serious welfare consequences (Oyetunde et al., 1978;Nääs et al., 2007;Nassem & King, 2018). The association with proper ventilation to remove gases and dust and evaporative cooling to reduce the air temperature is the best solution. However, for each week of growth, the needs of broilers change, making the design of an adequate environmental system a big challenge.
According to Kirkpatrick et al. (1983), Simulated Annealing (SA) or simulated tempering, is a technique that simulates the process of annealing metals, in which the metal is heated to high temperatures and a systematic cooling of it is carried out in order to reach an equilibrium point characterized by an orderly and stable microstructure. Before processing the SA, it is necessary to define the cooling chrono-gram determined by the Temperature Decline Scheme (TDS). The TDS defines how the temperature is decreased and the number of iterations performed at each temperature. The convergence of the SA, the processing time, and the probability of acceptance are directly linked to the adopted TDS. Oysu & Bingul (2009) point out that one of the difficulties in determining TDS is that each problem requires a type of temperature variation, similarly to the broiler rearing conditions.
Since the variation of broiler housing cooling depends on the birds' age and a proper balance of environmental and air quality variables, we aimed to apply the Simulated Annealing (SA) optimization algorithm to find the ideal control of broiler housing rearing environment.

MATERIAL AND METHODS
The study was based on four types of houses (blue-house, dark-house, masonry walls, and wide). The blue-house (A) had eight exhaust fans in the air outlet, open-sided walls closed with two layers of blue polypropylene curtains, a mean flow of 22000 m 3 h -1 , and the evaporative cooling pads were located at the front of the house. The dark-house (B) had had ten exhaust fans, open-sided walls closed with two layers of black polypropylene curtains, and a mean flow of 34000 m 3 h -1 . The mansory walls (C) house had 16 exhaust fans and a mean flow of 41100 m³ h -1 . The wide broiler house (D) had 15 exhaust fans and flow of 50460 m³ h -1 . All houses had similar flock density. Houses B, C, and D had lateral evaporative cooling pads in the air inlet.
Environmental and air quality data (temperature, Tbs; relative humidity, RH; air velocity, Var; ammonia, NH 3 ; and carbon dioxide, CO 2 ) were collected weekly, twice a day (morning and afternoon) and in two seasons (winter and summer) during the medium to the last stage of growth (21-d to 42-d old broilers).
The Simulated Annealing (SA) algorithm Table 1 shows the parameters used to define the TDS and the value adopted for each of them in this study. The function of the decrease in temperature (Table  1) determines a linear decrease. Figure 1 (Vasan & Raju, 2009) illustrates the main steps of the process optimization technique through Simulated Annealing. In the flowchart of Figure 1, the variable number of iterations (NI) refers to the number of iterations or cycles that the algorithm will repeat. The "Metropolis criterion," according to Vasan & Raju (2009), is the probability that the next point will be at x (t' + 1). It Benvenga MAC, Nääs IA, Lima NDS, Carvalho-Curi TMR, Reis JGM

Optimization Algorithm Applied to Environmental Control in Broiler Houses
varies on the difference in values depending on these two points or ΔE = E (t' + 1) -E (t'). The probability of P (E (t' + 1)) is calculated using Boltzmann probability distribution (Eq. 1).
where e (-ΔE/kbT) indicates the speed of the temperature decrease.
The basic scheme of the experiment can be described as follows: f(x) is the studied phenomenon that is the maximization of the environmental variables of broiler housing (variables x1, x2, x3, x4, x5).
The environmental and air quality variables (temperature, Tbs; relative humidity, RH; air velocity, Var; ammonia, NH 3 ; and carbon dioxide, CO 2 ) were considered dependent variables, and the response variable was estimated as the performance of the broilers in each breeding period (21, 28, 35 and 42 days of growth). The ideal rearing conditions were considered, according to the current literature (Yahav, 2000, Yahav et al., 2001Nääs et al., 2010;Quinteiro-Filho et al., 2012;Yousaf et al., 2019).
The optimization of the model was performed using the metaheuristic algorithm Simulated Annealing (SA) (Eq. 2). The model was implemented in cases of optimization with multiple objectives when each variable is the result of a process (Kikpatrick et al., 1983). Seven design variables were considered in the time of data collection (x 1 ), Tbs (x 2 ), UR (x 3 ), Var (x 4 ), NH 3 (x 5 ), CO 2 (x 6 ).
The interval of x i variation and the domain range of the environmental variables involved in the optimization model is shown in Table 2. These data are considered by the optimization algorithm, which must not exceed the limits of this established domain when assigning values for each of the variables.
Simulated Annealing is a technique that simulates the forging of metals, followed by a systematic change of temperature in order to reach an equilibrium point characterized by a stable microstructure (Kirkpatrick et al., 1983). Before processing the SA, the cooling schedule determined by the Temperature Decline Scheme (TDS) is defined. The TDS refers to the temperature decrease and the number of iterations performed at each temperature. The convergence of the SA, the processing time, and the probability of acceptance are directly linked to the adopted TDS (Linden, 2008). In the present study, the variable Ei is the scaling weight for each variable x i (Eq. 2) changed by the age of the bird (21, 28, 35, and 42 days) ( Table 3). The scaling weights (Table 3) balances equivalent possible differences in scales between the variables that make up the multiobjective function. If any variable is on a scale different from the others, any increase or decrease in the value of these, even if relatively insignificant, can dominate any other variable disproportionately (Linden, 2008;Gandomi et al., 2013).

Experimental procedure
Experimental tests were treated separately for the domain values of the process variables obtained from the databases by the age of the birds. For this, an application was developed that represented the SA algorithm in VBA/Excel language. This application was selected due to the simplicity in generating Benvenga MAC, Nääs IA, Lima NDS, Carvalho-Curi TMR, Reis JGM

Optimization Algorithm Applied to Environmental Control in Broiler Houses
and tabulating data in tables and updating graphs. The optimization of the model was done using the metaheuristic algorithm Simulated Annealing (SA) (Akay & Karaboga, 2012).
The parameterization of SA requires the selection of the variables that influence the behavior of the algorithm, which are its processing parameters (Kirkpatrick et al., 1983;Mezura-Montes & Colle, 2005). Those were considered the SA parameters, as follows: 1) Initial Temperature = 100; the number of cycles that will be processed in a loop of repetition of the algorithm; 2) TDS = 1; the Temperature Decline Scheme and defines how the temperature is decreased, and the number of iterations performed for each temperature. The temperature decrease function is represented in Eq. 3, using the number of iterations in each temperature = 1.

RESULTS AND DISCUSSION
The environmental data of the studied houses were tabulated and organized, and the descriptive analysis is presented in Figure 2.  Figure 5 shows the dispersion of the data collected from the environmental variables by each studied broiler house with the information of the median and quartiles. The first quartiles represent the bases of the rectangles. Below, these points are located 25% of the observations in the ordered series. The rectangles (or boxes) are divided by a line segment, representing the median (as 50% of the observations are below and 50% above). The top of the rectangles corresponds to the third quartile. Below this point is 75% of the observations and above 25%. The ends of the line segments above and below represent the maximum and minimum points of the ordered series. Table 4 shows the comparison of the data using measures of the central position. After processing the experimental tests performed separately according to the age of the birds (21, 28, 35, and 42 days), the results were collected, and it was possible to identify the improvement rates of the combined environmental conditions obtained in the optimization process. Figure 3 shows the behavior of the curves resulting from the improvement index data between the first obtained results at each age of the birds (21-d to 42-d). The data refer to results obtained Benvenga MAC, Nääs IA, Lima NDS, Carvalho-Curi TMR, Reis JGM

Optimization Algorithm Applied to Environmental Control in Broiler Houses
by the optimization algorithm to estimate the optimal variables of the controlled environment factors and the borderline values of these values for the domain range. Each experimental trial, performed by the Simulated Annealing algorithm, occurred in a total of 3,000 iterations. Finally, the most valuable data are the absolute values obtained by the algorithm for each of the environmental factors of the controlled environmental system, which, combined with the objective function used in this research, represent the optimal condition of the environment found for each broiler age (Table 5). The maximum optimization was noticeable to 21 and 35-d old birds, representing 30-48% of the increase in the efficiency of the process. 28 and 42-d old birds might profit from the controlled environmental optimization process by up to 30%.
The data from the optimization results presented in Table 5 provide the farmer with optimum environmental values of the variables that might minimize cost and maximize production (Vasan & Raju, 2009).
Heat stress is a challenge in tropical countries such as Brazil. Broilers exposed to heat stress impact performance (Zhou &Yamamoto, 1997;Quinteiro-Filho et al., 2012;Baracho et al., 2019) and decrease the relative weight of the lymphoid organs (Niu et al., 2009;Quinteiro-Filho et al., 2012). Usually, a controlled environment system is used by farmers to mitigate heat stress (Zhao et al., 2013). However, when not properly designed, the system might use energy but does not remove the excess of heat inside the housing. On the other hand, excess ventilation might increase the dust distribution, reducing air quality (Banhazi et al., 2008). Another critical issue inside broiler housing is the noxious gases from the built-up litter and the broilers respiration. Both ammonia and carbon dioxide need to be removed by the ventilation to reduce the risk of respiratory diseases and improve air quality (Yahav et al., 2001;Nääs et al., 2007). The harmful effects of ammonia on broiler chicken performance have been previously studied (Naseem & King, 2018).
Chronic e xposure to NH 3 may provoke a compensatory response to the pollutant and lessen its harmful effect (Yahav, 2004). Exposure to ammonia leads to changes in the pulmonary function that supports the broiler respiratory system, which plays a significant part in controlling body temperature (by panting) at high environmental temperatures. The effect of ammonia on the ability of broiler chickens to thermoregulate was studied by Yahav (2004). The author concluded that different ammonia concentrations significantly reduce broiler performance. Therefore, proper ventilation of the poultry house is essential to maintain air quality.
The search for more efficient solutions in broiler production requires optimizing a set of processes, which depend mainly on monitoring by sensors and equipment. In practice, it improves the use of tools by increasing precision, reducing errors, and supporting decision making (Sinduja et al., 2016;Amir et al., 2016;Yasmeen et al., 2019). The results of the present study suggest that this approach has the potential to improve strategies for controlling environmental conditions on farms during the production process, supporting automatic control.

CONCLUSION
A metaheuristic optimization algorithm Simulated Annealing (SA) was proposed to improve the multivariable issue of developing an environmental control system for poultry houses. The results found suggest that it is possible to reach up to 48% improvement in the system. Benvenga MAC, Nääs IA, Lima NDS, Carvalho-Curi TMR, Reis JGM