From 9e8ffdd70cfa7194b1180f91023fc8ef34ea42d9 Mon Sep 17 00:00:00 2001 From: ajnebro Date: Fri, 31 May 2024 17:51:58 +0200 Subject: [PATCH] Minor changes --- examples/NSGAIIAsAnEvolutionaryAlgorithm.jl | 9 ++++----- examples/SMPSO.jl | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/NSGAIIAsAnEvolutionaryAlgorithm.jl b/examples/NSGAIIAsAnEvolutionaryAlgorithm.jl index 1f44c05..a8d4f7b 100644 --- a/examples/NSGAIIAsAnEvolutionaryAlgorithm.jl +++ b/examples/NSGAIIAsAnEvolutionaryAlgorithm.jl @@ -4,18 +4,17 @@ using Random # NSGA-II algorithm configured from the evolutionary algorithm template function main() - Random.seed!(1) - problem = ZDT4() + problem = ZDT1() solver::EvolutionaryAlgorithm = EvolutionaryAlgorithm() solver.name = "NSGA-II" - populationSize = 8 - offspringPopulationSize = 8 + populationSize = 100 + offspringPopulationSize = 100 solver.solutionsCreation = DefaultSolutionsCreation(problem, populationSize) solver.evaluation = SequentialEvaluation(problem) - solver.termination = TerminationByEvaluations(20) + solver.termination = TerminationByEvaluations(25000) mutation = PolynomialMutation(1.0 / numberOfVariables(problem), 20.0, problem.bounds) crossover = SBXCrossover(0.9, 20.0, problem.bounds) diff --git a/examples/SMPSO.jl b/examples/SMPSO.jl index c50a62d..4d2ecb8 100644 --- a/examples/SMPSO.jl +++ b/examples/SMPSO.jl @@ -8,7 +8,7 @@ function main() solver = ParticleSwarmOptimization() solver.name = "SMPSO" - problem = ZDT4() + problem = ZDT1() swarmSize = 100 solver.solutionsCreation = DefaultSolutionsCreation(problem, swarmSize)