SCIP interface does not read solution when problem not solved
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 432
- PR merge metrics
- No merged PRs in 30d
Description
Details for the issue
--------------------
#### What did you do?
Solving a problem with SCIP solver with time limit.
#### What did you expect to see?
After a time-out, a solution in accordance with SCIP logs
#### What did you see instead?
a zero solution for all variables that is the one computed by SCIP (I also checked the temporary file created by SCIP.
Useful extra information
-------------------------
Looking at the code, it seems to me the issue is at
https://github.com/coin-or/pulp/blob/master/pulp/apis/scip_api.py#L184-L185
these lines completely skip the solution read when the problem was not solved.
I would be tempeted to just remove constants.LpStatusNotSolved from the noSolutionStatus in
https://github.com/coin-or/pulp/blob/master/pulp/apis/scip_api.py#L94, but I am not sure if this works in all cases.
The info below often helps, please fill it out if you're able to. :)
#### What operating system are you using?
- [x] Windows: ( _version:_10 )
- [ ] Linux: ( _distro:_ ___ )
- [ ] Mac OS: ( _version:_ ___ )
- [ ] Other: ___
#### I'm using python version:
- [ ] 2.7
- [ ] 3.4
- [ ] 3.5
- [x] 3.6
- [ ] Other: ___
#### I installed PuLP via:
- [x] pypi (python -m pip install pulp)
- [ ] github (python -m pip install -U git+https://github.com/coin-or/pulp)
- [ ] Other: ___ (conda?)
#### Did you also
- [ ] Tried out the latest github version: https://github.com/coin-or/pulp
- [x] Searched for an existing similar issue: https://github.com/coin-or/pulp/issues?utf8=%E2%9C%93&q=is%3Aissue%20
Contributor guide
Research direction
Start in pulp/apis/scip_api.py at the noSolutionStatus definition around line 94 and the solution-reading logic around lines 184-185. Reproduce a time-limited SCIP solve on Windows with Python 3.6 and inspect the temporary solution file. Done means a valid solution reported in the SCIP logs is read instead of returning zero values when the problem times out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100