## 4 Proposed GA and DPSO Solutions
### DPSO Algorithm
#### 4.2.1 DPSO Approach  
Given that particle positions are real-valued, standard PSO equations clearly cannot be used to generate the solution of a discrete optimization problem. Therefore, we must modify the position and velocity vector represented in (15) and (16) in the original PSO algorithm such that it spans the discrete search domain. For our moving object coverage problem, we develop a DPSO algorithm that is an adaptation of the method established in [45] to update particle positions. According to [45], the position of the \(i\)th particle at iteration \(t\) can be updated as follows:  
\[X_{i}^{t+1}=c_{2}\;\oplus\;F_{3}\big{(}c_{1}\;\oplus\;F_{2}\big{(}\omega\; \oplus\;F_{1}\big{(}X_{i}^{t}\big{)},\;P_{i}^{t}\big{)},\;G^{t}\big{)} \tag{17}\]  
where \(F_{1}\), \(F_{2}\), and \(F_{3}\) are operations with the probabilities \(\omega\), \(c_{1}\), and \(c_{2}\), respectively. Given that \(\tau_{i}^{t+1}\) and \(\hat{\sigma}_{i}^{t+1}\) are temporary individuals, in the DPSO algorithm, the update equation consists of three components, and the particle velocities and positions are updated by using the following operations:  
* The first component is \(\tau_{i}^{t+1}=\omega\;\oplus\;F_{1}\big{(}X_{i}^{t}\big{)}\), which represents the velocity of the particle. \(F_{1}\) denotes the mutation operator, which corresponds to a probability of \(\omega\). In other words, a uniform random number \(r\) is generated between \(0\) and \(1\). If \(r\) is less than \(\omega\), the mutation operator is applied to generate a possible new particle by \(\tau_{i}^{t+1}=F_{1}\big{(}X_{i}^{t}\big{)}\). Otherwise, the current particle is kept as \(\tau_{i}^{t+1}=X_{i}^{t}\). * The second component is \(\delta_{i}^{t+1}=c_{1}\;\oplus\;F_{2}\Big{(}\tau_{i}^{t+1},\;P_{i}^{t}\Big{)}\), the \"cognitive\" part of the particle; that is, it represents the individual-level thinking of the particle. \(F_{2}\) represents the crossover operator, which corresponds to a probability of \(c_{1}\). Depending on the choice of a uniform random number, the outcome is either \(\delta_{i}^{t+1}=F_{2}\Big{(}\tau_{i}^{t+1},\;P_{i}^{t}\Big{)}\) or \(\delta_{i}^{t+1}=\tau_{i}^{t+1}\). * The third component, \(X_{i}^{t+1}=c_{2}\ \oplus\ F_{3}\left(\delta_{i}^{t+1},\ G^{t}\right)\), is the \"social\" part of the particle, representing interparticle collaboration. \(F_{3}\) denotes the crossover operator, which corresponds to a probability of \(c_{2}\). Depending on the choice of a uniform random number, the outcome is either \(X_{i}^{t+1}=F_{3}\left(\delta_{i}^{t+1},\ G^{t}\right)\) or \(X_{i}^{t+1}=\delta_{i}^{t+1}\). * The mutation operator \(F_{1}\) on a position \(X_{i}^{t}\) is defined as the exchange of two randomly selected sensor spots in a randomly selected zone. For example, with \(X_{i}^{t}=1\ 1\ 2\ 3\ |\ 4\ 5\ 6\ |\ 7\ 8\ 9\ |\) and the mutation point being the first and second positions in zone 3, by applying the mutation operator, we obtain \(\tau_{i}^{t+1}=1\ 2\ 3\ |\ 4\ 5\ 6\ |\ 8\ 7\ 9\ |\). * The crossover operator \(F_{2}\) is defined as taking \(\tau_{i}^{t+1}\) and \(P_{i}^{t}\) as the first and second parents as the crossover operator, respectively. When the crossover operator is applied, each of the different sensor spots in \(\tau_{i}^{t+1}\) and \(P_{i}^{t}\), from left to right, is taken to be exchanged if a uniform random number \(r\in(0,\ 1)\) is generated and if \(r<c_{1}\). For example, with \(\tau_{i}^{t+1}=|\ 1\ 2\ 3\ |\ 5\ 4\ 6\ |\ 9\ 7\ 8\ |\) and \(P_{i}^{t}=|\ 1\ 2\ 3\ |\ 5\ 4\ 6\ |\ 9\ 8\ 7\ |\), we obtain \(\delta_{i}^{t+1}=|\ 1\ 2\ 3\ |\ 5\ 4\ 6\ |\ 9\ 8\ 7\ |\) if both generated uniform random numbers are less than \(c_{1}\). The exchanged result must be a legal solution; therefore, some adjustments must be made. In our implementation, if \(\delta_{i}^{t+1}=|\ 1\ 2\ 3\ |\ 5\ 4\ 6\ |\ 9\ 8\ 8\ |\) after the exchange of \(\tau_{i}^{t+1}\) and \(P_{i}^{t}\) on the second position in zone 3, we adjust the third position in zone 3 from 8 to 7 to ensure its legality as a solution.