Makes the given string contents available to MiniZinc using the given filename.
The file name to use
The contents of the file
Optional
use: booleanWhether to add this file as an argument to the MiniZinc command
Adds the given file to the model.
The file name to use
Check for errors in the model using --model-check-only
.
Configuration options
Optional
options?: ParamConfigOptions to pass to MiniZinc in parameter configuration file format
The errors in the model
Compile this model to FlatZinc.
Configuration options
Optional
options?: ParamConfigOptions to pass to MiniZinc in parameter configuration file format
Get the model interface using --model-interface-only
.
Configuration options
Optional
options?: ParamConfigOptions to pass to MiniZinc in parameter configuration file format
The model interface
Solve this model and retrieve the result.
Configuration options
Optional
jsonWhether 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
,.json
and.mpc
files 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