skip to navigation
skip to content

Not Logged In

PyShoal 0.1.0

Particle Swarm Optimisation implementation.

PyShoal is an implementation of <Particle Swarm Optimisation> in Python.

Typical usage:

#!/usr/bin/env python
from pso import PSO

def rastrigin(a,b):
    return 0- (10 * 2 + \
           (a**2 - (10 * np.cos(2 * np.pi * a))) + \
           (b**2 - (10 * np.cos(2 * np.pi * b))))

obj_func = rastrigin
o = PSO(obj_func = obj_func,
        init_var_ranges = ((-500,500),(-500,500)),
        n_parts = 144,
        topo="gbest",
        weights=[0.9, 0.4, 1.0, 2.5])
res = o.opt(max_itr = 100,
            tol_thres = (0.01,0.01),
            tol_win = 5,
            plot = True,
            save_plots=False)
 
File Type Py Version Uploaded on Size
PyShoal-0.1.0.tar.gz (md5) Source 2012-07-14 17KB
  • Downloads (All Versions):
  • 3 downloads in the last day
  • 25 downloads in the last week
  • 144 downloads in the last month
  • Author: Will Furnass
  • License: LICENSE.txt
  • Package Index Owner: willfurnass
  • DOAP record: PyShoal-0.1.0.xml