Skip to content

Commit

Permalink
Update evolutionary.md
Browse files Browse the repository at this point in the history
Removed unnecessary FowardDiff function.
  • Loading branch information
ParasPuneetSingh authored Sep 25, 2024
1 parent 5b3a0b5 commit 6a1dceb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/src/optimization_packages/evolutionary.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ function func(x, p=nothing)::Vector{Float64}
return [f1, f2]
end
initial_guess = [1.0, 1.0]
function gradient_multi_objective(x, p=nothing)
ForwardDiff.jacobian(func, x)
end
obj_func = MultiObjectiveOptimizationFunction(func, jac=gradient_multi_objective)
obj_func = MultiObjectiveOptimizationFunction(func)
algorithm = OptimizationEvolutionary.NSGA2()
problem = OptimizationProblem(obj_func, initial_guess)
result = solve(problem, algorithm)
Expand Down

0 comments on commit 6a1dceb

Please sign in to comment.