Skip to content

Add useful error message for missing highspy. Allow variable objective #453

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

RobbieKiwi
Copy link

Closes #452.

Changes proposed in this Pull Request

-Add useful warning when using cbc without highspy installed
-Allow variable to be passed to objective

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

Copy link
Member

@lkstrp lkstrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Just add a very small test. Thank you @RobbieKiwi !

@RobbieKiwi
Copy link
Author

Is anybody good at monkeypatching?
In order to test the behaviour when highs is not installed I monkepatch "available_solvers" which is a global list imported by by model.py, but for the monkeypatch to work I have to re-import the Model class, and that somehow breaks all the tests in test_variable.py that rely on a pytest fixture that returns a model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vague warning for cbc highs dependency. Cannot have Variable objective
2 participants