[ library(flatzinc) | Reference Manual | Alphabetic Index ]

struct zn_options(solver, fzn_tmp, output, parser, setup_prio, solutions, var_names)

Options for Mini/FlatZinc solving


Determines which ECLiPSe solver(s) the FlatZinc variables and constraints get mapped to. The name is the name of a library implementing the mapping, e.g. fzn_ic, fzn_fd or fzn_eplex. The default is 'fzn_ic'.
One of the atoms 'file' or 'pipe', determining if intermediate FlatZinc code is piped from the generator to the interpreter, or passed through an intermediate file. Default is 'file'.
A stream (name or handle) to which the results are printed. The default is 'output'.
One of the atoms 'strict' or 'fast', giving the choice between a stricter, but slower dedicated FlatZinc parser (in lib(flatzinc_parser)), or a faster parsing method (which detects less errors because it uses the normal, but reconfigured ECLiPSe parser). Since FlatZinc input is normally automatically generated, the default is to use the faster and more permissive method 'fast'.
The priority under which the constraint setup will be executed (see call_priority/2 and get_priority/1). Possible values are the ECLiPSe priorities 1 to 12, or 0 (the default) which stands for the current priority of the calling code. A sensible value for this option is 2, which means that the setup code is executed under high priority (still allowing debug/visualisation goals). The effect of such a setting is that no propagation occurs until all constraints are fully set up, possibly leading to time savings.
The maximum number of solutions computed (and possibly output). Only effective if no minimization/maximization is done. Only effective for toplevel predicates like fzn_run/mzn_run that are deterministic and do not succeed once per solution. Default is 1, 'all' (or 0) means no limit.
If this option is set to 'on', the ECLiPSe variables representing Zinc variables will be marked with their Zinc names, using the facilities of lib(var_name). This is mainly useful for debugging. The default is 'off' to save space and time.


Used to specify options for Mini/FlatZinc solving.

All predicates that accept the zn_options structure also accept the name of a solver mapping library alone. In this case, all other options take their default values.


    ?- fzn_run("queens.fzn", fzn_ic).
    ?- fzn_run("queens.fzn", zn_options{solver:fzn_ic,solutions:3}).

See Also

fzn_run / 1, fzn_run / 2, fzn_run_stream / 2, fzn_init / 2