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

Refactor highspy for enhanced usability and performance #1855

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

mathgeekcoder
Copy link

This commit significantly improves the Highs class within highs.py, focusing on enhancing usability, efficiency, and robustness. Key changes include:

  • Added comprehensive docstrings.
  • Improved methods for adding, deleting, and retrieving multiple variables and constraints, for a more flexible and efficient API.
  • Standardized some API conventions. Note, this includes a minor breaking change for the constraint value/dual methods.
  • Updated tests and examples.
  • Removed highs_batch. Order(s) of magnitude performance improvements. E.g.,
perf_old = [h.addVariable() for _ in range(100000)]   # 307.96 seconds

perf_new = [h.addVariable() for _ in range(100000)]   #   0.90 seconds
perf_new = h.addVariables(100000)                     #   0.04 seconds

Refactor highspy for enhanced usability

This commit significantly improves the `Highs` class within `highs.py`, focusing on enhancing usability, efficiency, and robustness. Key changes include:

- Added comprehensive docstrings.
- Improved methods for adding, deleting, and retrieving multiple variables and constraints, for a more flexible and efficient API.
- Standardized some API conventions.  Note, this is a breaking change for the constraint value/dual methods.
- Updated tests and examples.
Updated minimal.py (removed test code)
@jajhall jajhall merged commit d04eae8 into ERGO-Code:latest Jul 23, 2024
110 checks passed
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.

2 participants