From a21a8e8ef3846dde7f1d65b547c49936bc529ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Wed, 3 Jan 2024 14:25:20 +0100 Subject: [PATCH] Remove failing tests thanks to new MOI release --- src/MOI_wrapper.jl | 13 ++++++------- test/MOI_wrapper.jl | 23 ++++------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/src/MOI_wrapper.jl b/src/MOI_wrapper.jl index 6fce8d6..04179a8 100644 --- a/src/MOI_wrapper.jl +++ b/src/MOI_wrapper.jl @@ -169,7 +169,7 @@ function MOI.add_constrained_variables(model::Optimizer, set::SupportedSets) length(model.blksz), model.Ainfo_entptr[i], model.Ainfo_type[i], - _prev(model, i), + _next(model, i), ) end _fill_until( @@ -201,14 +201,13 @@ function _isless(t1::MOI.VectorAffineTerm, t2::MOI.VectorAffineTerm) end end -function _prev(model::Optimizer, i) - prev = 0 - for j in i:-1:1 +function _next(model::Optimizer, i) + for j in (i+1):length(model.Ainfo_entptr) if !isempty(model.Ainfo_entptr[j]) - prev = last(model.Ainfo_entptr[j]) + return first(model.Ainfo_entptr[j]) end end - return prev + return length(model.Aent) end function _fill_until( @@ -332,7 +331,7 @@ function MOI.optimize!(model::Optimizer) CAcol, CAinfo_entptr, CAinfo_type, - params = model.params, + params = params, maxranks = model.maxranks, ranks = model.ranks, R = model.R, diff --git a/test/MOI_wrapper.jl b/test/MOI_wrapper.jl index d5ff7f2..3b95d5a 100644 --- a/test/MOI_wrapper.jl +++ b/test/MOI_wrapper.jl @@ -16,6 +16,7 @@ function test_runtests() Float64, ) config = MOI.Test.Config( + rtol = 1e-1, atol = 1e-1, exclude = Any[ MOI.ConstraintBasisStatus, @@ -31,30 +32,14 @@ function test_runtests() model, config, exclude = [ - # Needs https://github.com/jump-dev/MathOptInterface.jl/pull/2358 - r"test_basic_VectorOfVariables_Nonpositives$", - # Needs https://github.com/jump-dev/MathOptInterface.jl/pull/2360 - r"test_basic_VectorOfVariables_SecondOrderCone$", - # Needs https://github.com/jump-dev/MathOptInterface.jl/pull/2359 - r"test_constraint_PrimalStart_DualStart_SecondOrderCone$", - # Needs https://github.com/jump-dev/MathOptInterface.jl/pull/2357 - r"test_model_ListOfVariablesWithAttributeSet$", - r"test_model_LowerBoundAlreadySet$", - r"test_model_UpperBoundAlreadySet$", - r"test_model_ScalarFunctionConstantNotZero$", - r"test_model_delete$", # Detecting infeasibility or unboundedness not supported "INFEAS", - "infeasible", - # Incorrect `ConstraintDual` for `vc2` for MacOS in CI - r"test_linear_integration", - # FIXME investigate - r"test_conic_SecondOrderCone_nonnegative_post_bound$", + # These three are unbounded even if it's not in the name r"test_conic_SecondOrderCone_negative_post_bound_2$", r"test_conic_SecondOrderCone_negative_post_bound_3$", r"test_conic_SecondOrderCone_no_initial_bound$", - r"test_linear_add_constraints$", - r"test_modification_affine_deletion_edge_cases$", + # Incorrect `ConstraintDual` for `vc2` for MacOS in CI + r"test_linear_integration$", ], ) return