Makes the given string contents available to MiniZinc using the given filename.
The file name to use
The contents of the file
Optionaluse: boolean
Whether to add this file as an argument to the MiniZinc command
Adds data to the model in JSON format.
Note that each snippet is used as a complete JSON data file.
The data as an object in MiniZinc JSON data input format
The filename of the snippet (may be useful to identify sources of errors)
Add a snippet of code to the model.
Note that each snippet is used as a complete model file.
MiniZinc code as a string
The filename of the snippet (may be useful to identify sources of errors)
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