libminizinc
libminizinc copied to clipboard
minizinc --help is incomplete
minizinc --help does not print all options.
In particular, it does not document the --all-solutions option or its synonyms.
MiniZinc IDE 2.7.2, macOS 13.3.3 Intel.
Current output below, perhaps there other things missing:
% /Applications/MiniZincIDE.app//Contents/Resources/minizinc --version
MiniZinc to FlatZinc converter, version 2.7.2, build 828456395
Copyright (C) 2014-2023 Monash University, NICTA, Data61
% /Applications/MiniZincIDE.app//Contents/Resources/minizinc --help
minizinc: MiniZinc driver.
Usage: minizinc [<options>] [-I <include path>] <model>.mzn [<data>.dzn ...] or just <flat>.fzn
General options:
--help, -h
Print this help message.
--version
Print version information.
--solvers
Print list of available solvers.
--time-limit <ms>
Stop after <ms> milliseconds (includes compilation and solving).
--solver <solver id>, --solver <solver config file>.msc
Select solver to use.
--help <solver id>
Print help for a particular solver.
-v, -l, --verbose
Print progress/log statements. Note that some solvers may log to stdout.
--verbose-compilation
Print progress/log statements for compilation.
-s, --statistics
Print statistics.
--compiler-statistics
Print statistics for compilation.
-c, --compile
Compile only (do not run solver).
--config-dirs
Output configuration directories.
--param-file <file>
Load parameters from the given JSON file.
--json-stream
Print output as newline-delimited JSON message objects.
Flattener input options:
--instance-check-only
Check the model instance (including data) for errors, but do not
convert to FlatZinc.
-e, --model-check-only
Check the model (without requiring data) for errors, but do not
convert to FlatZinc.
--model-interface-only
Only extract parameters and output variables.
--model-types-only
Only output variable (enum) type information.
--debug
Evaluate debugging intrinsics ending with _dbg.
--no-optimize
Do not optimize the FlatZinc
--no-chain-compression
Do not simplify chains of implication constraints.
-m <file>, --model <file>
File named <file> is the model.
-d <file>, --data <file>
File named <file> contains data used by the model.
-D <data>, --cmdline-data <data>
Include the given data assignment in the model.
--cmdline-json-data <data>
Include the given JSON data in the model.
--stdlib-dir <dir>
Path to MiniZinc standard library directory
-G <dir>, --globals-dir <dir>, --mzn-globals-dir <dir>
Search for included globals in <stdlib>/<dir>, or <dir> when given a absolute or relative path.
-, --input-from-stdin
Read problem from standard input. Combine with --input-is-flatzinc when passing FlatZinc code.
-I <dir>, --search-dir <dir>
Additionally search for included files in <dir>.
-D "fMIPdomains=true"
Switch on MIPDomain Unification
--MIPDMaxIntvEE <n>
MIPD: max integer domain subinterval length to enforce equality encoding, default 0
--MIPDMaxDensEE <n>
MIPD: max domain cardinality to N subintervals ratio
to enforce equality encoding, default 0, either condition triggers
--only-range-domains
When no MIPdomains: all domains contiguous, holes replaced by inequalities
--allow-multiple-assignments
Allow multiple assignments to the same variable (e.g. in dzn)
--no-half-reifications
Only use fully reified constraints, even when a half reified constraint is defined.
--compile-solution-checker <file>.mzc.mzn
Compile solution checker model
Flattener two-pass options:
--two-pass
Flatten twice to make better flattening decisions for the target
--use-gecode
Perform root-node-propagation with Gecode (adds --two-pass)
--shave
Probe bounds of all variables at the root node (adds --use-gecode)
--sac
Probe values of all variables at the root node (adds --use-gecode)
--pre-passes <n>
Number of times to apply shave/sac pass (0 = fixed-point, 1 = default)
-O<n>
Two-pass optimisation levels:
-O0: Disable optimize (--no-optimize) -O1: Single pass (default)
-O2: Same as: --two-pass -O3: Same as: --use-gecode
-O4: Same as: --shave -O5: Same as: --sac
-g
Debug mode: Forces -O0 and records all domain changes as constraints instead of applying them
Flattener output options:
--no-output-ozn, -O-
Do not output ozn file
--output-base <name>
Base name for output files
--fzn <file>, --output-fzn-to-file <file>
Filename for generated FlatZinc output
--ozn, --output-ozn-to-file <file>
Filename for model output specification (--ozn- for none)
--keep-paths
Don't remove path annotations from FlatZinc
--output-paths
Output a symbol table (.paths file)
--output-paths-to-file <file>
Output a symbol table (.paths file) to <file>
--output-detailed-timing
Output detailed profiling information of compilation time
--output-to-stdout, --output-fzn-to-stdout
Print generated FlatZinc to standard output
--output-ozn-to-stdout
Print model output specification to standard output
--output-paths-to-stdout
Output symbol table to standard output
--output-mode <item|dzn|json|checker>
Create output according to output item (default), or output compatible
with dzn or json format, or for solution checking
--output-objective
Print value of objective function in dzn or json output
--output-output-item
Print the output item as a string in the dzn or json output
--only-sections <section_1,...section_n>
Enable only the given comma-separated output sections.
--not-sections <section_1,...section_n>
Disable the given comma-separated output sections.
-Werror
Turn warnings into errors
Solution output options:
--ozn-file <file>
Read output specification from ozn file.
-o <file>, --output-to-file <file>
Filename for generated output.
-i <n>, --ignore-lines <n>, --ignore-leading-lines <n>
Ignore the first <n> lines in the FlatZinc solution stream.
--soln-sep <s>, --soln-separator <s>, --solution-separator <s>
Specify the string printed after each solution (as a separate line).
The default is to use the same as FlatZinc, "----------".
--soln-comma <s>, --solution-comma <s>
Specify the string used to separate solutions.
The default is the empty string.
--unsat-msg (--unsatisfiable-msg), --unbounded-msg, --unsatorunbnd-msg,
--unknown-msg, --error-msg, --search-complete-msg <msg>
Specify solution status messages. The defaults:
"=====UNSATISFIABLE=====", "=====UNSATorUNBOUNDED=====", "=====UNBOUNDED=====",
"=====UNKNOWN=====", "=====ERROR=====", "==========", respectively.
--non-unique
Allow duplicate solutions.
-c, --canonicalize
Canonicalize the output solution stream (i.e., buffer and sort).
--output-non-canonical <file>
Non-buffered solution output file in case of canonicalization.
--output-raw <file>
File to dump the solver's raw output (not for hard-linked solvers)
--no-output-comments
Do not print comments in the FlatZinc solution stream.
--output-time
Print timing information in the FlatZinc solution stream.
--no-flush-output
Don't flush output stream after every line.
Available solvers (get help using --help <solver id>):
Chuffed 0.11.0 (org.chuffed.chuffed, cp, lcg, int)
COIN-BC <unknown version> (org.minizinc.mip.coin-bc, mip, float, api, osicbc, coinbc, cbc)
CPLEX <unknown version> (org.minizinc.mip.cplex, mip, float, api)
findMUS 0.7.0 (org.minizinc.findmus)
Gecode 6.3.0 (org.gecode.gecode, default solver, cp, int, float, set, restart)
Gecode Gist 6.3.0 (org.gecode.gist, cp, int, float, set, restart)
Globalizer 0.1.7.2 (org.minizinc.globalizer, experimental, tool)
Gurobi <unknown version> (org.minizinc.mip.gurobi, mip, float, api)
HiGHS <unknown version> (org.minizinc.mip.highs, mip, float, api, highs)
OR Tools 9.4.1874 (com.google.or-tools, ortools, cp, lcg, float, int)
SCIP <unknown version> (org.minizinc.mip.scip, mip, float, api)
SICStus 4.8.0 (org.sicstus.sicstus, cp, int)
Xpress <unknown version> (org.minizinc.mip.xpress, mip, float, api)
perm@Mackaper 07_suitor_schedule %
Options specific to solvers are listed under minizinc --help <solver>. So, for example, minizinc --help gecode. This would include things like --all-solutions, and other flags that are dependent on which standard solver flags the solver support.
Although this additional help option is mentioned together with the available solver list, maybe this needs to be make more explicit
I did not notice the --help <solver id> that is shown (and I did not look for it since --help was already listed as not taking an argument).
Since there is a default solver used if I do not specify a --solver, then perhaps it would make sense to include the help for the default solver in the argument-less --help. Some users may not even know whether an option is solver specific or not, e.g. in a teaching setting where only the default solver is used.
Related: It is hard to see (unless you know exactly where to look) which solver is the default. (I initially thought it was not there, but it is among the attributes of the default solver, in the list of available solvers).