-
Notifications
You must be signed in to change notification settings - Fork 11
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
Zero coefficients cause panic "invalid problem: Warning" #5
Comments
I fixed it by handling highs warnings as successes, just logging a warning. But the logs are quite useless at the moment, because there is no way to know what the problem was. But @jajhall , it would be great if there was a way to programmatically access error messages from the C api, instead of trying to use side effects directly from inside HiGHS to perform IO. Something like |
Indeed, some system of retrieving the cause of the most recent error/warning message is planned. Thanks for the pointer |
Thanks both for the quick reactions. |
Thanks for maintaining these LP libraries.
I've noticed the following when using
good_lp
with Highs, hence reporting it here.Input
Example program:
Actual output
When run with
highs
1.2.1, it panics at theoptimise
call:Expected output
It should just print the unique solution to the problem (
x = y = 0
) without panicking.highs
0.6.1 works as expected.Workaround
The issue disappears if the coefficient
c
is nonzero. Thus, one can skip termsc y
when generating constraints by checking if the coefficientc
is zero.In the above example, calling
problem.add_row(..1, &[(x, 1.)])
instead ofproblem.add_row(..1, &[(x, 1.), (y, c)])
works.The text was updated successfully, but these errors were encountered: