def setUp(self): AlgorithmTestCase.setUp(self) self.algo = OppositionVelocityClampingParticleSwarmOptimization
def test_Custom_works_fine(self): de_custom = self.algo(NP=40, F=0.5, CR=0.9, seed=self.seed) de_customc = self.algo(NP=40, F=0.5, CR=0.9, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, de_custom, de_customc, MyBenchmark())
def test_custom_works_fine(self): gso_custom = self.algo(NP=35, a=7, Rmin=0.1, Rmax=3, seed=self.seed) gso_customc = self.algo(NP=35, a=7, Rmin=0.1, Rmax=3, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, gso_custom, gso_customc, MyBenchmark())
def test_CrossBest2(self): de_best2 = self.algo(CrossMutt=CrossBest2, seed=self.seed) de_best2c = self.algo(CrossMutt=CrossBest2, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, de_best2, de_best2c)
def test_CrossCurr2Best1(self): de_curr2best1 = self.algo(CrossMutt=CrossCurr2Best1, seed=self.seed) de_curr2best1c = self.algo(CrossMutt=CrossCurr2Best1, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, de_curr2best1, de_curr2best1c)
def test_griewank_works_fine(self): ca_griewank = DynNpMultiStrategyDifferentialEvolutionMTS(NP=40, D=self.D, nGEN=self.nGEN, nFES=self.nFES, benchmark=Griewank(), seed=self.seed) ca_griewankc = DynNpMultiStrategyDifferentialEvolutionMTS(NP=40, D=self.D, nGEN=self.nGEN, nFES=self.nFES, benchmark=Griewank(), seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, ca_griewank, ca_griewankc)
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = AgingNpMultiMutationDifferentialEvolution
def test_griewank_works_fine(self): kh_griewank = KrillHerdV2(n=10, C_a=5, C_r=0.5, seed=self.seed) kh_griewankc = KrillHerdV2(n=10, C_a=5, C_r=0.5, seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, kh_griewank, kh_griewankc)
def test_griewank_works_fine(self): cso_griewank = CatSwarmOptimization(NP=10, seed=self.seed) cso_griewankc = CatSwarmOptimization(NP=10, seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, cso_griewank, cso_griewankc)
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = ParticleSwarmAlgorithm
def test_custom_works_fine(self): kh_custom = KrillHerdV2(n=10, C_a=2, C_r=0.5, seed=self.seed) kh_customc = KrillHerdV2(n=10, C_a=2, C_r=0.5, seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, kh_custom, kh_customc, MyBenchmark())
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = ParticleSwarmOptimization
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = ComprehensiveLearningParticleSwarmOptimizer
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = MutatedCenterUnifiedParticleSwarmOptimization
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = FishSchoolSearch
def test_custom_works_fine(self): cso_custom = CatSwarmOptimization(NP=20, seed=self.seed) cso_customc = CatSwarmOptimization(NP=20, seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, cso_custom, cso_customc, MyBenchmark())
def test_custom_works_fine(self): ca_custom = DynNpMultiStrategyDifferentialEvolutionMTS(NP=40, D=self.D, nGEN=self.nGEN, nFES=self.nFES, benchmark=MyBenchmark(), seed=self.seed) ca_customc = DynNpMultiStrategyDifferentialEvolutionMTS(NP=40, D=self.D, nGEN=self.nGEN, nFES=self.nFES, benchmark=MyBenchmark(), seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, ca_custom, ca_customc)
def test_custom_works_fine(self): gso_custom = GlowwormSwarmOptimizationV3(n=35, a=7, Rmin=0.1, Rmax=3, seed=self.seed) gso_customc = GlowwormSwarmOptimizationV3(n=35, a=7, Rmin=0.1, Rmax=3, seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, gso_custom, gso_customc, MyBenchmark())
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = DynNpMultiStrategyDifferentialEvolution
def test_griewank_works_fine(self): gso_griewank = GlowwormSwarmOptimizationV3(n=10, a=5, Rmin=0.01, Rmax=3, seed=self.seed) gso_griewankc = GlowwormSwarmOptimizationV3(n=10, a=5, Rmin=0.01, Rmax=3, seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, gso_griewank, gso_griewankc)
def test_CrossRand2(self): de_rand2 = self.algo(CrossMutt=CrossRand2, seed=self.seed) de_rand2c = self.algo(CrossMutt=CrossRand2, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, de_rand2, de_rand2c)
def test_custom_works_fine(self): pso_custom = ParticleSwarmAlgorithm(NP=40, D=self.D, nFES=self.nFES, nGEN=self.nGEN, C1=2.0, C2=2.0, w=0.7, vMin=-4, vMax=4, benchmark=MyBenchmark(), seed=self.seed) pso_customc = ParticleSwarmAlgorithm(NP=40, D=self.D, nFES=self.nFES, nGEN=self.nGEN, C1=2.0, C2=2.0, w=0.7, vMin=-4, vMax=4, benchmark=MyBenchmark(), seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, pso_custom, pso_customc)
def test_CrossCurr2Rand1(self): de_curr2rand1 = self.algo(CrossMutt=CrossCurr2Rand1, seed=self.seed) de_curr2rand1c = self.algo(CrossMutt=CrossCurr2Rand1, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, de_curr2rand1, de_curr2rand1c)
def test_griewank_works_fine(self): pso_griewank = ParticleSwarmAlgorithm(NP=40, D=self.D, nFES=self.nFES, nGEN=self.nGEN, C1=2.0, C2=2.0, w=0.7, vMin=-4, vMax=4, benchmark='griewank', seed=self.seed) pso_griewankc = ParticleSwarmAlgorithm(NP=40, D=self.D, nFES=self.nFES, nGEN=self.nGEN, C1=2.0, C2=2.0, w=0.7, vMin=-4, vMax=4, benchmark='griewank', seed=self.seed) AlgorithmTestCase.algorithm_run_test(self, pso_griewank, pso_griewankc)
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = DifferentialEvolution
def test_custom_works_fine(self): fss_custom = self.algo(NP=20, seed=self.seed) fss_customc = self.algo(NP=20, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, fss_custom, fss_customc, MyBenchmark())
def test_griewank_works_fine(self): de_griewank = self.algo(NP=10, CR=0.5, F=0.9, seed=self.seed) de_griewankc = self.algo(NP=10, CR=0.5, F=0.9, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, de_griewank, de_griewankc, 'griewank')
def test_griewank_works_fine(self): fss_custom = self.algo(NP=10, seed=self.seed) fss_customc = self.algo(NP=10, seed=self.seed) AlgorithmTestCase.test_algorithm_run(self, fss_custom, fss_customc)
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = GlowwormSwarmOptimizationV3
def setUp(self): AlgorithmTestCase.setUp(self) self.algo = ForestOptimizationAlgorithm