Esempio n. 1
0
	def setUp(self):
		self.D = 20
		self.x, self.task = rnd.uniform(-2, 2, self.D), Task(self.D, nGEN=230, nFES=inf, benchmark=MyBenchmark())
		self.sol1, self.sol2, self.sol3 = MkeSolution(x=self.x, e=False), MkeSolution(task=self.task), MkeSolution(x=self.x, e=False)
Esempio n. 2
0
 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())
Esempio n. 3
0
 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())
Esempio n. 4
0
 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())
Esempio n. 5
0
	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())
Esempio n. 6
0
 def test_custom_works_fine(self):
     hs_costom = self.algo(seed=self.seed)
     hs_costomc = self.algo(seed=self.seed)
     AlgorithmTestCase.test_algorithm_run(self, hs_costom, hs_costomc,
                                          MyBenchmark())
Esempio n. 7
0
 def test_custom_works_fine(self):
     ca_custom = self.algo(NP=40, seed=self.seed)
     ca_customc = self.algo(NP=40, seed=self.seed)
     AlgorithmTestCase.test_algorithm_run(self, ca_custom, ca_customc,
                                          MyBenchmark())
Esempio n. 8
0
 def test_custom_works_fine(self):
     nmm_custom = self.algo(n=10, C_a=2, C_r=0.5, seed=self.seed)
     nmm_customc = self.algo(n=10, C_a=2, C_r=0.5, seed=self.seed)
     AlgorithmTestCase.test_algorithm_run(self, nmm_custom, nmm_customc,
                                          MyBenchmark())
Esempio n. 9
0
 def test_custom_works_fine(self):
     ba_custom = BatAlgorithm(D=self.D, NP=20, nFES=self.nFES, nGEN=self.nGEN, A=0.5, r=0.5, Qmin=0.0, Qmax=2.0, benchmark=MyBenchmark(), seed=self.seed)
     ba_customc = BatAlgorithm(D=self.D, NP=20, nFES=self.nFES, nGEN=self.nGEN, A=0.5, r=0.5, Qmin=0.0, Qmax=2.0, benchmark=MyBenchmark(), seed=self.seed)
     AlgorithmTestCase.algorithm_run_test(self, ba_custom, ba_customc)
Esempio n. 10
0
	def test_custom_works_fine(self):
		abc_custom = ArtificialBeeColonyAlgorithm(NP=10, D=self.D, nFES=self.nFES, nGEN=self.nGEN, Limit=2, benchmark=MyBenchmark(), seed=self.seed)
		abc_customc = ArtificialBeeColonyAlgorithm(NP=10, D=self.D, nFES=self.nFES, nGEN=self.nGEN, Limit=2, benchmark=MyBenchmark(), seed=self.seed)
		AlgorithmTestCase.algorithm_run_test(self, abc_custom, abc_customc)
Esempio n. 11
0
 def test_custom_works_fine(self):
     nmm_custom = NelderMeadMethod(n=10, C_a=2, C_r=0.5, seed=self.seed)
     nmm_customc = NelderMeadMethod(n=10, C_a=2, C_r=0.5, seed=self.seed)
     AlgorithmTestCase.algorithm_run_test(self, nmm_custom, nmm_customc,
                                          MyBenchmark())
Esempio n. 12
0
	def test_custom_works_fine(self):
		jde_custom = DynNpMultiStrategySelfAdaptiveDifferentialEvolution(NP=40, F=0.5, F_l=0.0, F_u=2.0, Tao1=0.9, CR=0.1, Tao2=0.45, seed=self.seed)
		jde_customc = DynNpMultiStrategySelfAdaptiveDifferentialEvolution(NP=40, F=0.5, F_l=0.0, F_u=2.0, Tao1=0.9, CR=0.1, Tao2=0.45, seed=self.seed)
		AlgorithmTestCase.algorithm_run_test(self, jde_custom, jde_customc, MyBenchmark())
Esempio n. 13
0
	def setUp(self):
		self.D, self.F, self.CR = 10, 0.9, 0.3
		self.x, self.task = rnd.uniform(10, 50, self.D), Task(self.D, nFES=230, nGEN=None, benchmark=MyBenchmark())
		self.s1, self.s2 = AgingIndividualJDE(task=self.task, e=False), AgingIndividualJDE(x=self.x, CR=self.CR, F=self.F)
Esempio n. 14
0
	def test_custom_works_fine(self):
		mke_custom = MonkeyKingEvolutionV3(D=self.D, nFES=self.nFES, nGEN=self.nGEN, n=10, C_a=2, C_r=0.5, benchmark=MyBenchmark(), seed=self.seed)
		mke_customc = MonkeyKingEvolutionV3(D=self.D, nFES=self.nFES, nGEN=self.nGEN, n=10, C_a=2, C_r=0.5, benchmark=MyBenchmark(), seed=self.seed)
		AlgorithmTestCase.algorithm_run_test(self, mke_custom, mke_customc)
Esempio n. 15
0
 def test_custom_works_fine(self):
     ca_custom = SimulatedAnnealing(NP=40, seed=self.seed)
     ca_customc = SimulatedAnnealing(NP=40, seed=self.seed)
     AlgorithmTestCase.algorithm_run_test(self, ca_custom, ca_customc,
                                          MyBenchmark())
Esempio n. 16
0
 def test_custom_works_fine(self):
     ca_custom = DynNpDifferentialEvolutionMTSv1(NP=40, seed=self.seed)
     ca_customc = DynNpDifferentialEvolutionMTSv1(NP=40, seed=self.seed)
     AlgorithmTestCase.algorithm_run_test(self, ca_custom, ca_customc,
                                          MyBenchmark())
Esempio n. 17
0
	def test_custom_works_fine(self):
		gso_custom = GlowwormSwarmOptimization(D=self.D, nFES=self.nFES, nGEN=self.nGEN, NP=35, a=7, Rmin=0.1, Rmax=3, benchmark=MyBenchmark(), seed=self.seed)
		gso_customc = GlowwormSwarmOptimization(D=self.D, nFES=self.nFES, nGEN=self.nGEN, NP=35, a=7, Rmin=0.1, Rmax=3, benchmark=MyBenchmark(), seed=self.seed)
		AlgorithmTestCase.algorithm_run_test(self, gso_custom, gso_customc)
Esempio n. 18
0
	def test_custom_works_fine(self):
		ga_custom = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, seed=self.seed)
		ga_customc = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, seed=self.seed)
		AlgorithmTestCase.test_algorithm_run(self, ga_custom, ga_customc, MyBenchmark())
Esempio n. 19
0
 def test_custom_works_fine(self):
     fpa_custom = FlowerPollinationAlgorithm(NP=10, p=0.5, seed=self.seed)
     fpa_customc = FlowerPollinationAlgorithm(NP=10, p=0.5, seed=self.seed)
     AlgorithmTestCase.algorithm_run_test(self, fpa_custom, fpa_customc, MyBenchmark())
Esempio n. 20
0
	def test_multi_point_crossover_fine_c(self):
		ga_mpcr = self.algo(NP=40, Ts=4, Mr=0.05, Cr=4, Crossover=MultiPointCrossover, seed=self.seed)
		ga_mpcrc = self.algo(NP=40, Ts=4, Mr=0.05, Cr=4, Crossover=MultiPointCrossover, seed=self.seed)
		AlgorithmTestCase.test_algorithm_run(self, ga_mpcr, ga_mpcrc, MyBenchmark())
Esempio n. 21
0
 def test_custom1_works_fine(self):
     ca_custom = self.algo(NP=40, seed=self.seed, coolingMethod=coolLinear)
     ca_customc = self.algo(NP=40, seed=self.seed, coolingMethod=coolLinear)
     AlgorithmTestCase.test_algorithm_run(self, ca_custom, ca_customc,
                                          MyBenchmark())
Esempio n. 22
0
	def test_creep_mutation_fine_c(self):
		ga_crmt = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Mutation=CreepMutation, seed=self.seed)
		ga_crmtc = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Mutation=CreepMutation, seed=self.seed)
		AlgorithmTestCase.test_algorithm_run(self, ga_crmt, ga_crmtc, MyBenchmark())
Esempio n. 23
0
 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())
Esempio n. 24
0
	def test_reulete_selection_c(self):
		ga_crmt = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Selection=RouletteSelection, seed=self.seed)
		ga_crmtc = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Selection=RouletteSelection, seed=self.seed)
		AlgorithmTestCase.test_algorithm_run(self, ga_crmt, ga_crmtc, MyBenchmark())
Esempio n. 25
0
 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)
Esempio n. 26
0
	def test_crossover_urso_c(self):
		ga_crmt = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Crossover=CrossoverUros, seed=self.seed)
		ga_crmtc = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Crossover=CrossoverUros, seed=self.seed)
		AlgorithmTestCase.test_algorithm_run(self, ga_crmt, ga_crmtc, MyBenchmark())
Esempio n. 27
0
	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)
Esempio n. 28
0
	def test_mutation_urso_c(self):
		ga_crmt = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Mutation=MutationUros, seed=self.seed)
		ga_crmtc = self.algo(NP=40, Ts=4, Mr=0.05, Cr=0.4, Mutation=MutationUros, seed=self.seed)
		AlgorithmTestCase.test_algorithm_run(self, ga_crmt, ga_crmtc, MyBenchmark())
Esempio n. 29
0
 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())
Esempio n. 30
0
	def test_custom_works_fine(self):
		aso_custom = AnarchicSocietyOptimization(NP=40, D=self.D, nGEN=self.nGEN, nFES=self.nFES, Combination=Crossover, benchmark=MyBenchmark(), seed=self.seed)
		aso_customc = AnarchicSocietyOptimization(NP=40, D=self.D, nGEN=self.nGEN, nFES=self.nFES, Combination=Crossover, benchmark=MyBenchmark(), seed=self.seed)
		AlgorithmTestCase.algorithm_run_test(self, aso_custom, aso_customc)