Skip to content

Commit 7e0d5b2

Browse files
committed
Cleanup MOI wrapper
1 parent 9617bbb commit 7e0d5b2

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/MOI_wrapper.jl

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -627,18 +627,10 @@ MOI.get(optimizer::Optimizer, ::DualSlackMatrix) = ZBlockMat(optimizer)
627627
function block(optimizer::Optimizer, ci::MOI.ConstraintIndex{MOI.VectorOfVariables})
628628
return optimizer.varmap[ci.value][1]
629629
end
630-
function dimension(optimizer::Optimizer, ci::MOI.ConstraintIndex{MOI.VectorOfVariables})
631-
blockdim = optimizer.blockdims[block(optimizer, ci)]
632-
if blockdim < 0
633-
return -blockdim
634-
else
635-
return MOI.dimension(MOI.PositiveSemidefiniteConeTriangle(blockdim))
636-
end
637-
end
638630
function vectorize_block(M, blk::Integer, s::Type{MOI.Nonnegatives})
639631
return diag(block(M, blk))
640632
end
641-
function vectorize_block(M::AbstractMatrix{Cdouble}, blk::Integer, s::Type{MOI.PositiveSemidefiniteConeTriangle}) where T
633+
function vectorize_block(M::AbstractMatrix{Cdouble}, blk::Integer, s::Type{MOI.PositiveSemidefiniteConeTriangle})
642634
B = block(M, blk)
643635
d = LinearAlgebra.checksquare(B)
644636
n = MOI.dimension(MOI.PositiveSemidefiniteConeTriangle(d))
@@ -660,16 +652,6 @@ function MOI.get(optimizer::Optimizer, attr::MOI.VariablePrimal, vi::MOI.Variabl
660652
return block(MOI.get(optimizer, PrimalSolutionMatrix()), blk)[i, j]
661653
end
662654

663-
function MOI.get(optimizer::Optimizer, attr::MOI.ConstraintPrimal,
664-
ci::MOI.ConstraintIndex{MOI.VectorOfVariables, S}) where S<:SupportedSets
665-
MOI.check_result_index_bounds(optimizer, attr)
666-
return vectorize_block(MOI.get(optimizer, PrimalSolutionMatrix()), block(optimizer, ci), S)
667-
end
668-
function MOI.get(optimizer::Optimizer, attr::MOI.ConstraintPrimal, ci::AFFEQ)
669-
MOI.check_result_index_bounds(optimizer, attr)
670-
return optimizer.b[ci.value]
671-
end
672-
673655
function MOI.get(optimizer::Optimizer, attr::MOI.ConstraintDual,
674656
ci::MOI.ConstraintIndex{MOI.VectorOfVariables, S}) where S<:SupportedSets
675657
MOI.check_result_index_bounds(optimizer, attr)

0 commit comments

Comments
 (0)