Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnebro committed May 31, 2024
1 parent 2e58239 commit 9e8ffdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions examples/NSGAIIAsAnEvolutionaryAlgorithm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/SMPSO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function main()
solver = ParticleSwarmOptimization()
solver.name = "SMPSO"

problem = ZDT4()
problem = ZDT1()
swarmSize = 100

solver.solutionsCreation = DefaultSolutionsCreation(problem, swarmSize)
Expand Down

0 comments on commit 9e8ffdd

Please sign in to comment.