Closed cdiener closed 3 years ago
@Midnighter @KristianJensen this is done for now. There may be small fixes we can make in the future but it's pretty complete.
@cdiener I will try to have a look at it as soon as possible
Failing now due to missing packages for swiglpk 5.0.0 for Mac and some security issue with pyyaml which is not a dependency so no idea where that comes from.
Okay nice, at that point the only thing missing is to remove Python 3.5 from the CI. I'll send a separate PR for that.
Ups, that was a bit too early. This needed additional fixes to make the CI work. I'll send another PR.
This is a first working version of a QP solver via OSQP. OSQP expects the problem to be sparse and static so I added a thin compatibility layer that manages the OSQP problem via dictionaries. All operations on that layer are at worst O(nv + nc) but it makes problem setup about 10-20% of the entire solve time for most models. Could maybe be optimized more in the future but should be sufficient for now. Still need to add tests but I added some more complicated models to the test data for now.
It now supports all features such as reduced costs etc. This version is also faster than the previous PR since it gets primals and duals via the C interface instead of evaluating expressions. We used it in the recent MICOM course and it worked well.
Demo:
One should note that this is a direct solver so it performs pretty bad for LPs or at very low tolerances. I added some optimizations for LP so it works ok-ish but worse than GLPK. However it is great for QPs so I think having a specialized solver for that is still helpful.
TODO