-
Notifications
You must be signed in to change notification settings - Fork 181
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
highspy: updated highs_linear_expression to be immutable for issue #1888 #1891
highspy: updated highs_linear_expression to be immutable for issue #1888 #1891
Conversation
* added __repr__ for easier debugging and pretty print linear expressions * added __iadd__ for mutable operations * added qsum for faster aggregation * updated chained comparison support to work in immutable setting
I can't comment on the implementation (I don't know Python well), other than to say that, at minimum, this needs a bunch of tests. |
Agreed. Working on this now, will update PR. BTW: the code changes for immutability are very simple. The chained comparison support definitely needs more testing, and I believe I've already found a couple of edge cases that need attention. |
…olver to allow complete plotting
Mip log plotter
`col_ecol_offset` now set - as const - for greater clarity
Initialize some arrays
…est solution is NaN
plot_highs_log.py now avoids printing spurious incumbent lines when best solution is NaN
…tatic extern int Highs_passHessian, private static extern int Highs_passModel and private static extern int Highs_getHessianNumNz to highs_csharp_api.cs
… data to be contiguous with additional flags to array_t.
…iGHS into useStdArray # Conflicts: # src/util/HighsHashTree.h
Some minor changes
Replace hot FDIVs with FMULs through saving off the inverse values outside the loops, so we don't incur the cost on each loop iteration.
Precompute expensive computations
Revert "Precompute expensive computations"
* additional tests (with >99% coverage) * performance improvements * added support for calculating a value from expression * added support for getting expression for a given constraint * various bug fixes * made behaviour more consistent/intuitive * improved numpy interability * improved error reporting/handling
Release GIL and Run in Background Thread
* added __repr__ for easier debugging and pretty print linear expressions * added __iadd__ for mutable operations * added qsum for faster aggregation * updated chained comparison support to work in immutable setting
… data to be contiguous with additional flags to array_t.
* additional tests (with >99% coverage) * performance improvements * added support for calculating a value from expression * added support for getting expression for a given constraint * various bug fixes * made behaviour more consistent/intuitive * improved numpy interability * improved error reporting/handling
* Added GIL acquire for python callbacks * Added support for user_callback_data
* added callback support * added user/keyboard interrupt support * fixed issues with deadlock on windows * fixed MIP solution callback issue * added resetGlobalScheduler * released GIL for Presolve * improved setCallback * updated unit tests for 99% coverage
Abandoning this PR, as it has been replaced by #1942. |
Changes should fix #1888
__repr__
for easier debugging and pretty print linear expressions__iadd__
for mutable operationsqsum
for faster aggregationexpr == [lb,ub]
->lb <= expr <= ub
syntaxNote there are some low-risk caveats for the chained comparison support. I have documented them in the code. Though I believe the benefits outweigh the potential concerns.