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

mzn2fzn(+ModelFile, +InstFileOrParMap, ++SolverOrOptions, ?FznFile)

Convert a MiniZinc model into a FlatZinc model
ModelFile
File name (extension defaults to .mzn)
InstFileOrParMap
Instance file name (extension defaults to .dzn), or list of Id=Term correspondences
SolverOrOptions
Name of solver mapping module, or zn_options-structure
FznFile
Name of generated FlatZinc file (will be generated if variable)

Description

Converts a MiniZinc model (given a model file and an instance file or parameter map) into a FlatZinc model, by invoking the external mzn2fzn converter with the appropriate arguments. If no output file name is specified (FznFile uninstantiated), the name of the output file is the same as the input file, with the extension changed to .fzn. The options should specify the solver that is intended to be used on the FlatZinc model (so that the correct version of globals.mzn is used), and the fzn_tmp option should be set to 'file' (the default).

A file with output instructions is also generated. It has the same base name as FznFile (if given) or ModelFile, with the extension changed to .ozn.

Modes and Determinism

Examples

    ?- mzn2fzn(mymodel, [], zn_options{solver:fzn_ic,fzn_tmp:file}, FznFile).
    FznFile = "mymodel.fzn"
    Yes (0.00s cpu)

See Also

mzn_run / 3, flatzinc : fzn_run / 2, flatzinc : struct(zn_options)