Skip to content

fzn-gecode, table, wrong solution #167

Closed

Description

@matsc-at-sics-se

On Ubuntu 22.04.2 LTS.

Here is a model that produces two solutions, one right, one wrong.

include "globals.mzn";
var 1..1 union 3..3: B;
var 2..3: C;
array[int,int] of int: extension =
[| 3,3,2,1,
 | 3,2,2,3,
 | 4,4,3,1,
 |];

constraint table([3,C,C,B],extension);
output ["\([B,C])\n"];

% SOLUTIONS
% [1,2] - wrong
% [3,2] - right

Activity

  1. added a commit that references this issue on Aug 31, 2023
    34adb07
  2. zayenz commented on Jul 13, 2026

    @zayenz
    Member

    Fixed on main. Compact tables now check for duplicate variables, and the FlatZinc table interface unshares variables before posting the constraint.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions