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

2.7.3: Reification of lex_less constraints is broken #685

Closed
informarte opened this issue Apr 28, 2023 · 1 comment
Closed

2.7.3: Reification of lex_less constraints is broken #685

informarte opened this issue Apr 28, 2023 · 1 comment
Labels
bug resolved Issue is resolved and the feature or fix will be part of next release

Comments

@informarte
Copy link

Consider this example:

include "lex_lesseq.mzn";

int: N = 10;
int: M = 10;

array [1..N] of var bool: x;
array [1..N] of var bool: y;

constraint lex_lesseq(x, y) \/ lex_lesseq(y, x);

solve satisfy;

output [
    "x = ", show(x), "\n",
    "y = ", show(y)]

MiniZinc 2.7.2 (with default backend) computes this solution:

x = [false, false, false, false, false, false, false, false, false, false]
y = [false, false, false, false, false, false, false, false, false, false]
----------

MiniZinc 2.7.3 prints an error message:

rror: flattening error: free variable in non-positive context
/home/informarte/Software/lib/MiniZincIDE-2.7.3-bundle-linux-x86_64/share/minizinc/std/fzn_lex_lesseq_bool_reif.mzn:9.3-41
  in binary '<->' operator expression
  in call 'lex_lesseq_std_decomposition'
/home/informarte/Software/lib/MiniZincIDE-2.7.3-bundle-linux-x86_64/share/minizinc/std/stdlib/stdlib_internal.mzn:1377.3-1396.7
  in if-then-else expression
/home/informarte/Software/lib/MiniZincIDE-2.7.3-bundle-linux-x86_64/share/minizinc/std/stdlib/stdlib_internal.mzn:1380.5-1395.13
  in let expression
/home/informarte/Software/lib/MiniZincIDE-2.7.3-bundle-linux-x86_64/share/minizinc/std/stdlib/stdlib_internal.mzn:1387.7-37
  in variable declaration for 'b'
@Dekker1 Dekker1 added bug resolved Issue is resolved and the feature or fix will be part of next release labels May 1, 2023
@Dekker1
Copy link
Member

Dekker1 commented May 1, 2023

Resolved by 1d35802

@Dekker1 Dekker1 closed this as completed May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 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