[ library(minizinc) | Reference Manual | Alphabetic Index ]
Run a MiniZinc model using command line arguments
Runs a MiniZinc model, taking all the necessary parameters from
the process command line. The recommended way to use this
predicate is by calling eclipse from a command line as:
eclipse -e minizinc:mzn_run -- [<options>] <model>.mzn [<data>.dzn]
-- that separates eclipse's own arguments from
the arguments interpreted by mzn_run/0).
The following options are recognized:
Note: currently, only a single data file can be specified.
a minizinc model file, with mandatory .mzn extension.
a minizinc data file, with mandatory .dzn extension.
compute all solutions. This is currently only meaningful with
- -b <solver>
selects the solver backend (fzn_ic, fzn_eplex, fzn_fd).
The default is fzn_ic.
- -d <datafile>
an alternative way to specify a data file.
- -n <num>
compute at most the given number of solutions. This is currently
only meaningful with satisfaction problems. Default is 1.
pass the --no-optimize option to mzn2fzn, which can improve
performance on large models.
suppress all output printed to the log_output stream. Equivalent
to calling set_stream(log_output,null).
- -o <outputfile>
redirect regular solver output to the given file. Note that
log_output, warning_output and error output are not redirected.
print the raw flatzinc output (corresponding to the flatzinc output
annotations) instead of the postprocessed (via solns2out) output
corresponding to the minizinc output items.
after each solution, print a statistics-comment as part of the
output. Without this option, this information goes to the log_output
stream, which can be suppressed if desired.
- -t <seconds>
solver timeout in seconds. This does not apply to the Minizinc-to-
Flatzinc translation (mzn2fzn), but only to the solver setup and
search phases. With satisfaction problems, a timeout may lead to
fewer solutions, with optimization problems to a suboptimal solution,
or no solution at all.
Modes and Determinism
$ eclipse -e minizinc:mzn_run -- --no-log -a send-more-money.mzn
mzn_run / 2, mzn_run / 3, flatzinc : struct(zn_options)