Skip to content

Commit

Permalink
Merge pull request #165 from bluescarni/pr/to_release
Browse files Browse the repository at this point in the history
Preparing 2.7
  • Loading branch information
bluescarni authored Apr 13, 2018
2 parents 1ff0631 + b94219c commit da85a98
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/sphinx/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changelog
=========

2.7 (unreleased)
2.7 (2018-04-13)
----------------

New
Expand Down
5 changes: 5 additions & 0 deletions doc/sphinx/docs/cpp/algorithms/pso_gen.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Particle Swarm Optimization Generational (GPSO)
===========================================================

.. doxygenclass:: pagmo::pso_gen
:members:
1 change: 1 addition & 0 deletions doc/sphinx/docs/cpp/cpp_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Implemented algorithms
algorithms/nlopt
algorithms/nsga2
algorithms/pso
algorithms/pso_gen
algorithms/sade
algorithms/sea
algorithms/sga
Expand Down
6 changes: 6 additions & 0 deletions doc/sphinx/docs/python/algorithms/py_algorithms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Differential Evolution (DE) :class:`pygmo.de`
Self-adaptive DE (jDE and iDE) :class:`pygmo.sade` S-U Exposed from C++
Self-adaptive DE (de_1220 aka pDE) :class:`pygmo.de1220` S-U Exposed from C++
Particle Swarm Optimization (PSO) :class:`pygmo.pso` S-U Exposed from C++
Particle Swarm Optimization Generational (GPSO) :class:`pygmo.pso_gen` S-U Exposed from C++
(N+1)-ES Simple Evolutionary Algorithm :class:`pygmo.sea` S-U (sto) Exposed from C++
Simple Genetic Algorithm :class:`pygmo.sga` S-U (sto) Exposed from C++
Corana's Simulated Annealing (SA) :class:`pygmo.simulated_annealing` S-U Exposed from C++
Expand Down Expand Up @@ -129,6 +130,11 @@ Algorithms exposed from C++

-------------------------------------------------------------

.. autoclass:: pygmo.pso_gen
:members:

-------------------------------------------------------------

.. autoclass:: pygmo.nsga2
:members:

Expand Down
10 changes: 6 additions & 4 deletions pygmo/docstrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,8 @@ The best known solution for the )"
+ name + R"( problem.
Returns:
1D NumPy float array: the best known solution for the )" + name + R"( problem
1D NumPy float array: the best known solution for the )"
+ name + R"( problem
)";
}
Expand Down Expand Up @@ -2709,7 +2710,7 @@ std::string pso_gen_docstring()
{
return R"(__init__(gen = 1, omega = 0.7298, eta1 = 2.05, eta2 = 2.05, max_vel = 0.5, variant = 5, neighb_type = 2, neighb_param = 4, memory = False, seed = random)
Particle Swarm Optimization (generational) is identical to `pagmo::pso`, but does update the velocities of each particle before new particle positions are computed (taking
Particle Swarm Optimization (generational) is identical to :class:`~pygmo.pso`, but does update the velocities of each particle before new particle positions are computed (taking
into consideration all updated particle velocities). Each particle is thus evaluated on the same seed within a generation as opposed to the standard PSO which evaluates single particle
at a time. Consequently, the generational PSO algorithm is suited for stochastic optimization problems.
Expand Down Expand Up @@ -4683,7 +4684,8 @@ Set the seed for the ``"random"`` selection/replacement policies.
seed (``int``): the value that will be used to seed the random number generator used by the ``"random"``
election/replacement policies (see :attr:`~pygmo.)"
+ algo + R"(.selection` and
:attr:`~pygmo.)" + algo + R"(.replacement`)
:attr:`~pygmo.)"
+ algo + R"(.replacement`)
Raises:
OverflowError: if the attribute is set to an integer which is negative or too large
Expand Down Expand Up @@ -5567,4 +5569,4 @@ Clear all numeric options.
)";
}

} // namespace
} // namespace pygmo

0 comments on commit da85a98

Please sign in to comment.