-
Notifications
You must be signed in to change notification settings - Fork 4
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
Handling numerical Issues in model #54
Comments
For 1: You have defined For 2: This should come from an error or warning in MiniZinc.jl can not decide whether the solver experienced numerical issues based on the values. Our job is just to tell the user what |
@odow thanks - looking at just case 2, we'd like it if MiniZinc could throw an error that an int64 in an MOI model couldn't be converted to an int32, or something like that. |
I don't fully understand. Is |
internally on a different (larger) example we saw errors like:
and
we'll try to get you something to reproduce these |
I think this is a bug in Chuffed. And some solvers do not support The (infeasible) model is:
Chuffed 0.10.4
COIN-BC 2.10.7
Gecode 6.3.0
|
Ah thanks Oscar. Ideally when we call a MiniZinc via MOI and something like that isn't supported, we would get an informative error back. Is that possible to do here? |
I've confirmed that it's still an issue with the latest minizinc release. opened an issue: chuffed/chuffed#157
Not really. Hopefully we can handle the |
Thank you Oscar! Very helpful |
Okay, we should be able to catch the error case without crashing your process. |
So I've marked this as closed and I'll release a new version. That should fix your error, although now MOI will return If that's not sufficient, please comment and I'll re-open. |
Thanks - I think that's all we can expect from minizinc.jl probably. Hopefully Chuffed devs will fix their overflow bug! |
When model contains numbers >= typemax(Int32), I noticed some strange behaviors. Check the following simple model:
large_n = typemax(Int32)
Issue 1:
if we set rhs = large_n, I got an error msg:
ERROR: LoadError: MathOptInterface.UnsupportedConstraint{MathOptInterface.ScalarNonlinearFunction, MathOptInterface.GreaterThan{Int32}}:
MathOptInterface.ScalarNonlinearFunction
-in-MathOptInterface.GreaterThan{Int32}
constraint is not supported by the model.However, the error'd disappear if we set rhs to something even bigger e.g., 2*large_n?
Issue 2:
When we set rhs = 2*large_n, it returns MOI.OPTIMAL
var 1 .. 10: x1; var 1 .. 10: x2; constraint ((x1 * 2147483647) + x2) >= 4294967294; solve satisfy;
But, if we set large_n = typemax(Int32) + 2, it returns MOI.INFEASIBLE
var 1 .. 10: x1; var 1 .. 10: x2; constraint ((x1 * 2147483649) + x2) >= 4294967298; solve satisfy;
Looks like the solver (chuffed) can't handle these large numbers. Should we always warn user when there is numerical issue in the model? What error message'd be appropriate?
Repro:
The text was updated successfully, but these errors were encountered: