Algorithm. D-GSO |
Step 1. classes of generic services are present in the composition component, where each class has |
candidate services. The maximum pursuit distance is calculated from the following equation: |
, (i) |
Each candidate service has QoS attributes, which are rearranged into [] according to the weights in |
descending sequence. The candidate services of generic service are reordered into a set |
with reference to in turn. |
Step 2. Set ; |
Randomly initialize instantiations ] () with of services composition |
component and head angle of all initial instantiations; |
Calculate the values of initial instantiations according to the cost function; |
WHILE (the best instantiation is not found) |
FOR (each instantiation where in the group) |
Choose the producer: |
Find the producer with the lowest cost in the group; |
Perform producing: |
(a) The producer will scan at zero degree and then scan laterally by randomly sampling three instantiations in the scanning |
field: one instantiation at zero degree, one instantiation in the right-hand side of the hypercube, and one instantiation in the |
left-hand side of the hypercube. is a normally distributed random number with mean 0 and standard deviation 1, |
where as is a uni-formly distributed random sequence in the range (0, 1); |
, (ii) |
, (iii) |
, (iv) |
(b) The producer will find the best instantiation where with the lowest cost. |
If the best instantiation has a lower cost compared with the current instantiation, then the best instantiation |
will be chosen; otherwise, the current instantiation will remain and turn its head to a new randomly generated angle. |
is the maximum turning angle; |
, (v) |
(c) If the producer cannot find a better instantiation after iterations, then the producer will turn its head back to zero degree; |
, (vi) |
Perform scrounging: |
Randomly select 80% members from the rest of the instantiations to perform scrounging. |
The area copying behavior of the th scrounger can be modeled as a random walk toward the producer. |
In (vii), is a uniform random sequence in the range (0, 1); |
, (vii) |
Perform dispersion: |
The rest of the instantiations will be dispersed to perform ranging: (1) generate a random head angle by using (v); (2) choose |
a random distance from the Gauss distribution by using (viii); transform into the new instantiation by using (ix); |
, (viii) |
. (ix) |
Calculate fitness: |
Calculate the values of the current instantiations according to the cost function; |
END FOR |
Set ; |
END WHILE |