Skip to content

Commit 5aa1289

Browse files
Update metaheuristics.md
updated algorithm call.
1 parent 89abf73 commit 5aa1289

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

docs/src/optimization_packages/metaheuristics.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,11 @@ npartitions = 100
105105
# reference points (Das and Dennis's method)
106106
weights = Metaheuristics.gen_ref_dirs(nobjectives, npartitions)
107107
108-
# Choose the algorithm as required.
109-
alg1 = Metaheuristics.NSGA2()
110-
alg2 = Metaheuristics.NSGA3()
111-
alg3 = Metaheuristics.SPEA2()
112-
alg4 = Metaheuristics.CCMO(NSGA2(N=100, p_m=0.001))
113-
alg5 = Metaheuristics.MOEAD_DE(weights, options=Options(debug=false, iterations = 250))
114-
alg6 = Metaheuristics.SMS_EMOA()
115-
116-
# Solve the problem
117-
sol1 = solve(prob, alg1; maxiters = 100, use_initial = true)
118-
sol2 = solve(prob, alg2; maxiters = 100, use_initial = true)
119-
sol3 = solve(prob, alg3; maxiters = 100, use_initial = true)
120-
sol4 = solve(prob, alg4)
121-
sol5 = solve(prob, alg5; maxiters = 100, use_initial = true)
122-
sol6 = solve(prob, alg6; maxiters = 100, use_initial = true)
108+
# Choose the algorithm and solve the problem
109+
sol1 = solve(prob, NSGA2(); maxiters = 100, use_initial = true)
110+
sol2 = solve(prob, NSGA3(); maxiters = 100, use_initial = true)
111+
sol3 = solve(prob, SPEA2(); maxiters = 100, use_initial = true)
112+
sol4 = solve(prob, CCMO(NSGA2(N=100, p_m=0.001)))
113+
sol5 = solve(prob, MOEAD_DE(weights, options=Options(debug=false, iterations = 250)); maxiters = 100, use_initial = true)
114+
sol6 = solve(prob, SMS_EMOA(); maxiters = 100, use_initial = true)
123115
```

0 commit comments

Comments
 (0)