-
-
Notifications
You must be signed in to change notification settings - Fork 411
Closed
Labels
Description
The code
using JuMP, MathProgBase
model = Model()
@variable(model, x[1:2])
@NLobjective(model, Min, 0.0)
@NLconstraint(model, x[1] * x[2] == 2)
d = JuMP.NLPEvaluator(model)
MathProgBase.initialize(d, [:Hess])
hx = zeros(3)
MathProgBase.eval_hesslag(d, hx, [0.659; 0.702], 1.0, [1.0])corresponds to problem
min 0 s.t. x_1 * x_2 == 2
which has Hessian of Lagrangian
\nabla^2 L(x,y) = [0 y_1; y_1 0]
i.e., only one nonzero is stored. However, a small error appears on the diagonal. Varies with the inputs.
Related to JuliaSmoothOptimizers/NLPModelsJuMP.jl/issues/13.