20 lines
1.1 KiB
MiniZinc
20 lines
1.1 KiB
MiniZinc
% A search annotation that supplies a function to be executed on restart
|
|
ann: on_restart(string: pred); @\Vlabel{ann:on_restart}@
|
|
% An annotation for FlatZinc that accesses solver state
|
|
ann: solver_state;
|
|
% The 'status' function reports the status of the solver (before restarting).
|
|
enum STATUS = {START, UNKNOWN, UNSAT, SAT, OPT} @\Vlabel{ann:enum_status}@
|
|
function var STATUS: status(); @\Vlabel{ann:status}@
|
|
% The 'sol' functions provides access to solution values of model variables.
|
|
% The sol functions are meaningful when the solver status is not START.
|
|
function var bool: sol(var bool: x); @\Vlabel{ann:sol1}@
|
|
function var float: sol(var float: x); @\Vlabel{ann:sol2}@
|
|
function var int: sol(var int: x); @\Vlabel{ann:sol3}@
|
|
function var set of int: sol(var set of int: x); @\Vlabel{ann:sol4}@
|
|
% The 'last_val' functions provides access to the last assigned value of variables.
|
|
% The last_val functions are meaningful when the solver status is not START.
|
|
function var bool: last_val(var bool: x);
|
|
function var float: last_val(var float: x);
|
|
function var int: last_val(var int: x);
|
|
function var set of int: last_val(var set of int: x);
|