| 1 |
/*** |
| 2 |
!Test |
| 3 |
solvers: [gecode] |
| 4 |
options: |
| 5 |
all_solutions: true |
| 6 |
expected: !Result |
| 7 |
solution: !SolutionSet |
| 8 |
- !Solution |
| 9 |
a: [true, false, true] |
| 10 |
x: null |
| 11 |
- !Solution |
| 12 |
a: [true, true, true] |
| 13 |
x: null |
| 14 |
- !Solution |
| 15 |
a: [false, false, true] |
| 16 |
x: 2.4 |
| 17 |
- !Solution |
| 18 |
a: [false, true, true] |
| 19 |
x: 1.2 |
| 20 |
***/ |
| 21 |
|
| 22 |
array [1..3] of var bool: a :: add_to_output; |
| 23 |
array [1..3] of var opt {1.2, 2.4}: b :: add_to_output; |
| 24 |
|
| 25 |
var opt {1.2, 2.4}: x :: add_to_output; |
| 26 |
|
| 27 |
constraint a[3]; |
| 28 |
constraint fzn_if_then_else_var_opt_float(a, b, x); |
| 29 |
|
| 30 |
constraint absent(b[1]) /\ occurs(b[2]) /\ occurs(b[3]); |
| 31 |
constraint b[2] < b[3]; |