tests/spec/unit/on_restart/sol_set.mzn
raw| 1 | /*** |
| 2 | !Test |
| 3 | solvers: [gecode, chuffed] |
| 4 | options: |
| 5 | restart: "constant" |
| 6 | restart-base: 100 |
| 7 | expected: !Result |
| 8 | status: OPTIMAL_SOLUTION |
| 9 | solution: !Solution |
| 10 | x: !!set {} |
| 11 | y: !!set {1} |
| 12 | ***/ |
| 13 | include "experimental/on_restart.mzn"; |
| 14 | var set of 1..3: x; |
| 15 | var set of 1..100: y; |
| 16 | |
| 17 | predicate foo() = |
| 18 | if status() = START then y = {} else y = sol(x) endif; |
| 19 | |
| 20 | solve ::on_restart("foo") ::set_search([x], input_order, indomain_min) minimize sum(i in x)(i); |