Skip to content

Commit

Permalink
Merge pull request #562 from SciML/Vaibhavdixit02-patch-4
Browse files Browse the repository at this point in the history
Some NLopt and MOI updates
  • Loading branch information
Vaibhavdixit02 authored Jul 4, 2023
2 parents 7e3f178 + 7565cf2 commit 0265a08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
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 @@ function MOIOptimizationNLPCache(prob::OptimizationProblem, opt; kwargs...)
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

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

0 comments on commit 0265a08

Please sign in to comment.