This PR implements an option to provide the swarm position, velocity and global best (or any particle) to the optimizer. This was performed by adding the following optional arguments to the optimizer class:
init_vel
init_best
The arguments were added to GlobalBestPSO, GeneralOptimizerPSO and LocalBestPSO as well as to the abstract base classes SwarmOptimizer and DiscreteSwarmOptimizer.
The current implementation does not allow to properly resume a previous optimization process. This PR makes it possible while maintaining full compatibility with previous versions.
How Has This Been Tested?
This has been tested in a limited manner so far. Only using GlobalBestPSO on Ubuntu 18.04, python 3.6.
Screenshots (if appropriate):
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly (modified docstrings in the code).
Description
This PR implements an option to provide the swarm position, velocity and global best (or any particle) to the optimizer. This was performed by adding the following optional arguments to the optimizer class:
init_vel
init_best
The arguments were added to
GlobalBestPSO
,GeneralOptimizerPSO
andLocalBestPSO
as well as to the abstract base classesSwarmOptimizer
andDiscreteSwarmOptimizer
.The optimizer can now be called as follows:
Related Issue
Motivation and Context
The current implementation does not allow to properly resume a previous optimization process. This PR makes it possible while maintaining full compatibility with previous versions.
How Has This Been Tested?
This has been tested in a limited manner so far. Only using
GlobalBestPSO
on Ubuntu 18.04, python 3.6.Screenshots (if appropriate):
Types of changes
Checklist: