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

Order of constraints affect creating unexpected warning in simple program #696

Closed
sivik0104 opened this issue May 25, 2023 · 2 comments
Closed
Labels
enhancement resolved Issue is resolved and the feature or fix will be part of next release

Comments

@sivik0104
Copy link

Running of this simple MZ program:

          set of int: DomainSet = 1..2;
          array[DomainSet] of bool: BoolArray = [false, true];
          array[DomainSet] of var 0..1: zero_one_array;
           
          constraint exists (i in DomainSet) (zero_one_array[i] in { 0 });
          constraint forall (i in DomainSet) (BoolArray[i] <-> zero_one_array[i] = 1);

throws 'array access out of bounds' warning, but it won't throw if you only exchange order of constraints in the source code

@Dekker1
Copy link
Member

Dekker1 commented May 26, 2023

I'm unable to recreate the problem. On MiniZinc 2.7.4, whichever way around I put the constraints, I do not get any warnings.

@sivik0104
Copy link
Author

Try with chuffed. Same with or-tools as well.

@Dekker1 Dekker1 added enhancement resolved Issue is resolved and the feature or fix will be part of next release labels May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement resolved Issue is resolved and the feature or fix will be part of next release
Projects
None yet
Development

No branches or pull requests

2 participants