-
Notifications
You must be signed in to change notification settings - Fork 525
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
Parse noSolution
status from CPLEXShell and CPLEXDirect solvers correctly
#1313
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1313 +/- ##
==========================================
+ Coverage 71.57% 72.75% +1.17%
==========================================
Files 547 491 -56
Lines 83583 79087 -4496
==========================================
- Hits 59821 57536 -2285
+ Misses 23762 21551 -2211
Continue to review full report at Codecov.
|
8b61118
to
7e8d86c
Compare
7e8d86c
to
12cdacb
Compare
@michaelbynum, sorry about that. Branch is fixed now. |
- It looks as though IBM have updated the schema that the shell logfile uses and therefore the parsing is not quite done correctly - Notably, 'CPLEX Error; no integer solution' is being flagged and returned as ('ok', 'unknown') for the status and termination condition
- The Direct solver should return the same solver and solution status as the Shell solver when no solution is found - These error codes are currently unhandled and just return `TerminationCondition.error` - It seems reasonable to assume that if a solve reaches max time limit and is infeasible that we cannot yet determine whether it is actually infeasible and therefore makes sense to return `noSolution`.
- I've elected not to add this to the return Bunch from `_apply_solver()` because that would change the behaviour of the downstream code (which raises an ApplicationError)
- Do not adjust `SolverInformation` since this is called `return_code` here
- Reaching these limits could also be reasons for having not found a solution
…ation - If we have already determined a reasonable termination condition that would have otherwise returned an `ok` SolverStatus, return `warning` instead of `error`
- In the case of `noSolution`, CPLEXSHELL now considers this a `warning` solver status - Similarly, `GAMSDirect` returns a `SolutionStatus.unknown` so we should be consistent with that
- Constraint `C` is being overwritten
- This is a much harder model that is more likely to not be solved within the allowed time
12cdacb
to
33b0b2d
Compare
@michaelbynum, this should be ready to review whenever you get a chance |
@ruaridhw Thanks. I will review these PRs early next week. |
This PR is going to be superseded by work to complete #1030 - which builds in base support for "no solution" to all solver interfaces. As such, I am going to close this PR. |
Fixes
Summary/Motivation:
Currently when CPLEX returns "No Solution", this isn't captured in any of the Pyomo solution or solver data objects. We can identify "No Solution" because when both of (1) max time limit is reached and (2) the model is infeasible occur.
Changes proposed in this PR:
CPLEXDirect
_postsolve()
to use the actual CPLEX library constantsMIP_time_limit_infeasible
andMIP_dettime_limit_infeasible
as indicating a solvertermination_condition
ofnoSolution
CplexSolverError
s (but don't add this to the returnedBunch
due to downstream code raisingApplicationError
s)results.solver.return_code
andresults.solver.termination_message
using the available informationCPLEXSHELL
process_logfile()
for CPLEX 12.10 as it looks like IBM have updated the log file schema and is no longer being parsed correctly'no integer solution.'
in the log file as indicating a solvertermination_condition
ofnoSolution
CPLEX Error
lines in the log fileLegal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: