Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #99
Looking at the Gurobi docs, there are status codes which indicate user limits reached. It appears to me suboptimal solution may and often exist in these cases. https://www.gurobi.com/documentation/6.5/refman/optimization_status_codes.html#sec:StatusCodes
I played around with these Gurobi user limits, and indeed when time, iteration and solution limits are hit (in my single test case of a mixed integer programming problem), suboptimal solutions are returned from Gurobi solver, and can be successfully unpacked by CVXR.
I suggest we relax what CVXR considers suboptimal solutions to include these user limit solutions. I made the change for GUROBI_CONIC as well, though I didn't bother testing that.
I did not use USER_LIMIT for these user limits status codes because USER_LIMIT is not included in SOLUTION_PRESENT, which would have caused no solution unpacking. I'm not sure if it's wise to add USER_LIMIT to SOLUTION_PRESENT, so I did not use USER_LIMIT.