Skip to main content
. 2022 Mar 31;8:e937. doi: 10.7717/peerj-cs.937

Table 2. Pseudocode of developed RIWO.

Input: A: Arbitrary rider position, n: iteration, nmax: maximum iteration
Output: Leader AL
Begin
Initialize solutions set
Initialize algorithmic parameter
Discover error using Eq. (19)
While n < NOFF
For ν = 1 to P
Update bypass position with Eq. (29)
Update follower position with Eq. (39)
Update overtaker position with Eq. (27)
Update attacker position with Eq. (28)
Rank riders using error with Eq. (19)
Choose the rider with minimal error
Update steering angle, gear, accelerator, and brake
Return AL
n = n + 1
End for
End while
End