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

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

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


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).

Modes and Determinism


    ?- 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)