Skip to content

Commit

Permalink
Rename schittkowsky to schittkowski, after recent changes in pagmo.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Oct 3, 2022
1 parent de32857 commit 97770b2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Common Name Docs of the python cl
Ackley :class:`pygmo.ackley` S-U
Golomb Ruler :class:`pygmo.golomb_ruler` S-C-I
Griewank :class:`pygmo.griewank` S-U
Hock Schittkowsky 71 :class:`pygmo.hock_schittkowsky_71` S-C
Hock schittkowski 71 :class:`pygmo.hock_schittkowski_71` S-C
Inventory :class:`pygmo.inventory` S-U-sto
Lennard Jones :class:`pygmo.lennard_jones` S-U
Luksan Vlcek 1 :class:`pygmo.luksan_vlcek1` S-C
Expand Down
2 changes: 1 addition & 1 deletion doc/problems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Problems exposed from C++

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

.. autoclass:: pygmo.hock_schittkowsky_71
.. autoclass:: pygmo.hock_schittkowski_71
:members:

-------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions pygmo/_algorithm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def run_scipy_wrapper_tests(self):
ackley,
algorithm,
golomb_ruler,
hock_schittkowsky_71,
hock_schittkowski_71,
luksan_vlcek1,
minlp_rastrigin,
population,
Expand Down Expand Up @@ -512,7 +512,7 @@ def run_scipy_wrapper_tests(self):

# testing constraints with gradients and Hessians
methods = ["trust-constr", None]
prob = problem(hock_schittkowsky_71())
prob = problem(hock_schittkowski_71())
pop = population(prob=prob, size=1, seed=0)
init = pop.champion_f

Expand Down
6 changes: 3 additions & 3 deletions pygmo/docstrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ will be set to the provided scalar value.
type conversion errors, mismatched function signatures, etc.)
Examples:
>>> from pygmo import problem, hock_schittkowsky_71 as hs71
>>> from pygmo import problem, hock_schittkowski_71 as hs71
>>> prob = problem(hs71())
>>> prob.c_tol
array([0., 0.])
Expand Down Expand Up @@ -2243,7 +2243,7 @@ change in the search range.
>>> from pygmo import *
>>> algo = algorithm(compass_search(max_fevals = 500))
>>> algo.set_verbosity(1)
>>> prob = problem(hock_schittkowsky_71())
>>> prob = problem(hock_schittkowski_71())
>>> pop = population(prob, 1)
>>> pop = algo.evolve(pop) # doctest: +SKIP
Fevals: Best: Violated: Viol. Norm: Range:
Expand Down Expand Up @@ -5641,7 +5641,7 @@ A verbosity larger than 1 will produce a log with one entry each verbosity fitne
>>> from pygmo import *
>>> algo = algorithm(ihs(20000))
>>> algo.set_verbosity(2000)
>>> prob = problem(hock_schittkowsky_71())
>>> prob = problem(hock_schittkowski_71())
>>> prob.c_tol = [1e-1]*2
>>> pop = population(prob, 20)
>>> pop = algo.evolve(pop) # doctest: +SKIP
Expand Down
14 changes: 7 additions & 7 deletions pygmo/expose_problems_0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <pagmo/problems/decompose.hpp>
#include <pagmo/problems/dtlz.hpp>
#include <pagmo/problems/griewank.hpp>
#include <pagmo/problems/hock_schittkowsky_71.hpp>
#include <pagmo/problems/hock_schittkowski_71.hpp>
#include <pagmo/problems/inventory.hpp>
#include <pagmo/problems/lennard_jones.hpp>
#include <pagmo/problems/null_problem.hpp>
Expand Down Expand Up @@ -111,12 +111,12 @@ void expose_problems_0(py::module &m, py::class_<pagmo::problem> &prob, py::modu
py::init<pagmo::vector_double::size_type, pagmo::vector_double::size_type, pagmo::vector_double::size_type>(),
py::arg("nobj") = 1, py::arg("nec") = 0, py::arg("nic") = 0);

// Hock-Schittkowsky 71
auto hs71 = expose_problem<pagmo::hock_schittkowsky_71>(m, prob, p_module, "hock_schittkowsky_71",
"__init__()\n\nThe Hock-Schittkowsky 71 problem.\n\n"
"See :cpp:class:`pagmo::hock_schittkowsky_71`.\n\n");
hs71.def("best_known", &best_known_wrapper<pagmo::hock_schittkowsky_71>,
problem_get_best_docstring("Hock-Schittkowsky 71").c_str());
// Hock-schittkowski 71
auto hs71 = expose_problem<pagmo::hock_schittkowski_71>(m, prob, p_module, "hock_schittkowski_71",
"__init__()\n\nThe Hock-schittkowski 71 problem.\n\n"
"See :cpp:class:`pagmo::hock_schittkowski_71`.\n\n");
hs71.def("best_known", &best_known_wrapper<pagmo::hock_schittkowski_71>,
problem_get_best_docstring("Hock-schittkowski 71").c_str());

// Decompose meta-problem.
auto decompose_ = expose_problem<pagmo::decompose>(m, prob, p_module, "decompose", decompose_docstring().c_str());
Expand Down
8 changes: 4 additions & 4 deletions pygmo/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2222,17 +2222,17 @@ class unconstrain_test_case(_ut.TestCase):
"""

def runTest(self):
from .core import hock_schittkowsky_71, unconstrain, null_problem, problem, translate
from .core import hock_schittkowski_71, unconstrain, null_problem, problem, translate
from numpy import array

d = unconstrain()
self.assertFalse(d.inner_problem.extract(null_problem) is None)
d = unconstrain(prob=hock_schittkowsky_71(),
d = unconstrain(prob=hock_schittkowski_71(),
method="weighted", weights=[1., 1.])
self.assertTrue(problem(d).is_(unconstrain))
self.assertFalse(problem(d).extract(unconstrain) is None)
self.assertTrue(d.inner_problem.is_(hock_schittkowsky_71))
self.assertFalse(d.inner_problem.extract(hock_schittkowsky_71) is None)
self.assertTrue(d.inner_problem.is_(hock_schittkowski_71))
self.assertFalse(d.inner_problem.extract(hock_schittkowski_71) is None)

class p(object):

Expand Down

0 comments on commit 97770b2

Please sign in to comment.