Research Article

A Reputation Value-Based Task-Sharing Strategy in Opportunistic Complex Social Networks

Algorithm 1

Task-sharing decision model using improved PSO algorithm.
Input: acceleration factors , inertia weight , iterations , task-sharing decision model mentioned above
Output: the minimum of total system consumption of task-sharing decision model
Begin
(1), //spatial dimension, population size
(2),
(3)fitness(x)←Equation (13)//take total system consumption as the fitness function
(4)For each particle
(5) Initialize velocity and position for particle randomly
(6) evaluate particle and set
(7)End for
(8)While
(9)For k = 1 to 100
(10) Update the velocity and position of particle i according to equations (21), (22), (25), and (26)
(11) Evaluate particle i
(12) if
(13)
(14) if
(15)
(16)End for
(17)End while
(18)print
Stop