Skip to content

Define MathOptNLSModel when Hessian is not available #94

@DanielVandH

Description

@DanielVandH

The following problem

using JuMP                  
using NLPModelsJuMP         
using JSOSolvers             
model = Model()
g(x...) = 10*length(x) + sum(x[i].^2 .- 10*cos.(2π*x[i]) for i in 1:length(x))
register(model, :g, 5, g, autodiff = true)
x₀ = [1.0, 0.1, 0.2, -0.5, 1.0]
@variable(model, x[i=1:5], start = x₀[i])
@NLexpression(model, res[i in 1:5], g(x...))
nls = MathOptNLSModel(model, res, name = "NL")

returns an error LoadError: Unsupported feature Hess. Providing a Hessian through register does not work as JuMP does not support Hessians for multivariate functions. I've seen in #68 that this issue was solved for MathOptNLPModel.

Has this been considered for MathOptNLSModel?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions