Skip to content

ArchitWagle/pso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

particle swarm optimizer

this is a simple implementation of a particle swarm optimizer in c++, and it's visualization using matplotlib

particles are implemented as a vector of objects. The optimize() function outputs the position of each particle on every iteration (separated by a tab), which is piped to the plotting.py file.

Set the functions in the function call to optimize() and also in the plotting.py( to get the contour plot of the objective function in the background) The blue lines represent particles The green line represents group best position