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

fzn-gecode, maximum_arg, abort on co-occurrences #169

Open
matsc-at-sics-se opened this issue Jun 24, 2023 · 1 comment
Open

fzn-gecode, maximum_arg, abort on co-occurrences #169

matsc-at-sics-se opened this issue Jun 24, 2023 · 1 comment

Comments

@matsc-at-sics-se
Copy link

On Ubuntu 22.04.2 LTS.

$ cat /tmp/latest.mzn
include "globals.mzn";
var 1..2 union 4..6: A;
var 1..7: B;
var 1..3 union 5..7: C;
var 1..1 union 7..7: D;
var 1..4 union 6..7: E;
constraint
maximum_arg([C,B,D,A,E],A);
$ minizinc /tmp/latest.mzn
Error: Gecode: Int::argmax: Argument array contains same variable multiply
@zayenz
Copy link
Member

zayenz commented Jun 28, 2023

This is a good point, in Gecode when used directly we require that arrays do not have shared variables for many constraints. Usage from a modelling system like MiniZinc (that does lots of common subexpression elimination) is different.

We should most likely make sure that all constraints posted form the registry are unshared beforehand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants