Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPNewton : start is not an interior point #1071

Open
blegat opened this issue Jan 29, 2024 · 1 comment
Open

IPNewton : start is not an interior point #1071

blegat opened this issue Jan 29, 2024 · 1 comment
Milestone

Comments

@blegat
Copy link
Contributor

blegat commented Jan 29, 2024

Some MOI unit tests in https://github.com/JuliaNLSolvers/Optim.jl/blob/master/test/MOI_wrapper.jl are failing because the initial point is not an interior point.
For instance:

import Optim
import MathOptInterface as MOI
model = MOI.instantiate(Optim.Optimizer, with_cache_type = Float64)
config = MOI.Test.Config(optimal_status = MOI.LOCALLY_SOLVED)
MOI.Test.test_nonlinear_expression_hs071(model, config)

gives

┌ Warning: Initial guess is not an interior point
└ @ Optim ~/.julia/dev/Optim/src/multivariate/solvers/constrained/ipnewton/ipnewton.jl:116

Stacktrace:
  [1] initial_state(method::Optim.IPNewton{typeof(Optim.backtrack_constrained_grad), Symbol}, options::Optim.Options{Float64, Nothing}, d::NLSolversBase.TwiceDifferentiable{Float64, Vector{Float64}, Matrix{Float64}, Vector{Float64}}, constraints::NLSolversBase.TwiceDifferentiableConstraints{Optim.var"#c!#160"{MathOptInterface.Nonlinear.Evaluator{MathOptInterface.Nonlinear.ReverseAD.NLPEvaluator}}, Optim.var"#jacobian!#161"{Float64, Vector{Float64}, Vector{Tuple{Int64, Int64}}, MathOptInterface.Nonlinear.Evaluator{MathOptInterface.Nonlinear.ReverseAD.NLPEvaluator}}, Optim.var"#con_hessian!#162"{Float64, MathOptInterface.Nonlinear.Evaluator{MathOptInterface.Nonlinear.ReverseAD.NLPEvaluator}}, Float64}, initial_x::Vector{Float64})
    @ Optim ~/.julia/dev/Optim/src/multivariate/solvers/constrained/ipnewton/ipnewton.jl:117
  [2] optimize(d::NLSolversBase.TwiceDifferentiable{Float64, Vector{Float64}, Matrix{Float64}, Vector{Float64}}, constraints::NLSolversBase.TwiceDifferentiableConstraints{Optim.var"#c!#160"{MathOptInterface.Nonlinear.Evaluator{MathOptInterface.Nonlinear.ReverseAD.NLPEvaluator}}, Optim.var"#jacobian!#161"{Float64, Vector{Float64}, Vector{Tuple{Int64, Int64}}, MathOptInterface.Nonlinear.Evaluator{MathOptInterface.Nonlinear.ReverseAD.NLPEvaluator}}, Optim.var"#con_hessian!#162"{Float64, MathOptInterface.Nonlinear.Evaluator{MathOptInterface.Nonlinear.ReverseAD.NLPEvaluator}}, Float64}, initial_x::Vector{Float64}, method::Optim.IPNewton{typeof(Optim.backtrack_constrained_grad), Symbol}, options::Optim.Options{Float64, Nothing})
    @ Optim ~/.julia/dev/Optim/src/multivariate/solvers/constrained/ipnewton/interior.jl:229
  [3] optimize!(model::Optim.Optimizer{Float64})
    @ Optim ~/.julia/dev/Optim/src/MOI_wrapper.jl:326
  [4] optimize!(dest::Nothing, src::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}})
    @ MathOptInterface ~/.julia/packages/MathOptInterface/DDWnF/src/MathOptInterface.jl:85 [inlined]
  [5] optimize!(m::MathOptInterface.Utilities.CachingOptimizer{Optim.Optimizer{Float64}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}})
    @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/DDWnF/src/Utilities/cachingoptimizer.jl:316
  [6] test_nonlinear_expression_hs071(model::MathOptInterface.Utilities.CachingOptimizer{Optim.Optimizer{Float64}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, config::MathOptInterface.Test.Config{Float64})
    @ MathOptInterface.Test ~/.julia/packages/MathOptInterface/DDWnF/src/Test/test_nonlinear.jl:1143

Indeed, the initial points are on the boundary:
https://github.com/jump-dev/MathOptInterface.jl/blob/10d8edc9c99ebdb3e6521454b9202617f8e2e166/src/Test/test_nonlinear.jl#L309-L311
Could that be worked around easily ?

@pkofod
Copy link
Member

pkofod commented Jan 29, 2024

Does it stop there? I'll have to try it out to come up with a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants