X-Git-Url: http://git.tomasm.cz/imago.git/blobdiff_plain/417d32f3718d7c254275b67154a6f529b71face1..e3efa906f4d1c8203c88b5129cfa63598dbf3476:/pso.py diff --git a/pso.py b/pso.py index 9149167..c30bcfd 100644 --- a/pso.py +++ b/pso.py @@ -26,7 +26,7 @@ def move(particle, omega, phi_p, phi_g, v_max, global_best, func_d): def optimize(dimension, boundary, function_d, n_parts, n_turns): pool = multiprocessing.Pool(None) - v_max = 30. + v_max = boundary particles = [particle(dimension, boundary, v_max, function_d) for _ in xrange(n_parts)] gl_best = max(particles)