Skip to content

Commit 2438c31

Browse files
committed
Improve supports
1 parent 8dbc07d commit 2438c31

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/MOI_wrapper.jl

+19-3
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,15 @@ function MOI.get(
404404
end
405405

406406
function MOI.supports(
407-
::DualOptimizer,
408-
::Union{MOI.ConstraintDualStart,MOI.ConstraintPrimalStart},
407+
optimizer::DualOptimizer,
408+
attr::MOI.ConstraintDualStart,
409409
::Type{<:MOI.ConstraintIndex},
410410
)
411-
return true
411+
return MOI.supports(
412+
optimizer.dual_problem.dual_model,
413+
_variable_dual_attribute(attr),
414+
MOI.VariableIndex,
415+
)
412416
end
413417

414418
function MOI.set(
@@ -504,6 +508,18 @@ function MOI.get(
504508
end
505509
end
506510

511+
function MOI.supports(
512+
::DualOptimizer,
513+
attr::MOI.ConstraintPrimalStart,
514+
C::Type{<:MOI.ConstraintIndex},
515+
)
516+
return MOI.supports(
517+
optimizer.dual_problem.dual_model,
518+
_dual_attribute(attr),
519+
C,
520+
)
521+
end
522+
507523
function MOI.set(
508524
optimizer::DualOptimizer,
509525
attr::MOI.ConstraintPrimalStart,

0 commit comments

Comments
 (0)