Research Article
An Optimization Method for Mobile Edge Service Migration in Cyberphysical Power System
Algorithm 1
PSO algorithm to solve problem P1.
Input: base station location, user moving path | Output: number of wireless handoffs, energy consumption | Begin | 1: //initialization | 2: for each particle do | 3: Randomly select numbers from the interval as the position of | 4: Randomly select numbers from the interval as the speed of | 5: Apply formulas (4)–(8) to evaluate particle | 6: The historical optimal position of particle | 7: end for | 8: Global optimal position | 9: whiledo: | 10: fortodo | 11: Apply formula (11) to update velocity of particle | 12: Apply formula (12) to update position of particle | 13: // Update and | 14: ifdo | 15: | 16: ifdo | 17: | 18: end for | 19: end while | End |
|