Skip to content

Commit

Permalink
Remove space for BA testing
Browse files Browse the repository at this point in the history
  • Loading branch information
thieu1995 committed Oct 31, 2023
1 parent 462fa7e commit e6f66de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/swarm_based/test_BA.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
# Github: https://github.com/thieu1995 %
# --------------------------------------------------%

from mealpy import FloatVar, BA, Optimizer
import numpy as np
import pytest

from mealpy import FloatVar, BA, Optimizer


@pytest.fixture(scope="module") # scope: Call only 1 time at the beginning
def problem():
Expand All @@ -26,7 +27,7 @@ def objective_function(solution):
def test_BA_results(problem):
models = [
BA.OriginalBA(epoch=10, pop_size=50, loudness=0.8, pulse_rate=0.95, pf_min=0.1, pf_max=10.0),
BA.AdaptiveBA(epoch=10, pop_size=50, loudness_min = 1.0, loudness_max = 2.0, pr_min = 0.15, pr_max = 0.85, pf_min = -2.5, pf_max = 10.),
BA.AdaptiveBA(epoch=10, pop_size=50, loudness_min=1.0, loudness_max=2.0, pr_min=0.15, pr_max=0.85, pf_min=-2.5, pf_max=10.),
BA.DevBA(epoch=10, pop_size=50, pulse_rate=0.95, pf_min=0., pf_max=10.)
]
for model in models:
Expand Down

0 comments on commit e6f66de

Please sign in to comment.