RCAIDE.Framework.Optimization.Packages.particle_swarm.particle_swarm_optimization

particle_swarm_optimization#

particle_swarm_optimization(func, lb, ub, ieqcons=[], f_ieqcons=None, args=(), kwargs={}, swarmsize=100, omega=0.5, phip=0.5, phig=0.5, maxiter=100, minstep=1e-08, minfunc=1e-08, debug=False)[source]#

This function perform a particle swarm optimization (PSO)

Source:

Pyswarm: tisimst/pyswarm

Inputs:

func : The function to be minimized [function] lb : The lower bounds of the design variable(s) [array] ub : The upper bounds of the design variable(s) [array]

ieqconsA list of functions of length n such that ieqcons[j](x,*args)

>= 0.0 in a successfully optimized problem (Default: []) [list]

f_ieqconsReturns a 1-D array in which each element must be greater or equal

to 0.0 in a successfully optimized problem. If f_ieqcons is specified, ieqcons is ignored (Default: None) [function]

args : Additional arguments passed to objective and constraint functions [tuple] kwargs : Additional keyword arguments passed to objective and constraint functions [dict] swarmsize : The number of particles in the swarm (Default: 100) [int] omega : Particle velocity scaling factor (Default: 0.5) [float] phip : Scaling factor to search away from the particle’s best known position (Default: 0.5) [scalar] phig : Scaling factor to search away from the swarm’s best known position (Default: 0.5) [scalar] maxiter : The maximum number of iterations for the swarm to search (Default: 100) [int] minstep : The minimum stepsize of swarm’s best position before the search terminates (Default: 1e-8) [scalar] minfunc : The minimum change of swarm’s best objective value before the search terminates (Default: 1e-8) [scalar] debug : If True, progress statements will be displayed every iteration (Default: False) [boolean]

Outputs:

g : The swarm’s best known position (optimal design) [list] f : The objective value at g [float]

Properties Used:

None