-
Notifications
You must be signed in to change notification settings - Fork 126
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
solve_mixed should check arguments for consistency #1678
Comments
What is the error? |
Yes, sorry. I get the following message:
|
Probably some index error. In the meantime you could do julia> solve_mixed(A, v, Id)
[1 0 0]` (Assuming that you only have |
The shortened version works? This part of code was suggested to me by @lkastner once and I just kept with it. But I can switch to the short one. However, the issue should eventually be resolved. |
Your final vector in the argument list has the wrong length. |
Now I really wish this was not true... But it probably is. Yes, sorry, I just didn't bother checking this again. I only remember this line being suggested to me by @lkastner once upon a time. But it had already been late in the evening at that point and probably something got lost in translation. Either way, a plausibility check and a more informative error message would probably be helpful. Thanks for catching my mistake and my apologies for the mess! |
We should check the input for consistency. |
I agree a more helpful error message would be good! |
Try the following code:
According to the documentation of
solve_mixed
, this should look for solutions ofA*x = v
under the condition thatx >= 0
. The obvious solution isx = [1; 0; 0]
, but it throws an error.Interestingly, the code runs when we replace
A
byA = ZZ[2 1; -1 -1]
.CC: @lkastner @benlorenz
The text was updated successfully, but these errors were encountered: