Makes the given string contents available to MiniZinc using the given filename.
The file name to use
The contents of the file
Optionaluse: booleanWhether to add this file as an argument to the MiniZinc command
Check for errors in the model using --model-check-only.
Configuration options
Optionaloptions?: ParamConfigOptions to pass to MiniZinc in parameter configuration file format
The errors in the model
Create a clone of this model.
Compile this model to FlatZinc.
Configuration options
Optionaloptions?: ParamConfigOptions to pass to MiniZinc in parameter configuration file format
Get the model interface using --model-interface-only.
Configuration options
Optionaloptions?: ParamConfigOptions to pass to MiniZinc in parameter configuration file format
The model interface
Solve this model and retrieve the result.
Configuration options
OptionaljsonOutput?: booleanWhether to use --output-mode json (true by default)
Options to pass to MiniZinc in parameter configuration file format
Main class for solving MiniZinc instances.
This API allows you to add
.mzn,.dzn,.jsonand.mpcfiles using theaddFile()method, and then run MiniZinc on the files using thesolve()method.Code can also be added programmatically using the
addString()(and similar) methods.Example