Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove infinity test problem and add missing test problems to docs #348

Merged
merged 2 commits into from
Aug 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Problems.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
- Alpine2
- Bent Cigar
- Chung Reynolds
- Cosine Mixture
- Csendes
- Discus
- Dixon-Price
- Elliptic
- Griewank
- Expanded Griewank plus Rosenbrock
- Happy cat
- HGBat
- Katsuura
Expand All @@ -25,10 +27,15 @@
- Ridge
- Rosenbrock
- Salomon
- Schaffer
- Schaffer N. 2
- Schaffer N. 4
- Expanded Schaffer
- Schumer Steiglitz
- Schwefel
- Schwefel 2.21
- Schwefel 2.22
- Modified Schwefel
- Sphere
- Sphere2 -> Sphere with different powers
- Sphere3 -> Rotated hyper-ellipsoid
Expand Down
9 changes: 8 additions & 1 deletion docs/source/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,21 @@ Documentation for the other algorithms can be found here: :mod:`niapy.algorithms
Functions
-----------------------------

NiaPy features more than 30 optimization problems. Documentation for them can be found here: :mod:`niapy.problems`.
NiaPy features more than 30 optimization test problems. Documentation for them can be found here: :mod:`niapy.problems`.

- Ackley
- Alpine
- Alpine1
- Alpine2
- Bent Cigar
- Chung Reynolds
- Cosine Mixture
- Csendes
- Discus
- Dixon-Price
- Elliptic
- Griewank
- Expanded Griewank plus Rosenbrock
- Happy cat
- HGBat
- Katsuura
Expand All @@ -95,10 +97,15 @@ NiaPy features more than 30 optimization problems. Documentation for them can be
- Ridge
- Rosenbrock
- Salomon
- Schaffer
- Schaffer N. 2
- Schaffer N. 4
- Expanded Schaffer
- Schumer Steiglitz
- Schwefel
- Schwefel 2.21
- Schwefel 2.22
- Modified Schwefel
- Sphere
- Sphere2 -> Sphere with different powers
- Sphere3 -> Rotated hyper-ellipsoid
Expand Down
2 changes: 0 additions & 2 deletions niapy/problems/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from niapy.problems.griewank import Griewank, ExpandedGriewankPlusRosenbrock
from niapy.problems.happy_cat import HappyCat
from niapy.problems.hgbat import HGBat
from niapy.problems.infinity import Infinity
from niapy.problems.katsuura import Katsuura
from niapy.problems.levy import Levy
from niapy.problems.michalewichz import Michalewichz
Expand Down Expand Up @@ -85,7 +84,6 @@
'DixonPrice',
'Powell',
'CosineMixture',
'Infinity',
'ExpandedSchaffer',
'SchafferN2',
'SchafferN4'
Expand Down
74 changes: 0 additions & 74 deletions niapy/problems/infinity.py

This file was deleted.

9 changes: 0 additions & 9 deletions niapy/tests/test_problem_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,3 @@ def test_cosine_mixture(self):
"""Test the cosine mixture function."""
fun = get_problem('cosine_mixture', dimension=2, lower=-1, upper=1)
self.assertAlmostEqual(fun(np.zeros(2)), -0.2)

def test_infinity(self):
"""Test the infinity function."""
infinity = get_problem('infinity', dimension=2, lower=-1, upper=1)
defaults = np.seterr('raise')
with self.assertRaises(FloatingPointError):
infinity(np.zeros(2))
self.assertAlmostEqual(infinity(np.ones(2)), 5.6829419696157935)
np.seterr(**defaults)
1 change: 0 additions & 1 deletion niapy/util/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def _problem_options():
"griewank": problems.Griewank,
"happy_cat": problems.HappyCat,
"hgbat": problems.HGBat,
"infinity": problems.Infinity,
"katsuura": problems.Katsuura,
"levy": problems.Levy,
"michalewicz": problems.Michalewichz,
Expand Down