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

JSON-output of two-dimensional arrays seems to group incorrectly. #157

Closed
einarjohan opened this Issue Mar 29, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@einarjohan

einarjohan commented Mar 29, 2017

Using latest HEAD on develop f90ec5d and a simple model based on experimentation with the sudoku model from the tutorial:

array[0..2,0..4] of var int: start;

constraint forall(i in 0..2, j in 0..4) (
    start[i, j] == i * 10 + j
);

solve satisfy;

JSON-output yields:

{
  "start" : [[0, 1, 2], [3, 4, 10], [11, 12, 13], [14, 20, 21], [22, 23, 24]]
}
----------

Which does not match the expected 3x5 size. What I would expect as output is:

{
  "start" : [[0, 1, 2, 3, 4], [10, 11, 12, 13, 14], [20, 21, 22, 23, 24]]
}
----------

Using the resulting output as input to mzn2fzn yields:

MiniZinc: evaluation error:
  sudoku.mzn:1:
  in variable declaration for 'start'
  Index set mismatch
@guidotack

This comment has been minimized.

Member

guidotack commented Mar 29, 2017

Sorry, I pushed too early. Should be fixed now.

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