| Algorithm 1: The Task Allocation Algorithm |
| 1. |
Input: List of terminals positioning requests and list of edge nodes |
| 2. |
Output: Minimum service delay |
| 3. |
Initialize
|
| 4. |
Calculate and for
|
| 5. |
For all in edge nodes,
|
| 6. |
Initialize
|
| 7. |
Initialize the first generation chromosome |
| 8. |
While
do
|
| 9. |
Calculate fitness of each chromosome in the previous generation |
| 10. |
Calculate natural selection probability
|
| 11. |
Copy top 20% best individuals into next generation directly |
| 12. |
The roulette algorithm is used to selection operation for the remaining individuals |
| 13. |
Crossover operator |
| 14. |
Mutation operator |
| 15. |
Calculate the optimal allocation scheme and task processing time in this iteration |
| 16. |
Generate the next generation chromosomes |
| 17. |
End While
|
| 18. |
End For |
| 19. |
Calculate service delay of the whole system |
| 20. |
Return the optimal solution of service delay |