diff --git a/NiaPy/algorithms/basic/foa.py b/NiaPy/algorithms/basic/foa.py index e1f3e8f4..3f9360a3 100644 --- a/NiaPy/algorithms/basic/foa.py +++ b/NiaPy/algorithms/basic/foa.py @@ -56,11 +56,11 @@ def typeParameters(): Returns: Dict[str, Callable]: - * lt (Callable[[int], bool]): TODO. - * al (Callable[[int], bool]): TODO. - * lsc (Callable[[int], bool]): TODO. - * gsc (Callable[[int], bool]): TODO. - * tr (Callable[[float], bool]): TODO. + * lt (Callable[[int], bool]): Checks if life time parameter has a proper value. + * al (Callable[[int], bool]): Checks if area limit parameter has a proper value. + * lsc (Callable[[int], bool]): Checks if local seeding changes parameter has a proper value. + * gsc (Callable[[int], bool]): Checks if global seeding changes parameter has a proper value. + * tr (Callable[[float], bool]): Checks if transfer rate parameter has a proper value. See Also: * :func:`NiaPy.algorithms.algorithm.Algorithm.typeParameters` diff --git a/NiaPy/tests/test_foa.py b/NiaPy/tests/test_foa.py index 404e8f36..2cecedd9 100644 --- a/NiaPy/tests/test_foa.py +++ b/NiaPy/tests/test_foa.py @@ -26,9 +26,9 @@ def test_type_parameters(self): self.assertFalse(tp['gsc'](0)) self.assertFalse(tp['gsc'](-1)) self.assertFalse(tp['gsc'](1.0)) - self.assertTrue(tp['tr'](1)) + self.assertTrue(tp['tr'](1.0)) self.assertTrue(tp['tr'](0.5)) - self.assertTrue(tp['tr'](0)) + self.assertTrue(tp['tr'](0.0)) self.assertFalse(tp['tr'](-1)) self.assertFalse(tp['tr'](1.1)) diff --git a/examples/run_foa.py b/examples/run_foa.py index f7e9849b..ed68b81c 100644 --- a/examples/run_foa.py +++ b/examples/run_foa.py @@ -15,5 +15,5 @@ task = StoppingTask(D=10, nFES=10000, optType=OptimizationType.MINIMIZATION, benchmark=Sphere()) algo = ForestOptimizationAlgorithm(NP=20, lt=5, lsc=1, gsc=1, al=20, tr=0.35) best = algo.run(task=task) - print best + print(best)