Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #1195 by exposing LP basis information in the Python LP API, including an enum for basis statuses and a regression test to ensure basis round-tripping works.
Changes:
- Added
LP.getBase()/LP.setBase()for retrieving and restoring column/row basis statuses via SCIP’s LPI. - Exposed basis status constants as
SCIP_BASESTATfrom the package. - Added a test exercising basis get/set and verifying basis preservation after re-solve.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/pyscipopt/lp.pxi |
Implements LP.getBase() / LP.setBase() using SCIPlpiGetBase / SCIPlpiSetBase. |
src/pyscipopt/scip.pxd |
Adds C declarations for SCIPlpiGetBase / SCIPlpiSetBase. |
src/pyscipopt/scip.pxi |
Exposes PY_SCIP_BASESTAT mapping to SCIP base status constants. |
src/pyscipopt/scip.pyi |
Updates typing stubs to include LP.getBase, LP.setBase, and PY_SCIP_BASESTAT. |
src/pyscipopt/__init__.py |
Re-exports PY_SCIP_BASESTAT as SCIP_BASESTAT. |
tests/test_lp.py |
Adds basis get/set test coverage for the LP class. |
CHANGELOG.md |
Documents the newly added LP basis APIs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix #1195