Research Article
Improving Energy Efficiency of Multimedia Content Dissemination by Adaptive Clustering and D2D Multicast
Algorithm 1
The K-means-based D2D clustering algorithm.
| Run at the MCP | | Input: K, T, and the MCU set | | Output: the DCH set and the assignment relation matrix of MCUs MTK | (1) | Initialize Nk by randomly selecting K MCUs from Nt | (2) | Repeat | (3) | Initialize each member mtk in the matrix MTK as 0 | (4) | For t = 1 to T do | (5) | If then mtk = 1 End if | (6) | End for | (7) | For k = 1 to K do | (8) | and | (9) | End for | (10) | Until the members of Nk hardly change | (11) | For k = 1 to K do | (12) | Initialize dcluser as “0” | (13) | For t = 1 to T do | (14) | If (mtk == 1 and dtk > dcluster) then dcluster = dtkEnd if | (15) | End for | (16) | Initialize τ as “0” | (17) | For t = 1 to T do | (18) | Compute τt according to formula (27) | (19) | If (mtk == 1 and dtk < x% · dcluster and τ < τt) then {τ = τt; z = t} End if | (20) | End for | (21) | xk = xz and yk = yz | (22) | End for |
|