|
Algorithm 1: Service Caching Algorithm based on Gibbs Sampling |
|
Input:, , , , ,
|
|
Output:, , , ,
|
| 1: Initialize ,
|
| 2: for do |
| 3: Randomly select an MEC server and a feasible caching strategy ; |
| 4: Based on the previous round caching strategy , compute the task offloading strategy and resource allocation strategy and objective function value and ; |
| 5: Based on the current round caching policy , compute the task offloading strategy and resource allocation strategy and objective function value and ; |
| 6: Let with the probability ; |
| 7: Let with the probability ; |
| 8: end for |