Skip to content
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

Allow usage of MPSolver.SetStartingLPBasis in Python API #4188

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

pet-mit
Copy link
Contributor

@pet-mit pet-mit commented Apr 17, 2024

This PR allows using the MPSolver::SetStartingLPBasis in Python, via the Swig interface.

The trap is that Python converts the MPSolver::BasisStatus enums to integers (for example, MPVariable::basis_status returns an 'int' in Python, see new test file).
So we have to define a custom function that converts back integers to MPSolver::BasisStatus.

@pet-mit
Copy link
Contributor Author

pet-mit commented Aug 29, 2024

@lperron @Mizux what do you think about this change request?

@lperron lperron merged commit 6099295 into google:main Sep 21, 2024
35 of 114 checks passed
@Mizux Mizux requested a review from lperron September 21, 2024 19:31
@Mizux Mizux added this to the v10.0 milestone Sep 21, 2024
@Mizux Mizux added Feature Request Missing Feature/Wrapper Lang: Python Python wrapper issue Solver: Linear Solver Related to all Linear Solver (GLOP, BOP, CBC etc...) labels Sep 21, 2024
@Mizux Mizux modified the milestones: v10.0, v9.12 Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Missing Feature/Wrapper Lang: Python Python wrapper issue Solver: Linear Solver Related to all Linear Solver (GLOP, BOP, CBC etc...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants