You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function SciMLBase.requiresgradient(opt::NLopt.Algorithm) #https://github.com/JuliaOpt/NLopt.jl/blob/master/src/NLopt.jl#L18C7-L18C16
13
-
str_opt =string(opt)
14
-
if str_opt[2] =="D"
15
-
returntrue
12
+
function SciMLBase.requiresgradient(opt::Union{NLopt.Algorithm, NLopt.Opt}) #https://github.com/JuliaOpt/NLopt.jl/blob/master/src/NLopt.jl#L18C7-L18C16
13
+
str_opt =if opt isa NLopt.Algorithm
14
+
string(opt)
16
15
else
16
+
string(opt.algorithm)
17
+
end
18
+
if str_opt[2] =='N'
17
19
returnfalse
20
+
else
21
+
returntrue
18
22
end
19
23
end
20
24
21
-
function SciMLBase.requireshessian(opt::NLopt.Algorithm) #https://github.com/JuliaOpt/NLopt.jl/blob/master/src/NLopt.jl#L18C7-L18C16
22
-
str_opt =string(opt)
23
-
if (str_opt[2] =="D"&& str_opt[4] =="N")
24
-
returntrue
25
+
#interferes with callback handling
26
+
# function SciMLBase.allowsfg(opt::Union{NLopt.Algorithm, NLopt.Opt})
27
+
# str_opt = if opt isa NLopt.Algorithm
28
+
# string(opt)
29
+
# else
30
+
# string(opt.algorithm)
31
+
# end
32
+
# if str_opt[2] == 'D'
33
+
# return true
34
+
# else
35
+
# return false
36
+
# end
37
+
# end
38
+
39
+
function SciMLBase.requireshessian(opt::Union{NLopt.Algorithm, NLopt.Opt}) #https://github.com/JuliaOpt/NLopt.jl/blob/master/src/NLopt.jl#L18C7-L18C16
40
+
str_opt =if opt isa NLopt.Algorithm
41
+
string(opt)
25
42
else
43
+
string(opt.algorithm)
44
+
end
45
+
46
+
if str_opt[2] =='N'
26
47
returnfalse
48
+
else
49
+
returntrue
27
50
end
28
51
end
29
52
30
-
function SciMLBase.requiresconsjac(opt::NLopt.Algorithm) #https://github.com/JuliaOpt/NLopt.jl/blob/master/src/NLopt.jl#L18C7-L18C16
31
-
str_opt =string(opt)
32
-
if str_opt[3] =="O"|| str_opt[3] =="I"|| str_opt[5] =="G"
53
+
function SciMLBase.requiresconsjac(opt::Union{NLopt.Algorithm, NLopt.Opt}) #https://github.com/JuliaOpt/NLopt.jl/blob/master/src/NLopt.jl#L18C7-L18C16
54
+
str_opt =if opt isa NLopt.Algorithm
55
+
string(opt)
56
+
else
57
+
string(opt.algorithm)
58
+
end
59
+
if str_opt[3] =='O'|| str_opt[3] =='I'|| str_opt[5] =='G'
33
60
returntrue
34
61
else
35
62
returnfalse
@@ -174,7 +201,6 @@ function SciMLBase.__solve(cache::OptimizationCache{
0 commit comments