## 3 The Proposed System
### Energy Model
#### 3.2.3 The Coyote Algorithm (COY)  
The Coyote Optimization (COY) Algorithm was introduced by [28]. The algorithm depends on the adaptive behaviour of the coyote through the environment as well as the exchange of coyote experiences. COY has an interesting technique for balancing exploration and exploitation. The algorithm starts with population and coyotes as nominee solutions. COY models the social behaviour of coyotes as a function of cost.  
Coyotes hunt their prey in packs and the pack is controlled by an alpha male. The population size of coyotes is divided into a multiplication of the number of packs n\({}_{\text{pak}}\) and with n\({}_{\text{coy}}\) coyotes per pack. The social status of each coyote specifies a candidate solution S a nominee solution to the optimization problem [29]. The COY algorithm starts by assigning the coyotes coy\({}^{\text{th}}\) randomly to the packs pak\({}^{\text{th}}\) at t time. The social conditions for each coyote represent a single solution known as:  
\[S=(S_{1}.\ S_{2}.\ S_{3}\ \dots\ S_{D}) \tag{4}\]  
where \(D\) denotes the problem dimensions in the search space. In the first step: of (COY), the coyotes are commenced randomly within the previous search space. So, the random position solution is defined by:  
\[S_{cov,j}^{pak,t}=\left(1-r_{j}\right)_{j}+r_{j}+ub_{j} \tag{5}\]  
* \(lb_{j}\) and \(ub_{j}\) represent the lower and higher bounds of the search space.
* \(j\in 1.2\dots\ D\).
* The \(rj\) is a random number in the range \([0,1]\).  
The second step: the fitness function evaluates the adaptation of the coyotes to their special social environment as the following:  
\[fit_{cov}^{pak,t}=f\Big{(}S_{cov}^{pak,t}\Big{)} \tag{6}\]  
Coyotes have a proclivity to abandon their existing packs and join another pack. A coyote fluctuates based on pack size. This technique promotes global information sharing among coyote packs, which increases population diversity. The alpha coyote in any pack is the one who is the most familiar with the surroundings.  
The alpha may be calculated for a minimization issue by the following equation:  
\[alpha^{pak,t}\ =\Big{\{}S_{cov}^{pak,t}\Big{|}\ arg_{cov}=\big{\{}1.2\dots \.\ n_{cov}\big{\}}\min f\Big{(}S_{cov}^{pak,t}\Big{)}\Big{\}} \tag{7}\]  
The third step: after the coyote shares its special social environment with the rest of the pack to enhance the pack's survivability. In that regard, the new social condition of the coyote is updated by the equation:  
\[S_{cov,j}^{pak,t}=S_{cov,j}^{pak}+r_{1}*\delta_{1}+r_{2}*\delta_{2} \tag{8}\]  
where:  
* \(\delta_{1}\): the alpha's impact on a random coyote. \[\delta_{1}=alpha^{pak,t}-S_{cov,r_{1}}^{pak,t}\]
* \(\delta_{2}\): the space between the average location of all coyotes in a pack and any other coyote in the packs. \[\delta_{2}=alvgd^{pak,t}-S_{cov,r_{2}}^{pak,t}\]
* The \(r_{1}\) and \(r_{2}\) is a random numbers in the range \([0,1]\). The fourth step: the fitness function of the new solution using the next equation:  
\[newfit_{cov}^{pak,t}=f\Big{(}newS_{cov}^{pak,t}\Big{)} \tag{9}\]The final step: If the new social conditions are judged to be better than the prior, the coyotes might elect to maintain them. Otherwise, the latter will continue to be used as in equation:  
\[S^{pak.t+1}_{copy}=\left\{\begin{array}{cc}newS^{pak.t}_{copy}&if\ newfit^{pak.t}_{ copy}<fit^{pak.t}_{copy}\\ S^{pak.t}_{copy,j}&otherwise\end{array}\right. \tag{10}\]  
Finally, the coyote's social state that has best adapted itself is chosen and employed as the problem's overall solution.