-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MOI wrapper #149
MOI wrapper #149
Conversation
OMG, thank you @blegat! |
Codecov Report
@@ Coverage Diff @@
## master #149 +/- ##
==========================================
- Coverage 75.99% 75.23% -0.77%
==========================================
Files 15 16 +1
Lines 3183 3359 +176
==========================================
+ Hits 2419 2527 +108
- Misses 764 832 +68
Continue to review full report at Codecov.
|
I suggest function MOI.add_constraint(model::Optimizer, f::Union{MOI.ScalarAffineFunction, MOI.ScalarQuadraticFunction}, set)
push!(model.constr_expr_orig, _moi_function_to_expr(func))
push!(model.constraint_bounds_orig, MOI.NLPBoundsPair(_lower(set), _upper(set)))
push!(m.constr_structure, f isa MOI.ScalarAffineFunction ? :generic_linear : :generic_nonlinear)
return MOI.ConstraintIndex{typeof(f), typeof(set)}(length(model.constr_expr_orig))
end |
@blegat While disabling the failing tests, its probably good to keep track of the ones disabled so that we can fix them later. The reason is I had disabled a few tests too as the convergence checks can vary from version of MIP solvers. Will need to work on filtering out inconsistent tests. |
I agree, I'm keeping track of the list of them and we post a list. I don't know yet if it's a regression from Pavito or Alpine though |
@blegat that's great! |
The PR is ready to be merged, I have left some issues that might be good to close before releasing: #150, #151 and #152. I'd suggest to first merge this PR and close these issues as separate PR so that people can already try this version while these issues are resolved and report or fix any issue they might encounter. |
Bump :) |
The following branch already a branch that started an MOI port https://github.com/lanl-ansi/Alpine.jl/tree/moi-wrapper.
In addition this branch also brings several improvement to Alpine but it is still a WIP.
We thought with @tweisser that it could be possible to make an MOI port that was less ambitious to provide MOI support to Alpine before this other branch is finished.
So the goal of this PR is to try to make the minimal changes of Alpine while switching from MPB to MOI.
The behavior of Alpine before and after this PR should be as close as possible, further changes that are not strictly necessary for the port should come in a later PR.