Research Article

Web Service Composition Optimization with the Improved Fireworks Algorithm

Algorithm 1

The pseudocode of FWA++.
Input: - population size,
- total numbers of sparks generated by the fireworks,
- the maximum explosion amplitude,
- the number of mutation sparks each generation
Output: (the best solution)
1: Initialize fireworks population ;
2: Calculate the fitness value of each firework and store them to the
3: candidate set.
4: whiledo
5: for each firework do
6:  //in Eq. (5), is dynamic in each generation.
7:  //in Eq. (6), is random in each generation.
8:  Calculate the explosion amplitude and the number of explosion sparks
9:  by Eqs. (5), (6), and (7);
10:  Obtain locations of sparks of the firework using Eqs. (6), (7), and (8);
11:  Calculate the fitness value of each explosion spark and store them to the
12:  candidate set.
13: end for
14: for to do
15:  Randomly select an individual from all fireworks;
16:  Generate a Gaussian spark for the firework by Eq. (10);
17:  Map the sparks exceeding the search range into the search space by Eq. (11);
18:  Calculate the fitness value of each Gaussian spark and store them to the
19:  candidate set.
20: end for
21: Select the best location and keep it for next explosion generation;
22: Randomly select locations from the candidate set (two types of sparks
23: and the current fireworks);
24: ;
25: end while
26:Return