I'm working on a large power systems optimisation project in Python, where I'm optimising 6 system control parameters using particle swarm optimsation (PSO). I'm struggling to find a PSO package that can actually do what I need however. I'm currently using the 'pyswarm' package.
My problem has 6 control variables and it has constraints aside from the main objective function. The objective/fitness function is calculated in an external simulation, so every time that a new particle is tested, the sim program is opened, run, data exported then imported into Python. It's a ~16 second process for each swarm test, using a swarm size of 20. So with a typical 1000 iterations optimisation, that's 16,000 seconds to optimise, or 4.4 hours. I have 450 scenarios to optimise, which will take 82 days at the current rate. Obviously reducing the iterations will speed thigns up, but some scenarios will take a while to converge, so I'd like to keep the iterations high if possible.
All of the PSO implementations I've tried generate new particles as floats, with 6+ decimal point resolution. As I'm optimising for parameters in a physical system, I only really need results to 2 decimal places.
To speed up the optimisation, I want to use a PSO package where you can set the particle resolution, i.e. only try values with 2 decimal places. I figure this should make everything a lot faster, as the range of possible values is decreased hugely. I've used pyswarms, pyswarm, and psopy, but haven't found any package that can do this. Does anyone know how I could implement this? I'm not looking to write my own PSO implementation, just to use an existing package.
EDIT: To clarify, my logic is that currently, pyswarm produces float values for particles to a 6 decimal point resolution, so for a particle with a bound range of 20, there are 20 million possible values. If particle generation was limited to 2 decimal places, there would only be 2000 possible values for that same particle. Using a swarm size of 20, that means that in 100 iterations, every possible value for that particle would have been tested, so the solution would likely converge in well under 100 iterations (although this assumes unique values each time a particle is updated, which I don't believe is always the case).
Is this assumption correct, or is my logic here flawed?