Installation
Quickest start (only requires MiniBrass and MiniZinc)
- Download and install the newest MiniZinc IDE version from http://www.minizinc.org/
- Download mbr2mzn.zip and unpack it to some directory (called
MBR_DIR
in the following) - Download soft_constraints.zip and unpack it to some directory (called
MBR_SOFT_DIR
) - Locate the directory “./share/minizinc/std” of your MiniZinc installation
- Copy the directory “soft_constraints” (in
MBR_SOFT_DIR
) into “./share/minizinc/std” - Download and extract the code examples
- Compile the preference model by using
java -jar MBR_DIR/mbr2mzn.jar -m smallexample_minizinc.mbr
- Run
minizinc smallexample_minizinc.mzn
: Your output should state
x = 1; y = 2; z = 1
Valuations: overall = 1
----------
==========
Slightly slower start (requires MiniBrass, MiniZinc, and MiniSearch):
- Build MiniSearch according to the instructions at MiniSearch
- Download mbr2mzn.zip and unpack it to some directory (called
MBR_DIR
in the following) - Download soft_constraints.zip and unpack it to some directory (called
MBR_SOFT_DIR
) - Locate the directory “./share/minizinc/std” of your MiniSearch installation
- Copy the directory “soft_constraints” (in
MBR_SOFT_DIR
) into “./share/minizinc/std” - Download and extract the code examples
- Compile the preference model by using
java -jar MBR_DIR/mbr2mzn.jar smallexample_minisearch.mbr
- Run
minisearch smallexample_minisearch.mzn
: Your output should state
Intermediate solution:x = 1; y = 1; z = 1
Valuations: overall = 1..2
----------
Intermediate solution:x = 1; y = 1; z = 3
Valuations: overall = 1..1
----------
Intermediate solution:x = 1; y = 2; z = 1
Valuations: overall = 2..2
----------
==========
Follow-up set-up and available options
To get easier access to MiniBrass, add MBR_DIR
to your path variable (e.g., in .bashrc
on Linux).
export PATH="$PATH:MBR_DIR"
By means of the included mbr2mzn
script (or mbr2mznw.cmd
on Windows), you can compile MiniBrass models as:
mbr2mzn smallexample_minisearch.mbr
To see all available options, run mbr2mzn -h
:
mbr2mzn -h
usage: mbr2mzn [<options>] <minibrass-model>.mbr
Options:
-h,--help print this message
-m,--only-minizinc do not generate MiniSearch predicates but only
MiniZinc code (top level PVS must be int)
-o,--output <arg> output compiled MiniZinc to this file
-s,--generate-heuristics generate heuristics for search (can lead to
long flatzinc compilation)
- Previous
- Next