From 6d19cef4ba164a43e9bb7b4faa6a9ebab0c258a5 Mon Sep 17 00:00:00 2001 From: Vaibhav Kumar Dixit Date: Mon, 18 Nov 2024 17:30:37 -0500 Subject: [PATCH 1/2] More conditionals for not calculating hessian in NLopt --- lib/OptimizationNLopt/src/OptimizationNLopt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OptimizationNLopt/src/OptimizationNLopt.jl b/lib/OptimizationNLopt/src/OptimizationNLopt.jl index b090c8f2a..dfc96a7a6 100644 --- a/lib/OptimizationNLopt/src/OptimizationNLopt.jl +++ b/lib/OptimizationNLopt/src/OptimizationNLopt.jl @@ -44,7 +44,7 @@ function SciMLBase.requireshessian(opt::Union{NLopt.Algorithm, NLopt.Opt}) #http string(opt.algorithm) end - if str_opt[2] == 'N' + if str_opt[2] == 'N' || occursin('LD_LBFGS', str_opt) || occursin('LD_SLSQP', str_opt) return false else return true From 42474caf1de1d750aa4911e4b4d952d2708b04ed Mon Sep 17 00:00:00 2001 From: Vaibhav Kumar Dixit Date: Tue, 19 Nov 2024 13:02:24 -0500 Subject: [PATCH 2/2] Update lib/OptimizationNLopt/src/OptimizationNLopt.jl --- lib/OptimizationNLopt/src/OptimizationNLopt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OptimizationNLopt/src/OptimizationNLopt.jl b/lib/OptimizationNLopt/src/OptimizationNLopt.jl index dfc96a7a6..f6781245c 100644 --- a/lib/OptimizationNLopt/src/OptimizationNLopt.jl +++ b/lib/OptimizationNLopt/src/OptimizationNLopt.jl @@ -44,7 +44,7 @@ function SciMLBase.requireshessian(opt::Union{NLopt.Algorithm, NLopt.Opt}) #http string(opt.algorithm) end - if str_opt[2] == 'N' || occursin('LD_LBFGS', str_opt) || occursin('LD_SLSQP', str_opt) + if str_opt[2] == 'N' || occursin("LD_LBFGS", str_opt) || occursin("LD_SLSQP", str_opt) return false else return true