Skip to content
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

WIP: new CPLEX wrapper #261

Merged
merged 17 commits into from
Nov 9, 2019
Merged

WIP: new CPLEX wrapper #261

merged 17 commits into from
Nov 9, 2019

Conversation

odow
Copy link
Member

@odow odow commented Oct 31, 2019

Nominally passing tests with exclusions/hacks. Remaining TODO items:

  • delete SOC variables
  • number threads
  • solve time
  • duals for quadratic problems
  • duals for SOC constraints
  • set constraint names in C
  • set variable names in C
  • pass model name to inner
  • Callbacks
  • RawStatusString
  • PrimalStatus check for unbounded ray
  • SimplexIterations
  • BarrierIterations
  • VariablePrimalStart
  • Basis status
  • Constraint conflicts

At a minimum, this PR:
Closes #98
Closes #200
Closes #222
Closes #225
Closes #230
Closes #241
Closes #242
Closes #243
Closes #249
Closes #250

@codecov-io
Copy link

codecov-io commented Nov 4, 2019

Codecov Report

Merging #261 into master will increase coverage by 15.39%.
The diff coverage is 86.29%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #261       +/-   ##
===========================================
+ Coverage   53.84%   69.24%   +15.39%     
===========================================
  Files          14       15        +1     
  Lines        1469     2432      +963     
===========================================
+ Hits          791     1684      +893     
- Misses        678      748       +70
Impacted Files Coverage Δ
src/CPLEX.jl 100% <ø> (ø) ⬆️
src/cpx_callbacks.jl 12.5% <0%> (ø) ⬆️
src/cpx_vars.jl 72.52% <100%> (ø) ⬆️
src/cpx_solve.jl 55.2% <60%> (-2.3%) ⬇️
src/cpx_quad.jl 68.51% <60%> (+0.24%) ⬆️
src/cpx_model.jl 68.75% <76.92%> (+3.09%) ⬆️
src/MOI/MOI_wrapper.jl 86.69% <86.69%> (ø)
src/MOI/MOI_callbacks.jl 90.41% <90.41%> (ø)
src/cpx_generic_callbacks.jl 93.1% <90.9%> (+47.45%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3394484...24c2c84. Read the comment docs.

@odow
Copy link
Member Author

odow commented Nov 6, 2019

I've added MOI callbacks.

Note: This is a breaking change for people using the existing generic CPLEX callbacks since there were a few bugs. I've commented some out and changed the inputs to be 0-indexed using Cint instead of 1-indexed with Int.

However, I don't think this is an issue given that I think we should re-write the existing C -> Julia wrapper with Clang. The next release is going to be massively breaking anyway.

@odow
Copy link
Member Author

odow commented Nov 6, 2019

I'm in favor of merging this as-is, and opening issues to address the remaining TODO's. They're relatively minor compared to the full re-write, and it will be easier to review smaller PR's. We're currently passing 2.5k MOI tests :)

@odow
Copy link
Member Author

odow commented Nov 8, 2019

I'm guessing no one will want to/have time to review this, so I will leave this open another day and then merge. The tests passing CI (thanks IBM!) and the number of closed issues, speak for themselves.

@odow odow merged commit 44c8ca6 into master Nov 9, 2019
@odow odow deleted the od/moi branch November 9, 2019 02:23
@odow odow mentioned this pull request Nov 9, 2019
4 tasks
@joaquimg
Copy link
Member

@odow how many hours did you expend getting this up and running?

@odow
Copy link
Member Author

odow commented Nov 10, 2019

It was only a day and a couple of odd bits and pieces. It's pretty similar to Gurobi. I think Xpress is a different story. Although check the solution caching. I think you need to do something similar?

@joaquimg
Copy link
Member

CPLEX might be even closer to xpress. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment