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

mzn_run(+ModelFile, +InstFileOrParMap, ++SolverOrOptions)

Run a MiniZinc model from a given model and instance file
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

Description

Reads a MiniZinc model (given a model file and an instance file) and interprets it using the solver mapping defined in SolverOrOptions. At the end of solving, results are printed to the output stream, timing and progress messages are printed to the log_output stream, warnings to the warning_output stream, and error messages the error stream. This predicate always succeeds.

Modes and Determinism

Examples

    ?- mzn_run("mymodel.mzn", "myinstance.mzn", fzn_ic).
    Found a solution with cost 10
    Found no solution with cost 7.0 .. 9.0
    end = 10
    b1 = 1
    b2 = 0
    b3 = 1
    b4 = 0
    Objective value = 10
    Total time 0.031s cpu (0.016 setup + 0.000 search)

    ?- mzn_run("queens.mzn", [n=8], fzn_ic).
    Starting search
    q = [1,5,8,6,3,7,2,4]
    Total time 0.015s cpu (0.000 setup + 0.000 search)

See Also

mzn_run / 2, mzn_run_string / 2, flatzinc : struct(zn_options)