Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some NLopt and MOI updates #562

Merged
merged 2 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/OptimizationMOI/src/nlp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
else
[convert.(T, f.cons_hess_prototype[i]) for i in 1:num_cons]
end
lcons = prob.lcons === nothing ? fill(-Inf, num_cons) : prob.lcons
ucons = prob.ucons === nothing ? fill(Inf, num_cons) : prob.ucons
lcons = prob.lcons === nothing ? fill(T(-Inf), num_cons) : prob.lcons
ucons = prob.ucons === nothing ? fill(T(Inf), num_cons) : prob.ucons

Check warning on line 133 in lib/OptimizationMOI/src/nlp.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationMOI/src/nlp.jl#L132-L133

Added lines #L132 - L133 were not covered by tests

evaluator = MOIOptimizationNLPEvaluator(f,
reinit_cache,
Expand Down
2 changes: 0 additions & 2 deletions lib/OptimizationNLopt/src/OptimizationNLopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ function SciMLBase.__solve(cache::OptimizationCache{

if retcode == ReturnCode.Failure
@warn "NLopt failed to converge: $(ret)"
minx = fill(NaN, length(cache.u0))
minf = NaN
end
SciMLBase.build_solution(cache, cache.opt, minx,
minf; original = opt_setup, retcode = retcode,
Expand Down
Loading