tests/spec/unit/search/test-ff3.mzn
raw| 1 | /*** |
| 2 | --- !Test |
| 3 | solvers: [gecode, chuffed] |
| 4 | expected: !Result |
| 5 | solution: !Solution |
| 6 | x: 5 |
| 7 | y: 1 |
| 8 | z: 1 |
| 9 | w: 3 |
| 10 | ***/ |
| 11 | |
| 12 | var 1..8: x; |
| 13 | var 1..10: y; |
| 14 | var 1..10: z; |
| 15 | var 1..10: w; |
| 16 | constraint x = 1 -> x < 1; |
| 17 | constraint x > 1 -> y < 5; |
| 18 | constraint x > 1 -> z < 5; |
| 19 | constraint x > 1 -> w < 5; |
| 20 | constraint y = 1 -> x > 4; |
| 21 | constraint x > 2 -> w > 2; |
| 22 | |
| 23 | solve :: int_search([x,y,z,w],first_fail,indomain_min,complete) |
| 24 | satisfy; |