Skip to content

Commit 739b8a6

Browse files
committed
fix callback warning
1 parent 40b6cbc commit 739b8a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/OptimizationMadNLP/src/OptimizationMadNLP.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ function __map_optimizer_args(cache,
293293
reltol::Union{Number, Nothing} = nothing,
294294
verbose = false,
295295
progress::Bool = false,
296-
callback = nothing)
296+
callback = DEFAULT_CALLBACK)
297297
nvar = length(cache.u0)
298298
ncon = !isnothing(cache.lcons) ? length(cache.lcons) : 0
299299

300-
if !isnothing(progress) || !isnothing(callback)
300+
if callback !== DEFAULT_CALLBACK || progress
301301
@warn("MadNLP doesn't currently support user defined callbacks.")
302302
end
303303
# TODO: add support for user callbacks in MadNLP

0 commit comments

Comments
 (0)