Particle swarm optimization algorithm (PSO) for a minimization problem. In this project, nonlinear constraints are implemented as infeasible solutions. This project is implemented in C++17. Constraints and objective in one function.
- Template class for particles with number of variables as the template parameter is used to initialize the arrays of the needed size.
- Template function for pso with number of variables and swarm size is as the template parameters is used to initialize arrays accordingly
- The cost function should accept one array as input and output a pair of doubles representing cost and constraint of the problem respectively.
- The Mutation is used to avoid local minima.
[] More explanation of the functionality