ljvmiranda921 / pyswarms

A research toolkit for particle swarm optimization in Python
https://pyswarms.readthedocs.io/en/latest/
MIT License
1.27k stars 333 forks source link

Performance and boundary conditions for pyswarms.discrete package #487

Closed ewaagaard closed 2 years ago

ewaagaard commented 2 years ago

I used the pyswarms.discrete.binary module for a custum objective function. However, I noticed that the discrete optimizer remains very close to the initial conditions, or goes directly to [1, 1] and stays there, also for modified version of standard test functions such as Rosenbrock and the sphere function (f = \vec{x}^2). The particle swarm only searches around the starting position for the discrete case, although I try to regulate the different parameters. For the continuous versions, such as GlobalBestPSO in the Rosenbrock example in the online documentation, the optimiser very quickly finds the minimum despite a swarm starting position that is far away. A quick example with a custom objective function would be very helpful, also to see how it converges properly!

Another suggestion is also to include bounds for the pyswarms.discrete.binary module, just like in the case of the pyswarms.single package to constrain the optimization to relevant domains. Would this be possible to implement?

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.