|
Algorithm 1 PSO-based device-centric QoS provisioning for SUs in a smart building. |
Require:
Available channels
Traffic classes C
Minimum QoS of classes
SUs of a class U
Acceleration coefficients ,
Random numbers ,
|
|
Ensure: Resource allocation
|
| while stoping criteria not meet do
|
| for (j: 1 to P) do
|
| for (d: 1 to D) do
|
| Initialize position
|
| Initialize velocity
|
| end
for
|
| Initialize particle personal best
|
| if
then
|
| global best position |
| end
if
|
| end
for
|
| for (j: 1 to P) do
|
| for (d: 1 to D) do
|
|
|
|
|
| end
for
|
| end
for
|
| end
while
|
| return
ϕ
|