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

struct zn_options(solver, fzn_tmp, output, optimize, parser, setup_prio, solutions, statistics, timeout, var_names, fzn_output, mzn_output)

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'. This option only affects the mzn_run predicates.
A stream (name or handle) to which the results are printed. For flatzinc, this is the raw output from output-annotations. For minizinc, this is the formatted product of output-items. The default is 'output'.
If 'off', pass --no-optimize to the Minizinc-Flatzinc translator. This can improve performance on large models. Default is 'on'. This option only affects the mzn_run predicates.
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. The value 'all' (or 0) means no limit.
If this option is set to 'on', print various statistics in the form of comment lines at the end of the output. Default is 'off'.
Time limit in seconds. Default is 0, meaning no timeout.
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.
For internal use only - use 'output' option instead. To see raw flatzinc output via mzn_run, use {output:null,fzn_output:Stream}.
For internal use only - use 'output' option instead


Used to specify options for Mini/FlatZinc solving. Most options are meaningful for both mzn_xxx and fzn_xxx predicates.

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