Skip to content

Commit

Permalink
add more solution queries
Browse files Browse the repository at this point in the history
  • Loading branch information
rschwarz committed Dec 22, 2018
1 parent b97dcff commit 85ea505
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ function MOI.get(o::Optimizer, ::MOI.VariablePrimal, vi::VI)
return SCIPgetSolVal(scip, SCIPgetBestSol(scip), get_var(o, vi))
end

function MOI.get(o::Optimizer, ::MOI.ConstraintPrimal, ci::CI{MOI.SingleVariable,<:SS})
scip = get_scip(o)
return SCIPgetSolVal(scip, SCIPgetBestSol(scip), get_var(o, VI(ci.variable)))
end

function MOI.get(o::Optimizer, ::MOI.ConstraintPrimal, ci::CI{MOI.ScalarAffineFunction{Float64},<:SS})
scip = get_scip(o)
return SCIPgetActivityLinear(scip, get_cons(o, ci), SCIPgetBestSol(scip))
Expand Down

0 comments on commit 85ea505

Please sign in to comment.