Debian Codegraph @

tests/spec/unit/on_restart/sol_float.mzn

raw
1 /***
2 !Test
3 solvers: [gecode]
4 options:
5 restart: "constant"
6 restart-base: 100
7 expected: !Result
8 status: OPTIMAL_SOLUTION
9 solution: !Solution
10 x: 3
11 y: 2.0
12 ***/
13 include "experimental/on_restart.mzn";
14
15 var 1..3: x;
16 var float: y;
17
18 predicate foo() =
19 (status() != START) -> (y = sol(int2float(x)));
20
21 solve ::on_restart("foo") ::int_search([x], input_order, indomain_min) maximize x;