## 3 Mathematical Representation of the Optimization Technique  
### Jellyfish Optimization Algorithm:  
The main inspiration of the JS algorithm is the search behavior of jellyfish for food sources in the ocean, considering their intelligent movement behavior when detecting the best location of aliments [28]. Three rules are adopted in JS modeling:  
* Two types of jellyfish movement can be handled by the time control mechanism: moving in the jellyfish swarm or following the ocean current. * When searching for food sources in the ocean, jellyfish move in an attractive manner towards the best locations of nutrients. * The quantity of food found by jellyfish and its location correspond to the objective function of the problem and the corresponding solution, respectively. (a) Ocean current The ocean current includes a considerable amount of food sources, and jellyfish are drawn to its flow. In such a case, the jellyfish update their positions based on the following equation:\[X_{i}(t+1)\ =\ X_{i}(t)+rand(0,1)\mu(X^{*}-\beta\times rand(0,1)),\ \mathrm{i}\ =\ 1,\ 2,\ 3,\mathrm{N_{pop}} \tag{23}\]  
where \(X^{*}\): the current best global position of jellyfish in the swarm, \(rand(0,1)\): the uniform random number in the interval [0, 1], \(\mu\): the mean location of all jellyfish, and \(\beta\): the distribution coefficient. The determination of \(\beta\) and the ocean current direction are given in [28], with \(\beta\ =\ 3\) referring to numerical tests. \(X_{i}(t)\) and \(X_{i}(t+1)\) are the jellyfish positions at the iterations t and (t + 1), respectively, and \(N_{pop}\): the number of jellyfish. (b) Jellyfish swarm  
In swarms, jellyfish show passive (type A) and active (type B) motions. In the beginning when the swarm is created, jellyfish exhibit the passive motion type (A). Over time, they increasingly exhibit a type B motion. Type A motion is the motion of jellyfish around their own locations, and the consistent updated location of each jellyfish is given by:  
\[X_{i}(t+1)\ =\ X_{i}(t)+\gamma\times rand(0,1)\times(U_{b}-L_{b}) \tag{24}\]  
In order to simulate type B motion, a jellyfish (j) is selected randomly, other than the current jellyfish (i), and a distance vector is formed between jellyfish (i) and jellyfish (j) to establish the step and the direction of the movement. When the quantity of food at the location of the selected jellyfish (j) exceeds that at the location of the jellyfish (i) of interest, the latter moves toward the former; it moves directly away from it if the quantity of food available to the selected jellyfish (j) is lower than that available to the jellyfish of interest (i). So, each jellyfish moves toward a better direction to find the food in a swarm [28]. This behavior can be simulated by the following equations:  
\[\overrightarrow{Step}\ =\ X_{i}(t+1)-X_{i} \tag{25}\]  
where  
\[\overrightarrow{Step}\ =\ rand\ (0,\ 1)\times\overrightarrow{Direction} \tag{26}\]  
\[\overrightarrow{Direction}\ =\ \left\{ \begin{array}{ll}X_{j}(\mathrm{t}) \mathrm{-}X_{i}(\mathrm{t})&if\ f(X_{i})\geq\ f\big{(}X_{j}\big{)}\\ X_{i}(t)-X_{j}(t)&if\ f(X_{i})<f\ \big{(}X_{j}\big{)}\end{array} \right. \tag{27}\]  
Here,\(f\) is an objective function of location \(X\), and hence the active motions (type B) are accomplished using the following expression:  
\[X_{i}(t+1)\ =\ X_{i}(t)+\overrightarrow{Step} \tag{28}\]  
A control parameter, time control mechanism, is employed to switch between the passive and active types of motion. It can also be used to manage the movement of jellyfish in the direction of the ocean current. (c) Time control mechanism  
At each level of changes in wind or temperature, the jellyfish change their positions to another ocean current and a new jellyfish swarm is created. Inside this swarm, the jellyfish favor the passive motion type A in the beginning of the search phase. Over time, the jellyfish begin to prefer active motion (type B).