|
Algorithm 5: Positions Dynamic Switch: Calculate
|
|
Require:
|
|
Ensure:
|
| 1: while
do
|
| 2: update() |
| 3: if
then
|
| 4:
|
| 5:
|
| 6: lowest battery drone |
| 7: if
then
|
| 8: Calculate SwitchMoveCost(ID,j) |
| 9: Initiate switch protocol |
| 10: if request accepted then
|
| 11: Inform next highest battery drone |
| 12: Broadcast has been switched |
| 13: end if
|
| 14: end if
|
| 15: end if
|
| 16: end while
|
| 17: Current time |