#9853 closed enhancement (invalid)
Enumerate Integer solution of a LP through new CPLEX interface
Reported by: | ncohen | Owned by: | jason, jkantor |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | linear programming | Keywords: | |
Cc: | nthiery | Merged in: | |
Authors: | Nathann Cohen | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
This tickets implements a new (and direct) interface to CPLEX, using its C library. We are now able to iterate over integer solutions of a MILP, which is a *very* good news (after quite a lot of work debugging Cython code) :-D
I also updated the method MixedIntegerLinearProgram?.solve to show two different ways to use CPLEX, and modified modules_list.py to compile the right files. #8880 is not needed either anymore once this patch is merged.
Tips for the reviewer :
- Do not read the parts of the .patch file related to the changes in files mip_cplex and mip_osi cplex. Here is what happened : the former file named mip_cplex has been renamed to mip_osi_cplex (as it uses CPLEX through the OSI library), and the mip_cplex file is brand new, and contains the new interface. Of course, I changed in the docstrings of mip_osi_cplex lines such as
from sage.numerical.mip_cplex import [something]
tofrom sage.numerical.mip_osi_cplex import [something]
So there is no need to deal with all these - and + lines.
- Please, pick an enumeration problem that you like, and check CPLEX is indeed returning ALL the solutions. It first "forgot" some of them, and I had to change a very badly documented parameter to get all the answers I wanted for my problems. Please check on some other examples
:-)
Nathann
Attachments (1)
Change History (10)
comment:1 Changed 11 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 11 years ago by
- Component changed from numerical to linear programming
Changed 11 years ago by
comment:3 Changed 11 years ago by
comment:4 Changed 11 years ago by
- Status changed from needs_review to needs_work
comment:5 Changed 11 years ago by
This ticket also modifies files which are deleted by #10043. I'll rewrite it using the new interface anyway !
Nathann
comment:6 follow-up: ↓ 7 Changed 11 years ago by
- Milestone changed from sage-4.6 to sage-duplicate/invalid/wontfix
- Resolution set to invalid
- Status changed from needs_work to closed
comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed 9 years ago by
Why was this ticket considered as invalid?
comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 9 years ago by
Why was this ticket considered as invalid?
Because it worked on an ooooooold version of the LP backends, that have been totally rewritten since. But it is nice to have this code around, because I remember I went through hell to find the CPLEX methods that should be use to enumerate integer solutions.
This being said, we have a Gurobi backend too, now. Perhaps it can also enumerate integer solutions.
comment:9 in reply to: ↑ 8 Changed 9 years ago by
Replying to ncohen:
Because it worked on an ooooooold version of the LP backends, that have been totally rewritten since. But it is nice to have this code around, because I remember I went through hell to find the CPLEX methods that should be use to enumerate integer solutions.
This being said, we have a Gurobi backend too, now. Perhaps it can also enumerate integer solutions.
Ok, so it's more like the current patch is invalid. The feature would still be useful (be it implemented through CPLEX or other). So, unless there is another ticket for this feature, I would recommend to (have the release manager?) reopen this ticket.
Cheers,
Nicolas
(just added a sage_free where I had forgotten it)
:-)
Nathann