Skip to content

Commit

Permalink
Remove failing tests thanks to new MOI release (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Jan 3, 2024
1 parent 7e68827 commit 29552b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
13 changes: 6 additions & 7 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down
23 changes: 4 additions & 19 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function test_runtests()
Float64,
)
config = MOI.Test.Config(
rtol = 1e-1,
atol = 1e-1,
exclude = Any[
MOI.ConstraintBasisStatus,
Expand All @@ -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
Expand Down

2 comments on commit 29552b8

@blegat
Copy link
Member Author

@blegat blegat commented on 29552b8 Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/98126

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 29552b8da0982d61fe286f73d11f766cfb7361d6
git push origin v0.1.0

Please sign in to comment.