Research Article

Matching Sensor Ontologies with Simulated Annealing Particle Swarm Optimization

Algorithm 1

The pseudocode of SAPSO.
(1)Input: Source and target ontologies and , number of iteration , initial temperature ,
(2)population size
(3)for ( = 0;  < n; ++)
(4)for ( = 0;  < 3; ++)
(5)[i] = (0, 1)
(6)[i] = (0, 1)
(7)[i] = 
(8)calculate fitness [i]
(9)f [i] = fitness[i]
(10)end for
(11)end for
(12) =  {[i]}
(13) =  {[i]}
(14) =  {[i]}
(15)while < do
(16) = 
(17)for ( = 0;  < n; ++)
(18)for ( = 0;  < 3; ++)
(19)[i] = [i] +  ([i]) + 
(20)[i] = [i] + [i]
(21)update fitness[i]
(22)if (fitness[i] f [i])
(23)P = 1
(24)[i] = [i]
(25)else
(26)P = 
(27)if (P(0, 1))
(28)[i] = [i]
(29)end if
(30)end if
(31)f [i] = fitness[i]
(32)end for
(33)end for
(34) =  {[i]}
(35)={[i]}
(36)={[i]}
(37)Gbest ={f [i]}
(38)end while
(39)Output Gbest