Mathematical Optimization in Julia. Local, global, gradient-based and derivative-free. Linear, Quadratic, Convex, Mixed-Integer, and Nonlinear Optimization in one simple, fast, and differentiable interface.
The docs say that the first argument passed to the callback function is an OptimizationState. But if I run the optimization with NEWUOA of PRIMA then it's actually an Array.
Expected behavior
First argument passed to the callback function is an OptimizationState.
Minimal Reproducible Example π
using Optimization, OptimizationPRIMA
function problem(x, p)
return sum(x .^ 2)
end
function main()
x = randn(10)
callback = function (state, obj, others...)
println("Iteration: $(state.iter)")
return false
end
p = OptimizationProblem(problem, x, callback = callback)
solve(p, NEWUOA())
end
main()
Describe the bug π
The docs say that the first argument passed to the callback function is an
OptimizationState
. But if I run the optimization with NEWUOA of PRIMA then it's actually anArray
.Expected behavior
First argument passed to the callback function is an
OptimizationState
.Minimal Reproducible Example π
Error & Stacktrace β οΈ
Environment:
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()