Research Article

[Retracted] Self-Adaptation Resource Allocation for Continuous Offloading Tasks in Pervasive Computing

Algorithm 1

Ant Colony Optimization (ACO).
1. Initialization:
I. Initialize the pheromone value to a positive constant for each path between tasks and resources.
II. Optimal solution = null
III. Place the m ants on random resources
2. Solution construction of each unit:
Repeat for each ant
Put the starting resource in tabs list of this ant (for the first task)
For all the remaining tasks
a. Choose the next resourcefor the next taskby applying the following transition role.
  if j allowed, mean not in tab list
else 0
b. Put the selected resource in previous step into tab list of this ant
End For
Until each ant builds its solution
3. Fitness: compute the fitness value of the solution of each ant
4. Replacement: replace the optimal solution with the ant’s solution having best fitness value if its fitness value is better than optimal solution.
5. Pheromone updating:
6. Empty tab lists of all ants
7. Repeat steps 2 to 6 until the stopping condition is met. Stopping condition may be the maximum number of iterations or no change in fitness value of ants’ solutions in consecutive iterations
8. Output: Print Optimal solution
End Procedure