Skip to content

Commit 9e98bc8

Browse files
Merge pull request #205 from wildart/evo
fix Evolutionary wrapper (fixes #204)
2 parents 3cd78bb + a934ff7 commit 9e98bc8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/solve/evolutionary.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ function __solve(prob::OptimizationProblem, opt::Evolutionary.AbstractOptimizer,
7777
if isnothing(prob.ub) | isnothing(prob.ub)
7878
opt_res = Evolutionary.optimize(_loss, prob.u0, opt, opt_args)
7979
else
80-
opt_res = Evolutionary.optimize(_loss, prob.lb, prob.ub, prob.u0, opt, opt_args)
80+
cons = Evolutionary.BoxConstraints(prob.lb, prob.ub)
81+
opt_res = Evolutionary.optimize(_loss, cons, prob.u0, opt, opt_args)
8182
end
8283
t1 = time()
8384
opt_ret = Symbol(Evolutionary.converged(opt_res))

0 commit comments

Comments
 (0)