Skip to content

Commit

Permalink
Update to MOI v1
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jun 13, 2023
1 parent fe13e63 commit 0168e55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Compat = "3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0, 4"
FillArrays = "0.6.2, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 1"
ForwardDiff = "0.10"
LineSearches = "7.0.1"
MathOptInterface = "0.10.3"
MathOptInterface = "1"
NLSolversBase = "7.8.0"
NaNMath = "0.3.2, 1"
OptimTestProblems = "2.0.3"
Expand Down
35 changes: 1 addition & 34 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function test_MOI_Test()
MOI.VariableName,
MOI.ObjectiveBound,
MOI.DualObjectiveValue,
MOI.SolverVersion,
],
),
exclude = String[
Expand All @@ -69,40 +70,6 @@ function test_MOI_Test()
return
end

function test_nlp()
model = MOI.Utilities.CachingOptimizer(
MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()),
Optim.Optimizer(),
)
MOI.set(model, MOI.Silent(), true)
MOI.DeprecatedTest.nlptest(
model,
MOI.DeprecatedTest.Config(
atol = 1e-6,
rtol = 1e-6,
duals = false,
query = false,
infeas_certificates = false,
optimal_status = MOI.LOCALLY_SOLVED,
),
String[
# FIXME The hessian callback for constraints is called with
# `λ = [-Inf, 0.0]` and then we get `NaN`, ...
"hs071",
# There are nonlinear constraints so we need `IPNewton` but `IPNewton` needs a hessian.
"hs071_no_hessian", "feasibility_sense_with_objective_and_no_hessian",
# FIXME Here there is no hessian but there is a hessian-vector product, can `IPNewton` work with that ?
"hs071_hessian_vector_product_test",
# No objective, would be fixed by https://github.com/jump-dev/MathOptInterface.jl/issues/1397
"feasibility_sense_with_no_objective_and_with_hessian",
"feasibility_sense_with_no_objective_and_no_hessian",
# Affine objective, would be fixed by https://github.com/jump-dev/MathOptInterface.jl/issues/1397
"nlp_objective_and_moi_objective",
#"feasibility_sense_with_no_objective_and_with_hessian",
],
)
end

end # module TestOptim

TestOptim.runtests()

0 comments on commit 0168e55

Please sign in to comment.