| 1 |
/*** |
| 2 |
!Test |
| 3 |
type: output-model |
| 4 |
solvers: [gecode] |
| 5 |
expected: !OutputModel dzn_output_array.ozn |
| 6 |
***/ |
| 7 |
|
| 8 |
enum Foo = { A, B, C }; |
| 9 |
|
| 10 |
var bool: x; |
| 11 |
array [Foo] of var bool: a :: add_to_output = array1d(Foo, [x, x, x]); |
| 12 |
array [1..3] of var bool: b :: add_to_output = [x, x, x]; |
| 13 |
array [int] of var bool: c :: add_to_output = [x]; |
| 14 |
|
| 15 |
array [Foo] of bool: d :: output_only :: add_to_output = array1d(Foo, [fix(x), fix(x), fix(x)]); |
| 16 |
array [int] of bool: e :: output_only :: add_to_output = [fix(x)]; |
| 17 |
array [2..3] of bool: f :: output_only :: add_to_output = array1d(2..3, [fix(x), fix(x)]); |
| 18 |
array [int] of bool: g :: output_only :: add_to_output = [fix(x) | i in 1..3]; |
| 19 |
|
| 20 |
array [1..2, int] of bool: h :: output_only :: add_to_output = array2d(1..2, 2..3, [fix(x) | i in 1..4]); |