## 3 Optimization Models
### Crested Porcupine Optimizer (CPO) Optimization
The second defense strategy is as follows: in this strategy, members of the population use acoustic methods to create noise and threaten predators. When a predator approaches, the porcupine's voice becomes louder. To model this behavior mathematically, it is represented using Equation (6):  
\[x_{i}^{\rightarrow}=(1-\overset{\rightarrow}{U_{1}})\times\overset{ \rightarrow}{x_{i}^{\prime}}+\overset{\rightarrow}{U_{1}}\times(\overset{ \rightarrow}{y}+\tau_{3}\times\overset{\rightarrow}{x_{r1}^{\prime}}- \overset{\rightarrow}{x_{r2}^{\prime}}) \tag{6}\]  
where \(r_{1}\) and \(r_{2}\) are two random integers between [1, N] and \(\tau_{3}\) is a random value generated between 0 and 1. In the development phase of the CPO optimization algorithm, when a predator approaches, the population members employ odor and physical attack strategies that focus on local search to exploit potential areas. The CPO algorithm uses these strategies to approximate the optimal solution in the search space. In the third strategy, population members secrete foil odors to discourage predators from approaching, the mathematical simulation of which is shown in Equation (7):  
\[x_{i}^{\rightarrow}=(1-\overset{\rightarrow}{U_{1}})\times x_{i}^{\rightarrow }+\overset{\rightarrow}{U_{1}}\times(x_{r1}^{\rightarrow}+S_{i}^{t}\times(x _{r2}^{\rightarrow}-\overset{\rightarrow}{x_{r3}^{\rightarrow}})-\tau_{3} \times\overset{\rightarrow}{\delta}\times\gamma_{t}\times S_{i}^{t}) \tag{7}\]  
where \(r_{3}\) is a random number between [1, N], \(\delta\) is a parameter controlling the search direction, defined by Equation (8), \(\overset{\rightarrow}{x_{i}^{t}}\) is the position of the \(i\)th individual at iteration \(t\), \(\gamma_{t}\) is a defense factor defined by Equation (9), \(S_{i}^{t}\) is the odor diffusion factor, defined by Equation (10). \[\overset{\rightarrow}{\delta}=\left\{ \begin{array}{c}+1,\;if\;rand\leq 0.5 \\ -1,\;Else\end{array} \right. \tag{8}\]  
\[\gamma_{t}=2\times rand\times(1-\frac{t}{t_{max}})^{\frac{t}{t_{max}}} \tag{9}\]  
\[S_{i}^{t}=exp(\frac{f(x_{i}^{t})}{\sum_{k=1}^{N}f(x_{t}^{k})+\epsilon}) \tag{10}\]  
where \(f(x_{t}^{i})\) denotes the value of the objective function of the \(i\)th individual at iteration \(t\), \(\epsilon\) is a small value to avoid division by zero, \(\overset{\rightarrow}{rand}\) is a vector containing random numbers between 0 and 1, \(rand\) is a random number between 0 and 1, \(N\) is the population size, \(t\) is the current number of iterations, and \(t_{max}\) is the maximum number of iterations. The vector \(\overset{\rightarrow}{U_{1}}\) simulates three scenarios: (1) when \(\overset{\rightarrow}{U_{1}}=0\), the predator stops moving and the population members stop spreading odors at the same distance, (2) when \(\overset{\rightarrow}{U_{1}}=1\), the population members release noticeable odors and (3) when \(\overset{\rightarrow}{U_{1}}\) is a combination of 0 and 1, the predator maintains a safe distance from the population members without the need to release large amounts of odors. The fourth defense strategy is physical attack. When a predator approaches, members of the population attack with short, thick feathers, simulating a one-dimensional inelastic collision. Its mathematical expression is shown in Equation (11). \[x_{i}^{\rightarrow}=x_{CP}^{\rightarrow}+(\alpha(1-\tau_{4})+\tau_{4})\times (\delta\times x_{CP}^{\rightarrow}-x_{i}^{\rightarrow})-\tau_{5}\times \delta\times\gamma_{t}\times\overset{\rightarrow}{F_{i}^{t}} \tag{11}\]  
where \(\overset{\rightarrow}{x_{CP}^{\rightarrow}}\) is the optimal solution, denoting the population member, \(\overset{\rightarrow}{x_{i}^{t}}\) is the position of the ith individual at iteration \(t\), denoting the predator at that position, \(\alpha\) is the convergence rate factor, \(\tau_{4}\) is a random value in the interval [0, 1] and \(\overset{\rightarrow}{F_{i}^{t}}\) is the average force affecting the ith predator's population member, as provided by the non-elastic collision law given by Equation (12):  
\[