Skip to content

Commit

Permalink
Update univariate_solver to MOI v0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Nov 27, 2021
1 parent edde736 commit abf66a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/src/tutorials/Extension/univariate_solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ function MOI.add_constraint(optimizer::Optimizer, func::MOI.VectorAffineFunction
return MOI.ConstraintIndex{typeof(func),typeof(set)}(1) # There will be only ever one constraint so the index does not matter.
end

MOI.supports_incremental_interface(::Optimizer) = true
function MOI.copy_to(optimizer::Optimizer, model::MOI.ModelLike)
return MOI.Utilities.default_copy_to(optimizer, model)
end
function MOI.optimize!(optimizer::Optimizer)
optimizer.decomposition = decompose(optimizer.p, optimizer.tol)
end
Expand Down

0 comments on commit abf66a9

Please sign in to comment.