This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.

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 'lastval' functions provides access to the last assigned value of variables.
% The lastval functions are meaningful when the solver status is not START.
function var bool: lastval(var bool: x);
function var float: lastval(var float: x);
function var int: lastval(var int: x);
function var set of int: lastval(var set of int: x);