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

Flattening produces search annotations with undeclared variables #123

Closed
informarte opened this Issue Nov 4, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@informarte

informarte commented Nov 4, 2016

I am considering the instance plusexample_6 of the java_auto_gen problem, which is part of the MiniZinc benchmarks library. I have the following solution (in terms of constraints) for that instance:

constraint chooseint_239 = 5;
constraint chooseint_268 = 1;
constraint chooseint_297 = 4;
constraint chooseint_326 = 4;
constraint chooseint_355 = 5;
constraint chooseint_384 = 0;
constraint chooseint_413 = 5;
constraint chooseint_442 = 0;
constraint chooseint_471 = 5;
constraint chooseint_500 = 3;
constraint chooseint_529 = 5;
constraint chooseint_558 = 1;
constraint chooseint_587 = 5;
constraint grouptotal_1016 = 8;
constraint grouptotal_1043 = 13;
constraint grouptotal_1070 = 13;
constraint grouptotal_1097 = 18;
constraint grouptotal_1123 = 18;
constraint grouptotal_1187 = 9;
constraint grouptotal_1214 = 9;
constraint grouptotal_1241 = 14;
constraint grouptotal_1268 = 14;
constraint grouptotal_1294 = 19;
constraint grouptotal_1358 = 5;
constraint grouptotal_1385 = 10;
constraint grouptotal_1412 = 10;
constraint grouptotal_1439 = 15;
constraint grouptotal_1465 = 18;
constraint grouptotal_1529 = 5;
constraint grouptotal_1556 = 5;
constraint grouptotal_1583 = 10;
constraint grouptotal_1610 = 13;
constraint grouptotal_1636 = 18;
constraint grouptotal_1700 = 5;
constraint grouptotal_1727 = 10;
constraint grouptotal_1754 = 13;
constraint grouptotal_1781 = 18;
constraint grouptotal_1807 = 19;
constraint grouptotal_1871 = 5;
constraint grouptotal_1898 = 8;
constraint grouptotal_1925 = 13;
constraint grouptotal_1952 = 14;
constraint grouptotal_1978 = 19;
constraint grouptotal_674 = 6;
constraint grouptotal_701 = 10;
constraint grouptotal_728 = 14;
constraint grouptotal_755 = 19;
constraint grouptotal_781 = 19;
constraint grouptotal_845 = 5;
constraint grouptotal_872 = 9;
constraint grouptotal_899 = 14;
constraint grouptotal_926 = 14;
constraint grouptotal_952 = 19;
constraint igrouptotal_1016 = 1;
constraint igrouptotal_1043 = 1;
constraint igrouptotal_1070 = 1;
constraint igrouptotal_1097 = 1;
constraint igrouptotal_1123 = 1;
constraint igrouptotal_1160 = 1;
constraint igrouptotal_1187 = 1;
constraint igrouptotal_1214 = 1;
constraint igrouptotal_1241 = 1;
constraint igrouptotal_1268 = 1;
constraint igrouptotal_1294 = 1;
constraint igrouptotal_1331 = 1;
constraint igrouptotal_1358 = 1;
constraint igrouptotal_1385 = 1;
constraint igrouptotal_1412 = 1;
constraint igrouptotal_1439 = 1;
constraint igrouptotal_1465 = 1;
constraint igrouptotal_1502 = 1;
constraint igrouptotal_1529 = 1;
constraint igrouptotal_1556 = 1;
constraint igrouptotal_1583 = 1;
constraint igrouptotal_1610 = 1;
constraint igrouptotal_1636 = 1;
constraint igrouptotal_1673 = 1;
constraint igrouptotal_1700 = 1;
constraint igrouptotal_1727 = 1;
constraint igrouptotal_1754 = 1;
constraint igrouptotal_1781 = 1;
constraint igrouptotal_1807 = 1;
constraint igrouptotal_1844 = 1;
constraint igrouptotal_1871 = 1;
constraint igrouptotal_1898 = 1;
constraint igrouptotal_1925 = 1;
constraint igrouptotal_1952 = 1;
constraint igrouptotal_1978 = 1;
constraint igrouptotal_647 = 1;
constraint igrouptotal_674 = 1;
constraint igrouptotal_701 = 1;
constraint igrouptotal_728 = 1;
constraint igrouptotal_755 = 1;
constraint igrouptotal_781 = 1;
constraint igrouptotal_818 = 1;
constraint igrouptotal_845 = 1;
constraint igrouptotal_872 = 1;
constraint igrouptotal_899 = 1;
constraint igrouptotal_926 = 1;
constraint igrouptotal_952 = 1;
constraint igrouptotal_989 = 1;
constraint ii_2025 = 1;
constraint ii_2045 = 1;
constraint ii_2065 = 1;
constraint ii_2085 = 1;
constraint ii_2105 = 1;
constraint ii_2125 = 1;
constraint ii_2145 = 1;
constraint ii_2165 = 1;
constraint ii_2185 = 1;
constraint ii_2205 = 1;
constraint ii_2225 = 1;
constraint ii_2245 = 1;
constraint ii_2265 = 1;
constraint iobjective = 1;
constraint itotal_2044 = 1;
constraint itotal_2064 = 1;
constraint itotal_2084 = 1;
constraint itotal_2104 = 1;
constraint itotal_2124 = 1;
constraint itotal_2144 = 1;
constraint itotal_2164 = 1;
constraint itotal_2184 = 1;
constraint itotal_2204 = 1;
constraint itotal_2224 = 1;
constraint itotal_2244 = 1;
constraint itotal_2264 = 1;
constraint itotal_2270 = 1;
constraint iunnamed_242 = 1;
constraint iunnamed_271 = 1;
constraint iunnamed_300 = 1;
constraint iunnamed_329 = 1;
constraint iunnamed_358 = 1;
constraint iunnamed_387 = 1;
constraint iunnamed_416 = 1;
constraint iunnamed_445 = 1;
constraint iunnamed_474 = 1;
constraint iunnamed_503 = 1;
constraint iunnamed_532 = 1;
constraint iunnamed_561 = 1;
constraint iunnamed_590 = 1;
constraint prev = array1d(1..9, [2, 6, 1, 9, 3, 8, 5, 4, 7]);
constraint total_2064 = 6;
constraint total_2084 = 10;
constraint total_2104 = 14;
constraint total_2124 = 19;
constraint total_2144 = 19;
constraint total_2164 = 24;
constraint total_2184 = 24;
constraint total_2204 = 29;
constraint total_2224 = 32;
constraint total_2244 = 37;
constraint total_2264 = 38;
constraint total_2270 = 43;

When I add this solution to the instance (just by pasting it) and then flatten the result for the g12 solver, I obtain a FlatZinc file with undeclared variables which the g12 solver then complains about:

solution.fzn:208:
  symbol error: `Greater_1980' undeclared
solution.fzn:208:
  symbol error: `Greater_1809' undeclared
solution.fzn:208:
  symbol error: `Greater_1638' undeclared
solution.fzn:208:
  symbol error: `Greater_1467' undeclared
solution.fzn:208:
  symbol error: `Greater_1296' undeclared
solution.fzn:208:
  symbol error: `Greater_1125' undeclared
solution.fzn:208:
  symbol error: `Greater_954' undeclared
solution.fzn:208:
  symbol error: `Greater_783' undeclared

All these variables occur only in the seq_search annotation of the solve goal.

@guidotack guidotack closed this in e70b1ac Nov 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment