this repo has no description
1% This file contains redefinitions of standard builtins for version 2.0.2
2% that can be overridden by solvers.
3
4/***
5 @groupdef flatzinc.twootwo FlatZinc builtins added in MiniZinc 2.0.2.
6
7 These functions and predicates define built-in operations of the MiniZinc language
8 that have been added in MiniZinc 2.0.2. Solvers that support these natively need
9 to include a file called redefinitions-2.0.2.mzn in their solver library that
10 redefines these predicates as builtins.
11
12*/
13
14predicate symmetry_breaking_constraint(var bool: b) = b;
15
16predicate redundant_constraint(var bool: b) = b;
17
18
19/** @group flatzinc.twootwo Element constraint on array with MiniZinc index set, constrains \a x[\a idx] = \a c
20 This can be overridden in a solver that can perform the index calculation more efficiently than using
21 a MiniZinc decomposition.
22*/
23predicate array_var_bool_element_nonshifted(var int: idx, array[int] of var bool: x, var bool: c) =
24 array_var_bool_element((idx-(min(index_set(x))-1))::domain,array1d(x),c);
25
26/** @group flatzinc.twootwo Element constraint on array with MiniZinc index set, constrains \a x[\a idx] = \a c
27 This can be overridden in a solver that can perform the index calculation more efficiently than using
28 a MiniZinc decomposition.
29*/
30predicate array_var_int_element_nonshifted(var int: idx, array[int] of var int: x, var int: c) =
31 array_var_int_element((idx-(min(index_set(x))-1))::domain,array1d(x),c);
32
33/** @group flatzinc.twootwo Element constraint on array with MiniZinc index set, constrains \a x[\a idx] = \a c
34 This can be overridden in a solver that can perform the index calculation more efficiently than using
35 a MiniZinc decomposition.
36*/
37predicate array_var_float_element_nonshifted(var int: idx, array[int] of var float: x, var float: c) =
38 array_var_float_element((idx-(min(index_set(x))-1))::domain,array1d(x),c);
39
40/** @group flatzinc.twootwo Element constraint on array with MiniZinc index set, constrains \a x[\a idx] = \a c
41 This can be overridden in a solver that can perform the index calculation more efficiently than using
42 a MiniZinc decomposition.
43*/
44predicate array_var_set_element_nonshifted(var int: idx, array[int] of var set of int: x, var set of int: c) =
45 array_var_set_element((idx-(min(index_set(x))-1))::domain,array1d(x),c);