diff --git a/docs/requirements.txt b/docs/requirements.txt index 26266de8..f1f8eb9c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,7 @@ # Defining the exact version will make sure things don't break sphinx==4.4.0 sphinx_rtd_theme==1.0.0 -readthedocs-sphinx-search==0.1.1 +readthedocs-sphinx-search==0.3.2 numpy>=1.17.5 matplotlib==3.1.3 pandas>=1.2.0 diff --git a/examples/utils/visualize/convergence_chart.py b/examples/utils/visualize/convergence_chart.py index 292137af..897e0da8 100644 --- a/examples/utils/visualize/convergence_chart.py +++ b/examples/utils/visualize/convergence_chart.py @@ -21,7 +21,7 @@ def fitness_function(solution): problem = { "fit_func": fitness_function, - "bounds": FloatVar(n_vars=8, lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), + "bounds": FloatVar(lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), "minmax": "min", "obj_weights": [0.2, 0.5, 0.3] } diff --git a/examples/utils/visualize/exploration_exploitation_chart.py b/examples/utils/visualize/exploration_exploitation_chart.py index ae0c1663..67de4923 100644 --- a/examples/utils/visualize/exploration_exploitation_chart.py +++ b/examples/utils/visualize/exploration_exploitation_chart.py @@ -21,7 +21,7 @@ def fitness_function(solution): problem = { "fit_func": fitness_function, - "bounds": FloatVar(n_vars=8, lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), + "bounds": FloatVar(lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), "minmax": "min", "obj_weights": [0.2, 0.5, 0.3] } diff --git a/examples/utils/visualize/objectives_chart.py b/examples/utils/visualize/objectives_chart.py index 4fff8be4..49814f38 100644 --- a/examples/utils/visualize/objectives_chart.py +++ b/examples/utils/visualize/objectives_chart.py @@ -20,7 +20,7 @@ def fitness_function(solution): problem = { "fit_func": fitness_function, - "bounds": FloatVar(n_vars=8, lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), + "bounds": FloatVar(lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), "minmax": "min", "obj_weights": [0.2, 0.5, 0.3] } diff --git a/examples/utils/visualize/trajectory_chart.py b/examples/utils/visualize/trajectory_chart.py index 06d52dc7..fd374764 100644 --- a/examples/utils/visualize/trajectory_chart.py +++ b/examples/utils/visualize/trajectory_chart.py @@ -20,7 +20,7 @@ def fitness_function(solution): problem = { "fit_func": fitness_function, - "bounds": FloatVar(n_vars=8, lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), + "bounds": FloatVar(lb=[-10, -5, -15, -20, -10, -15, -10, -30], ub=[10, 5, 15, 20, 50, 30, 100, 85]), "minmax": "min", "obj_weights": [0.2, 0.5, 0.3], "save_population": True diff --git a/mealpy/__init__.py b/mealpy/__init__.py index 658492f1..c9641729 100644 --- a/mealpy/__init__.py +++ b/mealpy/__init__.py @@ -13,7 +13,7 @@ # >>> return np.sum(solution ** 2) # >>> # >>> p1 = { -# >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), +# >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), # >>> "minmax": "min", # >>> "obj_func": objective_function, # >>> "save_population": True, # To be able to draw the trajectory figure diff --git a/mealpy/bio_based/BBO.py b/mealpy/bio_based/BBO.py index 69773f4a..f7aa1b64 100644 --- a/mealpy/bio_based/BBO.py +++ b/mealpy/bio_based/BBO.py @@ -28,7 +28,7 @@ class OriginalBBO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -119,7 +119,7 @@ class DevBBO(OriginalBBO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/BBOA.py b/mealpy/bio_based/BBOA.py index 3a765e41..21809632 100644 --- a/mealpy/bio_based/BBOA.py +++ b/mealpy/bio_based/BBOA.py @@ -24,7 +24,7 @@ class OriginalBBOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/BMO.py b/mealpy/bio_based/BMO.py index a2bb938e..8c583959 100644 --- a/mealpy/bio_based/BMO.py +++ b/mealpy/bio_based/BMO.py @@ -27,7 +27,7 @@ class OriginalBMO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/EOA.py b/mealpy/bio_based/EOA.py index 1d3519f7..6bdf7d97 100644 --- a/mealpy/bio_based/EOA.py +++ b/mealpy/bio_based/EOA.py @@ -37,7 +37,7 @@ class OriginalEOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/IWO.py b/mealpy/bio_based/IWO.py index 98bcd753..f8f9f24b 100644 --- a/mealpy/bio_based/IWO.py +++ b/mealpy/bio_based/IWO.py @@ -35,7 +35,7 @@ class OriginalIWO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/SBO.py b/mealpy/bio_based/SBO.py index 68f3ed18..daad4da5 100644 --- a/mealpy/bio_based/SBO.py +++ b/mealpy/bio_based/SBO.py @@ -33,7 +33,7 @@ class DevSBO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -118,7 +118,7 @@ class OriginalSBO(DevSBO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/SMA.py b/mealpy/bio_based/SMA.py index eb26a347..117eec55 100644 --- a/mealpy/bio_based/SMA.py +++ b/mealpy/bio_based/SMA.py @@ -28,7 +28,7 @@ class DevSMA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -123,7 +123,7 @@ class OriginalSMA(DevSMA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/SOA.py b/mealpy/bio_based/SOA.py index 1e833fae..93c77091 100644 --- a/mealpy/bio_based/SOA.py +++ b/mealpy/bio_based/SOA.py @@ -32,7 +32,7 @@ class DevSOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -102,7 +102,7 @@ class OriginalSOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/SOS.py b/mealpy/bio_based/SOS.py index 8f367b56..4428cbd6 100644 --- a/mealpy/bio_based/SOS.py +++ b/mealpy/bio_based/SOS.py @@ -23,7 +23,7 @@ class OriginalSOS(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/TPO.py b/mealpy/bio_based/TPO.py index 8bcc67ba..d1c54d27 100644 --- a/mealpy/bio_based/TPO.py +++ b/mealpy/bio_based/TPO.py @@ -36,7 +36,7 @@ class DevTPO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/TSA.py b/mealpy/bio_based/TSA.py index a5c4680f..71696f7f 100644 --- a/mealpy/bio_based/TSA.py +++ b/mealpy/bio_based/TSA.py @@ -31,7 +31,7 @@ class OriginalTSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/VCS.py b/mealpy/bio_based/VCS.py index 3250391b..8e4633a4 100644 --- a/mealpy/bio_based/VCS.py +++ b/mealpy/bio_based/VCS.py @@ -31,7 +31,7 @@ class DevVCS(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -157,7 +157,7 @@ class OriginalVCS(DevVCS): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/bio_based/WHO.py b/mealpy/bio_based/WHO.py index cc690e96..c8807b2e 100644 --- a/mealpy/bio_based/WHO.py +++ b/mealpy/bio_based/WHO.py @@ -36,7 +36,7 @@ class OriginalWHO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/evolutionary_based/CRO.py b/mealpy/evolutionary_based/CRO.py index 75707766..79b16b30 100644 --- a/mealpy/evolutionary_based/CRO.py +++ b/mealpy/evolutionary_based/CRO.py @@ -35,7 +35,7 @@ class OriginalCRO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -208,7 +208,7 @@ class OCRO(OriginalCRO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/evolutionary_based/DE.py b/mealpy/evolutionary_based/DE.py index 868e1d8e..99f0a2f9 100644 --- a/mealpy/evolutionary_based/DE.py +++ b/mealpy/evolutionary_based/DE.py @@ -39,7 +39,7 @@ class OriginalDE(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -178,7 +178,7 @@ class JADE(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -313,7 +313,7 @@ class SADE(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -434,7 +434,7 @@ class SAP_DE(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/evolutionary_based/EP.py b/mealpy/evolutionary_based/EP.py index d11c9a69..8f0cb803 100644 --- a/mealpy/evolutionary_based/EP.py +++ b/mealpy/evolutionary_based/EP.py @@ -29,7 +29,7 @@ class OriginalEP(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -122,7 +122,7 @@ class LevyEP(OriginalEP): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/evolutionary_based/ES.py b/mealpy/evolutionary_based/ES.py index 0b0d2e89..e8d1d27a 100644 --- a/mealpy/evolutionary_based/ES.py +++ b/mealpy/evolutionary_based/ES.py @@ -28,7 +28,7 @@ class OriginalES(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -110,7 +110,7 @@ class LevyES(OriginalES): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -186,7 +186,7 @@ class CMA_ES(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -307,7 +307,7 @@ class Simple_CMA_ES(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/evolutionary_based/FPA.py b/mealpy/evolutionary_based/FPA.py index 19356240..df08bf31 100644 --- a/mealpy/evolutionary_based/FPA.py +++ b/mealpy/evolutionary_based/FPA.py @@ -28,7 +28,7 @@ class OriginalFPA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/evolutionary_based/GA.py b/mealpy/evolutionary_based/GA.py index 99049d6e..cc6d1328 100644 --- a/mealpy/evolutionary_based/GA.py +++ b/mealpy/evolutionary_based/GA.py @@ -35,7 +35,7 @@ class BaseGA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -348,7 +348,7 @@ class SingleGA(BaseGA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -462,7 +462,7 @@ class EliteSingleGA(SingleGA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -582,7 +582,7 @@ class MultiGA(BaseGA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -682,7 +682,7 @@ class EliteMultiGA(MultiGA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/evolutionary_based/MA.py b/mealpy/evolutionary_based/MA.py index d258e17f..4cb38b76 100644 --- a/mealpy/evolutionary_based/MA.py +++ b/mealpy/evolutionary_based/MA.py @@ -33,7 +33,7 @@ class OriginalMA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/evolutionary_based/SHADE.py b/mealpy/evolutionary_based/SHADE.py index 10477caa..44359be3 100644 --- a/mealpy/evolutionary_based/SHADE.py +++ b/mealpy/evolutionary_based/SHADE.py @@ -29,7 +29,7 @@ class OriginalSHADE(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -186,7 +186,7 @@ class L_SHADE(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/human_based/BRO.py b/mealpy/human_based/BRO.py index c12650f2..4105ce06 100644 --- a/mealpy/human_based/BRO.py +++ b/mealpy/human_based/BRO.py @@ -29,7 +29,7 @@ class DevBRO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -153,7 +153,7 @@ class OriginalBRO(DevBRO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/BSO.py b/mealpy/human_based/BSO.py index 06a9fa6a..baea3ec9 100644 --- a/mealpy/human_based/BSO.py +++ b/mealpy/human_based/BSO.py @@ -32,7 +32,7 @@ class ImprovedBSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -158,7 +158,7 @@ class OriginalBSO(ImprovedBSO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/CA.py b/mealpy/human_based/CA.py index 4fd8c40c..ac0c2bf4 100644 --- a/mealpy/human_based/CA.py +++ b/mealpy/human_based/CA.py @@ -27,7 +27,7 @@ class OriginalCA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/CHIO.py b/mealpy/human_based/CHIO.py index 7aa4805b..a0bab443 100644 --- a/mealpy/human_based/CHIO.py +++ b/mealpy/human_based/CHIO.py @@ -29,7 +29,7 @@ class OriginalCHIO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -146,7 +146,7 @@ class DevCHIO(OriginalCHIO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/FBIO.py b/mealpy/human_based/FBIO.py index 1d66ead8..56359cb5 100644 --- a/mealpy/human_based/FBIO.py +++ b/mealpy/human_based/FBIO.py @@ -24,7 +24,7 @@ class DevFBIO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -158,7 +158,7 @@ class OriginalFBIO(DevFBIO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/GSKA.py b/mealpy/human_based/GSKA.py index 2bfc06b5..f38568fb 100644 --- a/mealpy/human_based/GSKA.py +++ b/mealpy/human_based/GSKA.py @@ -32,7 +32,7 @@ class DevGSKA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -137,7 +137,7 @@ class OriginalGSKA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/HBO.py b/mealpy/human_based/HBO.py index 276337b8..95805136 100644 --- a/mealpy/human_based/HBO.py +++ b/mealpy/human_based/HBO.py @@ -28,7 +28,7 @@ class OriginalHBO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/HCO.py b/mealpy/human_based/HCO.py index 89f1d030..cf444822 100644 --- a/mealpy/human_based/HCO.py +++ b/mealpy/human_based/HCO.py @@ -35,7 +35,7 @@ class OriginalHCO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/ICA.py b/mealpy/human_based/ICA.py index 18318734..78f134c1 100644 --- a/mealpy/human_based/ICA.py +++ b/mealpy/human_based/ICA.py @@ -32,7 +32,7 @@ class OriginalICA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/LCO.py b/mealpy/human_based/LCO.py index 45cab8ce..13974483 100644 --- a/mealpy/human_based/LCO.py +++ b/mealpy/human_based/LCO.py @@ -27,7 +27,7 @@ class OriginalLCO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -109,7 +109,7 @@ class DevLCO(OriginalLCO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -182,7 +182,7 @@ class ImprovedLCO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/QSA.py b/mealpy/human_based/QSA.py index 0d8dee5f..7ec65666 100644 --- a/mealpy/human_based/QSA.py +++ b/mealpy/human_based/QSA.py @@ -25,7 +25,7 @@ class DevQSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -187,7 +187,7 @@ class OppoQSA(DevQSA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -249,7 +249,7 @@ class LevyQSA(DevQSA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -335,7 +335,7 @@ class ImprovedQSA(OppoQSA, LevyQSA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -389,7 +389,7 @@ class OriginalQSA(DevQSA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/SARO.py b/mealpy/human_based/SARO.py index efdb71d1..b9570090 100644 --- a/mealpy/human_based/SARO.py +++ b/mealpy/human_based/SARO.py @@ -25,7 +25,7 @@ class DevSARO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -144,7 +144,7 @@ class OriginalSARO(DevSARO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/SPBO.py b/mealpy/human_based/SPBO.py index fff84d8d..c2df3064 100644 --- a/mealpy/human_based/SPBO.py +++ b/mealpy/human_based/SPBO.py @@ -29,7 +29,7 @@ class OriginalSPBO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -109,7 +109,7 @@ class DevSPBO(OriginalSPBO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/SSDO.py b/mealpy/human_based/SSDO.py index 52fa7759..c4424e79 100644 --- a/mealpy/human_based/SSDO.py +++ b/mealpy/human_based/SSDO.py @@ -26,7 +26,7 @@ class OriginalSSDO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/TLO.py b/mealpy/human_based/TLO.py index cfefaf6c..06dc05b5 100644 --- a/mealpy/human_based/TLO.py +++ b/mealpy/human_based/TLO.py @@ -29,7 +29,7 @@ class DevTLO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -118,7 +118,7 @@ class OriginalTLO(DevTLO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -195,7 +195,7 @@ class ImprovedTLO(DevTLO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/TOA.py b/mealpy/human_based/TOA.py index b82bed3d..289bc076 100644 --- a/mealpy/human_based/TOA.py +++ b/mealpy/human_based/TOA.py @@ -37,7 +37,7 @@ class OriginalTOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/human_based/WarSO.py b/mealpy/human_based/WarSO.py index 7aede9a2..a28ffb64 100644 --- a/mealpy/human_based/WarSO.py +++ b/mealpy/human_based/WarSO.py @@ -27,7 +27,7 @@ class OriginalWarSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/AOA.py b/mealpy/math_based/AOA.py index 0ed438c5..a23cd7ca 100644 --- a/mealpy/math_based/AOA.py +++ b/mealpy/math_based/AOA.py @@ -29,7 +29,7 @@ class OriginalAOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/CEM.py b/mealpy/math_based/CEM.py index ea406308..6136a473 100644 --- a/mealpy/math_based/CEM.py +++ b/mealpy/math_based/CEM.py @@ -29,7 +29,7 @@ class OriginalCEM(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/CGO.py b/mealpy/math_based/CGO.py index 2dab4272..e240f629 100644 --- a/mealpy/math_based/CGO.py +++ b/mealpy/math_based/CGO.py @@ -30,7 +30,7 @@ class OriginalCGO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/CircleSA.py b/mealpy/math_based/CircleSA.py index ecc2f3ae..17704a37 100644 --- a/mealpy/math_based/CircleSA.py +++ b/mealpy/math_based/CircleSA.py @@ -25,7 +25,7 @@ class OriginalCircleSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/GBO.py b/mealpy/math_based/GBO.py index 1076c99e..8950aac6 100644 --- a/mealpy/math_based/GBO.py +++ b/mealpy/math_based/GBO.py @@ -26,7 +26,7 @@ class OriginalGBO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/HC.py b/mealpy/math_based/HC.py index 9f631a89..2677bfd8 100644 --- a/mealpy/math_based/HC.py +++ b/mealpy/math_based/HC.py @@ -29,7 +29,7 @@ class OriginalHC(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -103,7 +103,7 @@ class SwarmHC(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/INFO.py b/mealpy/math_based/INFO.py index ce356669..3e1bc8d5 100644 --- a/mealpy/math_based/INFO.py +++ b/mealpy/math_based/INFO.py @@ -26,7 +26,7 @@ class OriginalINFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/PSS.py b/mealpy/math_based/PSS.py index c2ddff9c..4cb82900 100644 --- a/mealpy/math_based/PSS.py +++ b/mealpy/math_based/PSS.py @@ -30,7 +30,7 @@ class OriginalPSS(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/RUN.py b/mealpy/math_based/RUN.py index 704801c6..c9a3efbe 100644 --- a/mealpy/math_based/RUN.py +++ b/mealpy/math_based/RUN.py @@ -26,7 +26,7 @@ class OriginalRUN(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/SCA.py b/mealpy/math_based/SCA.py index 916521fa..539cc6e9 100644 --- a/mealpy/math_based/SCA.py +++ b/mealpy/math_based/SCA.py @@ -26,7 +26,7 @@ class DevSCA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -97,7 +97,7 @@ class OriginalSCA(DevSCA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -218,7 +218,7 @@ class QleSCA(DevSCA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/SHIO.py b/mealpy/math_based/SHIO.py index 170eaf4a..e9ab3189 100644 --- a/mealpy/math_based/SHIO.py +++ b/mealpy/math_based/SHIO.py @@ -30,7 +30,7 @@ class OriginalSHIO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/math_based/TS.py b/mealpy/math_based/TS.py index 24ed5b40..9926c9a9 100644 --- a/mealpy/math_based/TS.py +++ b/mealpy/math_based/TS.py @@ -31,7 +31,7 @@ class OriginalTS(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/music_based/HS.py b/mealpy/music_based/HS.py index 222797dd..5da9055f 100644 --- a/mealpy/music_based/HS.py +++ b/mealpy/music_based/HS.py @@ -32,7 +32,7 @@ class DevHS(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -113,7 +113,7 @@ class OriginalHS(DevHS): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/optimizer.py b/mealpy/optimizer.py index 870284a9..5ef45de0 100644 --- a/mealpy/optimizer.py +++ b/mealpy/optimizer.py @@ -632,7 +632,7 @@ def get_index_roulette_wheel_selection(self, list_fitness: np.array): list_fitness = np.array(list_fitness).flatten() if list_fitness.ptp() == 0: return int(self.generator.integers(0, len(list_fitness))) - if np.any(list_fitness) < 0: + if np.any(list_fitness < 0): list_fitness = list_fitness - np.min(list_fitness) final_fitness = list_fitness if self.problem.minmax == "min": diff --git a/mealpy/physics_based/ASO.py b/mealpy/physics_based/ASO.py index 1a475242..a54d7faa 100644 --- a/mealpy/physics_based/ASO.py +++ b/mealpy/physics_based/ASO.py @@ -30,7 +30,7 @@ class OriginalASO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/ArchOA.py b/mealpy/physics_based/ArchOA.py index c28c96a4..34adc1fd 100644 --- a/mealpy/physics_based/ArchOA.py +++ b/mealpy/physics_based/ArchOA.py @@ -33,7 +33,7 @@ class OriginalArchOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/CDO.py b/mealpy/physics_based/CDO.py index 63daab56..b5c26bea 100644 --- a/mealpy/physics_based/CDO.py +++ b/mealpy/physics_based/CDO.py @@ -25,7 +25,7 @@ class OriginalCDO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/EFO.py b/mealpy/physics_based/EFO.py index 49b82427..46f346e6 100644 --- a/mealpy/physics_based/EFO.py +++ b/mealpy/physics_based/EFO.py @@ -27,7 +27,7 @@ class DevEFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -116,7 +116,7 @@ class OriginalEFO(DevEFO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/EO.py b/mealpy/physics_based/EO.py index a87653ab..b1cd05b3 100644 --- a/mealpy/physics_based/EO.py +++ b/mealpy/physics_based/EO.py @@ -25,7 +25,7 @@ class OriginalEO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -117,7 +117,7 @@ class ModifiedEO(OriginalEO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -230,7 +230,7 @@ class AdaptiveEO(OriginalEO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/EVO.py b/mealpy/physics_based/EVO.py index 9e30150f..25a37a2e 100644 --- a/mealpy/physics_based/EVO.py +++ b/mealpy/physics_based/EVO.py @@ -30,7 +30,7 @@ class OriginalEVO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/FLA.py b/mealpy/physics_based/FLA.py index ee5d8b39..4c21704d 100644 --- a/mealpy/physics_based/FLA.py +++ b/mealpy/physics_based/FLA.py @@ -35,7 +35,7 @@ class OriginalFLA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/HGSO.py b/mealpy/physics_based/HGSO.py index f38a634a..e57bea30 100644 --- a/mealpy/physics_based/HGSO.py +++ b/mealpy/physics_based/HGSO.py @@ -27,7 +27,7 @@ class OriginalHGSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/MVO.py b/mealpy/physics_based/MVO.py index 7670c6e0..ab1a5a62 100644 --- a/mealpy/physics_based/MVO.py +++ b/mealpy/physics_based/MVO.py @@ -29,7 +29,7 @@ class DevMVO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -110,7 +110,7 @@ class OriginalMVO(DevMVO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/NRO.py b/mealpy/physics_based/NRO.py index b0395ad1..2bddf1ec 100644 --- a/mealpy/physics_based/NRO.py +++ b/mealpy/physics_based/NRO.py @@ -25,7 +25,7 @@ class OriginalNRO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/RIME.py b/mealpy/physics_based/RIME.py index 833c97d6..27d2814d 100644 --- a/mealpy/physics_based/RIME.py +++ b/mealpy/physics_based/RIME.py @@ -30,7 +30,7 @@ class OriginalRIME(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/SA.py b/mealpy/physics_based/SA.py index 0141b0f0..3286d9ce 100644 --- a/mealpy/physics_based/SA.py +++ b/mealpy/physics_based/SA.py @@ -28,7 +28,7 @@ class OriginalSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -107,7 +107,7 @@ class GaussianSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -187,7 +187,7 @@ class SwarmSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/TWO.py b/mealpy/physics_based/TWO.py index 2dc232bb..54eea0fc 100644 --- a/mealpy/physics_based/TWO.py +++ b/mealpy/physics_based/TWO.py @@ -25,7 +25,7 @@ class OriginalTWO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -142,7 +142,7 @@ class OppoTWO(OriginalTWO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -241,7 +241,7 @@ class LevyTWO(OriginalTWO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -329,7 +329,7 @@ class EnhancedTWO(OppoTWO, LevyTWO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/physics_based/WDO.py b/mealpy/physics_based/WDO.py index a74d0214..6f020c62 100644 --- a/mealpy/physics_based/WDO.py +++ b/mealpy/physics_based/WDO.py @@ -35,7 +35,7 @@ class OriginalWDO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/ABC.py b/mealpy/swarm_based/ABC.py index 9df5c0fb..8ce10c5b 100644 --- a/mealpy/swarm_based/ABC.py +++ b/mealpy/swarm_based/ABC.py @@ -27,7 +27,7 @@ class OriginalABC(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/ACOR.py b/mealpy/swarm_based/ACOR.py index ae4eaa23..244f31f8 100644 --- a/mealpy/swarm_based/ACOR.py +++ b/mealpy/swarm_based/ACOR.py @@ -30,7 +30,7 @@ class OriginalACOR(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/AGTO.py b/mealpy/swarm_based/AGTO.py index b35e8f1c..9c284110 100644 --- a/mealpy/swarm_based/AGTO.py +++ b/mealpy/swarm_based/AGTO.py @@ -30,7 +30,7 @@ class OriginalAGTO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -136,7 +136,7 @@ class MGTO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/ALO.py b/mealpy/swarm_based/ALO.py index fb854143..b96ddc1b 100644 --- a/mealpy/swarm_based/ALO.py +++ b/mealpy/swarm_based/ALO.py @@ -25,7 +25,7 @@ class OriginalALO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -140,7 +140,7 @@ class DevALO(OriginalALO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/AO.py b/mealpy/swarm_based/AO.py index 5dd42ca2..0f427db9 100644 --- a/mealpy/swarm_based/AO.py +++ b/mealpy/swarm_based/AO.py @@ -24,7 +24,7 @@ class OriginalAO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/ARO.py b/mealpy/swarm_based/ARO.py index 34e5ac46..293b2b17 100644 --- a/mealpy/swarm_based/ARO.py +++ b/mealpy/swarm_based/ARO.py @@ -25,7 +25,7 @@ class OriginalARO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -107,7 +107,7 @@ class LARO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -210,7 +210,7 @@ class IARO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/AVOA.py b/mealpy/swarm_based/AVOA.py index df366c1b..0f731999 100644 --- a/mealpy/swarm_based/AVOA.py +++ b/mealpy/swarm_based/AVOA.py @@ -32,7 +32,7 @@ class OriginalAVOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/BA.py b/mealpy/swarm_based/BA.py index 05584c27..86790937 100644 --- a/mealpy/swarm_based/BA.py +++ b/mealpy/swarm_based/BA.py @@ -31,7 +31,7 @@ class OriginalBA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -129,7 +129,7 @@ class AdaptiveBA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -236,7 +236,7 @@ class DevBA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/BES.py b/mealpy/swarm_based/BES.py index 043583af..9a4c6494 100644 --- a/mealpy/swarm_based/BES.py +++ b/mealpy/swarm_based/BES.py @@ -31,7 +31,7 @@ class OriginalBES(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/BFO.py b/mealpy/swarm_based/BFO.py index adf2ebae..3e39d190 100644 --- a/mealpy/swarm_based/BFO.py +++ b/mealpy/swarm_based/BFO.py @@ -40,7 +40,7 @@ class OriginalBFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -173,7 +173,7 @@ class ABFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/BSA.py b/mealpy/swarm_based/BSA.py index bae69918..268a88dd 100644 --- a/mealpy/swarm_based/BSA.py +++ b/mealpy/swarm_based/BSA.py @@ -33,7 +33,7 @@ class OriginalBSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/BeesA.py b/mealpy/swarm_based/BeesA.py index 37379ad2..7b56315e 100644 --- a/mealpy/swarm_based/BeesA.py +++ b/mealpy/swarm_based/BeesA.py @@ -33,7 +33,7 @@ class CleverBookBeesA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -141,7 +141,7 @@ class OriginalBeesA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -257,7 +257,7 @@ class ProbBeesA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/COA.py b/mealpy/swarm_based/COA.py index f1d9b59f..68618195 100644 --- a/mealpy/swarm_based/COA.py +++ b/mealpy/swarm_based/COA.py @@ -29,7 +29,7 @@ class OriginalCOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/CSA.py b/mealpy/swarm_based/CSA.py index 41786927..fd9e6b5c 100644 --- a/mealpy/swarm_based/CSA.py +++ b/mealpy/swarm_based/CSA.py @@ -27,7 +27,7 @@ class OriginalCSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/CSO.py b/mealpy/swarm_based/CSO.py index 726fedd4..39387198 100644 --- a/mealpy/swarm_based/CSO.py +++ b/mealpy/swarm_based/CSO.py @@ -37,7 +37,7 @@ class OriginalCSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/CoatiOA.py b/mealpy/swarm_based/CoatiOA.py index 52c05fc2..0e4b015e 100644 --- a/mealpy/swarm_based/CoatiOA.py +++ b/mealpy/swarm_based/CoatiOA.py @@ -29,7 +29,7 @@ class OriginalCoatiOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/DMOA.py b/mealpy/swarm_based/DMOA.py index 4132a306..7f20e757 100644 --- a/mealpy/swarm_based/DMOA.py +++ b/mealpy/swarm_based/DMOA.py @@ -30,7 +30,7 @@ class OriginalDMOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -137,7 +137,7 @@ class DevDMOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/DO.py b/mealpy/swarm_based/DO.py index c266ddf6..69aed414 100644 --- a/mealpy/swarm_based/DO.py +++ b/mealpy/swarm_based/DO.py @@ -24,7 +24,7 @@ class OriginalDO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/EHO.py b/mealpy/swarm_based/EHO.py index 01998c89..c9e20afa 100644 --- a/mealpy/swarm_based/EHO.py +++ b/mealpy/swarm_based/EHO.py @@ -29,7 +29,7 @@ class OriginalEHO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/ESOA.py b/mealpy/swarm_based/ESOA.py index 3f34135b..70e4c5d2 100644 --- a/mealpy/swarm_based/ESOA.py +++ b/mealpy/swarm_based/ESOA.py @@ -26,7 +26,7 @@ class OriginalESOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/FA.py b/mealpy/swarm_based/FA.py index d17a664c..f450f396 100644 --- a/mealpy/swarm_based/FA.py +++ b/mealpy/swarm_based/FA.py @@ -31,7 +31,7 @@ class OriginalFA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/FFA.py b/mealpy/swarm_based/FFA.py index 927127e4..3f7c912e 100644 --- a/mealpy/swarm_based/FFA.py +++ b/mealpy/swarm_based/FFA.py @@ -29,7 +29,7 @@ class OriginalFFA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/FFO.py b/mealpy/swarm_based/FFO.py index dc253226..e84c07a0 100644 --- a/mealpy/swarm_based/FFO.py +++ b/mealpy/swarm_based/FFO.py @@ -30,7 +30,7 @@ class OriginalFFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/FOA.py b/mealpy/swarm_based/FOA.py index fdcf83ea..84825fc9 100644 --- a/mealpy/swarm_based/FOA.py +++ b/mealpy/swarm_based/FOA.py @@ -25,7 +25,7 @@ class OriginalFOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -102,7 +102,7 @@ class DevFOA(OriginalFOA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -160,7 +160,7 @@ class WhaleFOA(OriginalFOA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/FOX.py b/mealpy/swarm_based/FOX.py index a418dcde..97f578c8 100644 --- a/mealpy/swarm_based/FOX.py +++ b/mealpy/swarm_based/FOX.py @@ -33,7 +33,7 @@ class OriginalFOX(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -116,7 +116,7 @@ class DevFOX(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/GJO.py b/mealpy/swarm_based/GJO.py index b86ed663..f28483d6 100644 --- a/mealpy/swarm_based/GJO.py +++ b/mealpy/swarm_based/GJO.py @@ -25,7 +25,7 @@ class OriginalGJO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/GOA.py b/mealpy/swarm_based/GOA.py index 2a214322..3a6e9d22 100644 --- a/mealpy/swarm_based/GOA.py +++ b/mealpy/swarm_based/GOA.py @@ -29,7 +29,7 @@ class OriginalGOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/GTO.py b/mealpy/swarm_based/GTO.py index c6597b11..b7616253 100644 --- a/mealpy/swarm_based/GTO.py +++ b/mealpy/swarm_based/GTO.py @@ -30,7 +30,7 @@ class OriginalGTO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -148,7 +148,7 @@ class Matlab102GTO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -267,7 +267,7 @@ class Matlab101GTO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/GWO.py b/mealpy/swarm_based/GWO.py index 80cf1f6e..a1a453f7 100644 --- a/mealpy/swarm_based/GWO.py +++ b/mealpy/swarm_based/GWO.py @@ -25,7 +25,7 @@ class OriginalGWO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -98,7 +98,7 @@ class RW_GWO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -194,7 +194,7 @@ class GWO_WOA(OriginalGWO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -279,7 +279,7 @@ class IGWO(OriginalGWO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/HBA.py b/mealpy/swarm_based/HBA.py index d4baa87a..c8e280f4 100644 --- a/mealpy/swarm_based/HBA.py +++ b/mealpy/swarm_based/HBA.py @@ -25,7 +25,7 @@ class OriginalHBA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/HGS.py b/mealpy/swarm_based/HGS.py index 45b153df..87ecd218 100644 --- a/mealpy/swarm_based/HGS.py +++ b/mealpy/swarm_based/HGS.py @@ -29,7 +29,7 @@ class OriginalHGS(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/HHO.py b/mealpy/swarm_based/HHO.py index 229f4217..2ba2ef90 100644 --- a/mealpy/swarm_based/HHO.py +++ b/mealpy/swarm_based/HHO.py @@ -24,7 +24,7 @@ class OriginalHHO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/JA.py b/mealpy/swarm_based/JA.py index ed9500da..6cdef462 100644 --- a/mealpy/swarm_based/JA.py +++ b/mealpy/swarm_based/JA.py @@ -21,7 +21,7 @@ class DevJA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -88,7 +88,7 @@ class OriginalJA(DevJA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -153,7 +153,7 @@ class LevyJA(DevJA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/MFO.py b/mealpy/swarm_based/MFO.py index e86ee45d..bc8fe7b5 100644 --- a/mealpy/swarm_based/MFO.py +++ b/mealpy/swarm_based/MFO.py @@ -21,7 +21,7 @@ class OriginalMFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/MGO.py b/mealpy/swarm_based/MGO.py index 79720e90..ca05cd4e 100644 --- a/mealpy/swarm_based/MGO.py +++ b/mealpy/swarm_based/MGO.py @@ -25,7 +25,7 @@ class OriginalMGO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/MPA.py b/mealpy/swarm_based/MPA.py index 72d2bb5c..8473ffda 100644 --- a/mealpy/swarm_based/MPA.py +++ b/mealpy/swarm_based/MPA.py @@ -30,7 +30,7 @@ class OriginalMPA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/MRFO.py b/mealpy/swarm_based/MRFO.py index f22ef727..85f6b9c5 100644 --- a/mealpy/swarm_based/MRFO.py +++ b/mealpy/swarm_based/MRFO.py @@ -27,7 +27,7 @@ class OriginalMRFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -142,7 +142,7 @@ class WMQIMRFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/MSA.py b/mealpy/swarm_based/MSA.py index f5019b73..c3d607b8 100644 --- a/mealpy/swarm_based/MSA.py +++ b/mealpy/swarm_based/MSA.py @@ -31,7 +31,7 @@ class OriginalMSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/NGO.py b/mealpy/swarm_based/NGO.py index 5de007e9..89d86fea 100644 --- a/mealpy/swarm_based/NGO.py +++ b/mealpy/swarm_based/NGO.py @@ -31,7 +31,7 @@ class OriginalNGO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/NMRA.py b/mealpy/swarm_based/NMRA.py index 017b6b85..b3fb9e43 100644 --- a/mealpy/swarm_based/NMRA.py +++ b/mealpy/swarm_based/NMRA.py @@ -27,7 +27,7 @@ class OriginalNMRA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -106,7 +106,7 @@ class ImprovedNMRA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/OOA.py b/mealpy/swarm_based/OOA.py index 92184a74..e165a429 100644 --- a/mealpy/swarm_based/OOA.py +++ b/mealpy/swarm_based/OOA.py @@ -30,7 +30,7 @@ class OriginalOOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/PFA.py b/mealpy/swarm_based/PFA.py index e8eb57c5..37da1fdf 100644 --- a/mealpy/swarm_based/PFA.py +++ b/mealpy/swarm_based/PFA.py @@ -24,7 +24,7 @@ class OriginalPFA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/POA.py b/mealpy/swarm_based/POA.py index 97ae6de5..313662e1 100644 --- a/mealpy/swarm_based/POA.py +++ b/mealpy/swarm_based/POA.py @@ -31,7 +31,7 @@ class OriginalPOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/PSO.py b/mealpy/swarm_based/PSO.py index 89d96793..5cf21558 100644 --- a/mealpy/swarm_based/PSO.py +++ b/mealpy/swarm_based/PSO.py @@ -27,7 +27,7 @@ class OriginalPSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -123,7 +123,7 @@ class AIW_PSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -226,7 +226,7 @@ class LDW_PSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -322,7 +322,7 @@ class P_PSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -411,7 +411,7 @@ class HPSO_TVAC(P_PSO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -496,7 +496,7 @@ class C_PSO(P_PSO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } @@ -616,7 +616,7 @@ class CL_PSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "obj_func": objective_function, >>> "minmax": "min", >>> } diff --git a/mealpy/swarm_based/SCSO.py b/mealpy/swarm_based/SCSO.py index da50be96..959ca2cf 100644 --- a/mealpy/swarm_based/SCSO.py +++ b/mealpy/swarm_based/SCSO.py @@ -25,7 +25,7 @@ class OriginalSCSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SFO.py b/mealpy/swarm_based/SFO.py index 8472a1cf..d4c189b7 100644 --- a/mealpy/swarm_based/SFO.py +++ b/mealpy/swarm_based/SFO.py @@ -29,7 +29,7 @@ class OriginalSFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -163,7 +163,7 @@ class ImprovedSFO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SHO.py b/mealpy/swarm_based/SHO.py index 24dd0f4b..10b12f18 100644 --- a/mealpy/swarm_based/SHO.py +++ b/mealpy/swarm_based/SHO.py @@ -28,7 +28,7 @@ class OriginalSHO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SLO.py b/mealpy/swarm_based/SLO.py index e7e964b9..536172e1 100644 --- a/mealpy/swarm_based/SLO.py +++ b/mealpy/swarm_based/SLO.py @@ -28,7 +28,7 @@ class OriginalSLO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -111,7 +111,7 @@ class ModifiedSLO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -224,7 +224,7 @@ class ImprovedSLO(ModifiedSLO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SRSR.py b/mealpy/swarm_based/SRSR.py index 06c8ca67..4b6d06ac 100644 --- a/mealpy/swarm_based/SRSR.py +++ b/mealpy/swarm_based/SRSR.py @@ -25,7 +25,7 @@ class OriginalSRSR(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SSA.py b/mealpy/swarm_based/SSA.py index eb717c52..ab644ecd 100644 --- a/mealpy/swarm_based/SSA.py +++ b/mealpy/swarm_based/SSA.py @@ -30,7 +30,7 @@ class DevSSA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -150,7 +150,7 @@ class OriginalSSA(DevSSA): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SSO.py b/mealpy/swarm_based/SSO.py index f02a2e99..af1b1a1c 100644 --- a/mealpy/swarm_based/SSO.py +++ b/mealpy/swarm_based/SSO.py @@ -24,7 +24,7 @@ class OriginalSSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SSpiderA.py b/mealpy/swarm_based/SSpiderA.py index 047435d6..05fec0e5 100644 --- a/mealpy/swarm_based/SSpiderA.py +++ b/mealpy/swarm_based/SSpiderA.py @@ -34,7 +34,7 @@ class OriginalSSpiderA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SSpiderO.py b/mealpy/swarm_based/SSpiderO.py index 400ca4f1..3cb1491b 100644 --- a/mealpy/swarm_based/SSpiderO.py +++ b/mealpy/swarm_based/SSpiderO.py @@ -29,7 +29,7 @@ class OriginalSSpiderO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/STO.py b/mealpy/swarm_based/STO.py index a8a6211d..08adc5c3 100644 --- a/mealpy/swarm_based/STO.py +++ b/mealpy/swarm_based/STO.py @@ -31,7 +31,7 @@ class OriginalSTO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/SeaHO.py b/mealpy/swarm_based/SeaHO.py index 95f46b42..d1037f4a 100644 --- a/mealpy/swarm_based/SeaHO.py +++ b/mealpy/swarm_based/SeaHO.py @@ -25,7 +25,7 @@ class OriginalSeaHO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/ServalOA.py b/mealpy/swarm_based/ServalOA.py index d145fd17..aad42ac8 100644 --- a/mealpy/swarm_based/ServalOA.py +++ b/mealpy/swarm_based/ServalOA.py @@ -29,7 +29,7 @@ class OriginalServalOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/TDO.py b/mealpy/swarm_based/TDO.py index d48e2f5a..3ce8b31b 100644 --- a/mealpy/swarm_based/TDO.py +++ b/mealpy/swarm_based/TDO.py @@ -31,7 +31,7 @@ class OriginalTDO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/TSO.py b/mealpy/swarm_based/TSO.py index cffa5c1f..a5e02fe8 100644 --- a/mealpy/swarm_based/TSO.py +++ b/mealpy/swarm_based/TSO.py @@ -26,7 +26,7 @@ class OriginalTSO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/WOA.py b/mealpy/swarm_based/WOA.py index 8ae22866..bbca9436 100644 --- a/mealpy/swarm_based/WOA.py +++ b/mealpy/swarm_based/WOA.py @@ -24,7 +24,7 @@ class OriginalWOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -108,7 +108,7 @@ class HI_WOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/WaOA.py b/mealpy/swarm_based/WaOA.py index 574085fe..d808226d 100644 --- a/mealpy/swarm_based/WaOA.py +++ b/mealpy/swarm_based/WaOA.py @@ -29,7 +29,7 @@ class OriginalWaOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/swarm_based/ZOA.py b/mealpy/swarm_based/ZOA.py index abd7cd3f..6a9b409b 100644 --- a/mealpy/swarm_based/ZOA.py +++ b/mealpy/swarm_based/ZOA.py @@ -31,7 +31,7 @@ class OriginalZOA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/system_based/AEO.py b/mealpy/system_based/AEO.py index 6511945b..7935a9a1 100644 --- a/mealpy/system_based/AEO.py +++ b/mealpy/system_based/AEO.py @@ -25,7 +25,7 @@ class OriginalAEO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -134,7 +134,7 @@ class ImprovedAEO(OriginalAEO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -248,7 +248,7 @@ class EnhancedAEO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -378,7 +378,7 @@ class ModifiedAEO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -499,7 +499,7 @@ class AugmentedAEO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/system_based/GCO.py b/mealpy/system_based/GCO.py index b2a540d7..60ca6912 100644 --- a/mealpy/system_based/GCO.py +++ b/mealpy/system_based/GCO.py @@ -28,7 +28,7 @@ class DevGCO(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } @@ -118,7 +118,7 @@ class OriginalGCO(DevGCO): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/system_based/WCA.py b/mealpy/system_based/WCA.py index 3051900e..30888bfd 100644 --- a/mealpy/system_based/WCA.py +++ b/mealpy/system_based/WCA.py @@ -36,7 +36,7 @@ class OriginalWCA(Optimizer): >>> return np.sum(solution**2) >>> >>> problem_dict = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function >>> } diff --git a/mealpy/utils/history.py b/mealpy/utils/history.py index 73d947cf..d25b2b2b 100644 --- a/mealpy/utils/history.py +++ b/mealpy/utils/history.py @@ -50,7 +50,7 @@ class History: >>> return np.sum(solution**2) >>> >>> p1 = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="delta"), >>> "minmax": "min", >>> "obj_func": objective_function, >>> "save_population": True, # To be able to draw the trajectory figure diff --git a/mealpy/utils/termination.py b/mealpy/utils/termination.py index a27fa1ba..cf125afd 100644 --- a/mealpy/utils/termination.py +++ b/mealpy/utils/termination.py @@ -40,7 +40,7 @@ class Termination: >>> return np.sum(solution**2) >>> >>> p1 = { - >>> "bounds": FloatVar(n_vars=30, lb=(-10.,) * 30, ub=(10.,) * 30, name="C-params"), + >>> "bounds": FloatVar(lb=(-10.,) * 30, ub=(10.,) * 30, name="C-params"), >>> "minmax": "min", >>> "obj_func": objective_function, >>> "name": "Test Function"