Skip to content

Conversation

@rafabench
Copy link
Collaborator

@rafabench rafabench commented Apr 15, 2020

Close #58
Added MOI heuristics and user cuts callbacks
Also added a callback to print log in Windows

@codecov-io
Copy link

codecov-io commented Apr 15, 2020

Codecov Report

Merging #85 into master will increase coverage by 2.00%.
The diff coverage is 81.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   58.77%   60.77%   +2.00%     
==========================================
  Files           7        9       +2     
  Lines        2559     2761     +202     
==========================================
+ Hits         1504     1678     +174     
- Misses       1055     1083      +28     
Impacted Files Coverage Δ
src/Xpress.jl 100.00% <ø> (ø)
src/xprs_callbacks.jl 52.27% <52.27%> (ø)
src/MOI/MOI_callbacks.jl 86.72% <86.72%> (ø)
src/MOI/MOI_wrapper.jl 86.73% <89.13%> (+0.11%) ⬆️
src/api.jl 26.13% <100.00%> (+0.94%) ⬆️
src/helper.jl 42.71% <100.00%> (+1.71%) ⬆️
... and 1 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 c225699...8c79274. Read the comment docs.

@rafabench rafabench changed the title [WIP] Add solver dependent callbacks Add solver dependent callbacks Apr 30, 2020
@rafabench rafabench requested a review from joaquimg April 30, 2020 23:56
@frapac
Copy link
Contributor

frapac commented May 7, 2020

Thanks for adding this to Xpress.jl!
In my experience, we have to be careful when using lazy callbacks with Xpress. Most of the time I have to deactivate the presolve to avoid annoying error.
E.g., testing the new callbacks you just added, I get

?405 Error: Invalid column number passed to XPRSstorecuts.
Column number 0 is invalid
ERROR: LoadError: XpressError(32): Subroutine not completed successfully, possibly due to invalid argument. Unable to call `Xpress.storecuts`:

405 Error: Invalid column number passed to XPRSstorecuts.
Column number 0 is invalid

as the presolve removes all the columns on this simple model. The problem here is that we do not know on the MOI side which variables is using Xpress after the presolve.

@joaquimg
Copy link
Member

thanks @frapac !
This error is raised in some test already here?
Or is it something you built?

@frapac
Copy link
Contributor

frapac commented May 30, 2020

In this PR, the tests are carefully written and set explicitly the right set of options. I am wondering what is the correct way to signal that to the end user

  • by setting explicitly PRESOLVE to 0 in the MOI wrapper
  • or by adding more documentation about the callbacks in the README (a warning issued in the MOI wrapper could also do the job)

This error was raised by something I built (basically a sparse logistic regression with lazy callbacks implemented on top of Xpress). Unfortunately, I still have some trouble to make them work as expected... If you are interested, you could find the source here

Copy link
Member

@joaquimg joaquimg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some tweaks

@joaquimg joaquimg merged commit 9466505 into master Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Solver dependent callbacks

6 participants