Next: , Previous: , Up: lib-zinc   [Contents][Index]


10.55.4 Options

Following is a list of options that can be passed to MiniZinc and FlatZinc predicates. Not all options are universally useful.

search(Method)   since release 4.3

where Method must be one of the atoms bab and restart. Tells the solver which optimization algorithm to use: branch-and-bound (the default), or to restart the search each time a new solution is found. The corresponding spfz option is -search Method.

free_search(Boolean)   since release 4.7.0

where Boolean must be true or false (default). If true, tells the solver to ignore any search annotation. The corresponding spfz option is -f.

solutions(NumberOfSolutions)

where NumberOfSolutions must be an integer greater than zero or the atom all. Describes the number of solutions to search for; the default is 1. The corresponding spfz options are -n N and -a.

output(File)

where File must be the name of a writable file. Causes any output written on the current output stream to be directed to File. The corresponding spfz option is -o File.

ozn_file(File)   since release 4.2.3

where File must be the name of an existing file, containing the MiniZinc output commands that minizinc should use. If not given, then the solutions will be printed unformatted.

statistics(Boolean)

where Boolean must be true or false (default). The corresponding spfz option is -s. If true, a block of statistics is written on the current output stream at the end of execution. Each line of the block has the format:

%%%mzn-stat: name=value

The block is terminated by a line:

%%%mzn-stat-end

The name and its meaning is one of the keywords explained in Statistics Predicates, or one of:

initTime

Initialization time (in seconds).

solveTime

Solving time (in seconds).

timeout(Time)

where Time should be an integer greater than zero. Stops the computation if it has not finished before Time milliseconds has elapsed. In any event, the best solution found so far is reported. The corresponding spfz option is -t Time.

precision(P)   since release 4.10.0

where P should be a float greater than zero. This option is used in the search of any real variables not mentioned in a float_search annotation (see Enumeration Predicates).

variables(ListOfVarDef)

where ListOfVarDef is a list of elements of the form Id=Var where Id is a FlatZinc identifier and Var is a Prolog variable. Means that Var is unified with the value of Id after the FlatZinc program is loaded and that Id=Var is included in a list of arguments to query/1 that is written to File. Default is ListOfVarDef=[vars=Vars], with the meaning that Vars is a list containing all variables of the FlatZinc state, in the order they were introduced.

data_file(MznDatFile)

where MznDatFile must be a MiniZinc data file. Means that MznDatFile is passed to minizinc -c.

parameters(ListOfParDef)

where ListOfParDef is a list of elements of the form Id=Value where Id is a MiniZinc identifier and Value is a MiniZinc value. Means that all elements are written to a temporary file, which is passed to minizinc -c.

post(Boolean)

where Boolean must be true or false. If true (the default), then the constraints of the MiniZinc program are posted directly and a separate call to fzn_post/1 (see FlatZinc Exported Predicates) is not necessary.

fzn_file(File)   since release 4.2.3

where File must be the name of a writable file. The translated FlatZinc program will be written to the given file. Otherwise, a temporary file will be used and erased afterwards.

optimise(Boolean)   since release 4.2.3
optimize(Boolean)   since release 4.2.3

where Boolean must be true (the default) or false. If false, then --no-optimize is passed to minizinc -c.

option(Value)   since release 4.5

Causes an extra option Value to be passed to the MiniZinc driver.



Send feedback on this subject.