Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function MOI.get(m::Optimizer, attr::MOI.VariableBasisStatus, col::ColumnIndex)
return _basis_status(m.solutions[attr.result_index].xxstatus[col.value])
end

function MOI.get(::Optimizer, attr::MOI.VariableBasisStatus, mat::MOI.VariableIndex)
function MOI.get(::Optimizer, attr::MOI.VariableBasisStatus, mat::MatrixIndex)
error("$attr not supported for PSD variable $mat")
end

Expand Down
14 changes: 11 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function MosekOptimizerWithFallback()
return optimizer
end


@testset "SolverName" begin
@test MOI.get(Mosek.Optimizer(), MOI.SolverName()) == "Mosek"
end
Expand Down Expand Up @@ -284,6 +283,15 @@ function test_symmetric_reorder()
_test_symmetric_reorder([1, 2, 7, 3, 8, 12, 4, 9, 13, 16, 5, 10, 14, 17, 19, 6, 11, 15, 18, 20, 21], 6)
end

@testset "test_symmetric_reorder" begin
test_symmetric_reorder()
function test_variable_basis_status()
model = Mosek.Optimizer()
x, cx = MOI.add_constrained_variables(model, MOI.PositiveSemidefiniteConeTriangle(2))
attr = MOI.VariableBasisStatus()
index = MosekTools.mosek_index(model, x[1])
err = ErrorException("$attr not supported for PSD variable $index")
@test_throws err MOI.get(model, attr, index)
end

@testset "test_variable_basis_status" begin
test_variable_basis_status()
end
Loading