Skip to main content
. 2017 Apr 9;17(4):808. doi: 10.3390/s17040808
Algorithm 5: MoveRWS algorithm. Function FindSequence finds a valid transition sequence, as can be seen in Figure 8. This function is also called before the initial recursion of the MoveRWS algorithm. Function ExchangeIdentifiers makes use of the information of the RWS algorithm (see Algorithm 2), and it exchanges agent identifiers on two adjacent configuration spaces, by exchanging the amount of triangular cells that have the lowest coverage cost, but are adjacent. It also propagates and extends this cost. Function RestOfSequence returns the remaining sequence for the specific P[i]P[i+1] transition, in order to initially transfer only the amount of triangular cells that are adjacent between i and i+1 until the final Uj UAV. In case this happens, the requested area has not been exchanged yet, so the algorithm runs recursively, and the last line takes a step back in sequence traversal.
S area size to be moved
Sadj(kl) the area size of adjacent triangular cells between UAV k and l
Pij the transition sequence between Ui and Uj for triangular cell exchange, treated as a list
Inline graphic