
Figure 1
An overview of the StarPSO code structure. The four main packages are represented by the light blue tabbed ovals, while the modules inside each package are represented by light red ovals, with different edge color.
Table 1
A summary of the available options for the different StarPSO implementations. The default value for the “Mode” is marked with square brackets.
| ALGORITHM | VARIABLE TYPE | OPTIONS | ||
|---|---|---|---|---|
| ADAPTIVE | MODE | PARALLEL | ||
| Standard | Continuous | ✓ | [Gbest], FI, Multimodal | ✓ |
| Binary | Discrete | ✓ | [Gbest], FI | ✓ |
| Integer | Discrete | ✓ | [Gbest], FI | ✓ |
| Categorical | Categorical | ✓ | [Gbest], FI | ✓ |
| Quantum | Continuous | – | [Gbest], FI, Multimodal | ✓ |
| BareBones | Continuous | – | [Gbest], FI, Multimodal | ✓ |
| JackOfAllTrades | Mixed | ✓ | [Gbest], FI | ✓ |
Table 2
Types and default values of the termination conditions. The optional numeric conditions default to None.
| CONDITION | TYPE | DEFAULT VALUE | OPTIONAL |
|---|---|---|---|
| Maximum number of iterations | Integer | 1000 | No |
| Maximum fitness evaluations | Integer | None | Yes |
| Fitness (convergence) tolerance | Float | None | Yes |
| Found solution | Boolean | False | Yes |

Figure 2
Contour plot of the Himmelblau 2D function at different iterations: (a) at initialization, (b) after 10 iterations, (c) after 50 iterations, and (d) at convergence after 200 iterations. All of the four modes have been successfully identified by the swarm particles. The symbol “×” marks the location of the particle with the optimal fitness value.

Listing 1
Objective function template.

Listing 2
Simple multimodal example using the Himmelblau 2D function.
