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.4: "not an integer expression" #693

Closed
informarte opened this issue May 12, 2023 · 0 comments
Closed

2.7.4: "not an integer expression" #693

informarte opened this issue May 12, 2023 · 0 comments
Assignees
Labels
bug resolved Issue is resolved and the feature or fix will be part of next release

Comments

@informarte
Copy link

I noticed a regression regarding the handling of set variables and I have two examples to demonstrate the issue.

First example:

var bool: c;
var set of int: x = if c then 1..3 else 1..5 endif;
var set of int: y = if not c then 1..3 else 1..5 endif;

constraint c = true;

constraint x subset y;

MiniZinc 2.7.3 returns the following solution:

c = true
x = 1..3
y = 1..5
----------

MiniZinc 2.7.4, however, produces this error message:

Error: evaluation error: not an integer expression

Second example:

include "alldifferent.mzn";

int: N = 4;

array [1..N] of var set of 1..N: x;

constraint alldifferent(x);

constraint array_union(x) = 1..(N div 2);

MiniZinc 2.7.3 returns the following solution:

x = [{}, 2..2, 1..1, 1..2]

MiniZinc 2.7.4, however, produces the above error message.

The problem does not occur when optimization is disabled (with -O0) or Chuffed is used for solving.

@Dekker1 Dekker1 self-assigned this May 15, 2023
@Dekker1 Dekker1 added bug resolved Issue is resolved and the feature or fix will be part of next release labels May 16, 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