diff --git a/README.rst b/README.rst deleted file mode 100644 index c017c609..00000000 --- a/README.rst +++ /dev/null @@ -1,41 +0,0 @@ -**Welcome to AutoIG's documentation!** - -.. _`[Github repo]`: https://github.com/stacs-cp/AutoIG - - -AutoIG is a tool that supports generating new instances for benchmarking solvers via the use of constraint modelling and automated algorithm configuration. The tool currently focuses on generating instances for constraint problems written in either MiniZinc_ or Essence__. - -.. __: https://conjure.readthedocs.io/en/latest/essence.html -.. _MiniZinc: https://www.minizinc.org/ - -AutoIG receives as input a description of a constraint problem, an instance generator (written as a constraint model), and the solver(s) (must be accessible via either the MiniZinc_ or the Essence_ toolchains) that we want to benchmark. The tool makes use of the constraint modelling pipepline Essence_ and the automated algorithm configurator irace_ to search in the parameter space of the instance generator and create valid instances with certain desirable properties: graded (for a single solver, solvable within a certain range of time by that solver); or discriminating (for a pair of solvers, easy to solve by one solver and difficult to solve by the other). - -.. _Essence: https://constraintmodelling.org/ -.. _irace: https://iridia.ulb.ac.be/irace/ - -.. image:: https://github.com/stacs-cp/AutoIG/blob/main/docs/source/_static/autoig.png - :height: 300px - :alt: AutoIG - :align: center - - -For more information about AutoIG and a case study demonstrating it usefulness in benchmarking solvers in a competition context, please see our paper here__. - -For details on how to use AutoIG, please see the documentation_, which also includes `two quick-start examples`_. - -.. __: https://arxiv.org/abs/2205.14753 -.. _documentation: https://autoig.readthedocs.io/en/latest/ -.. _`two quick-start examples`: https://autoig.readthedocs.io/en/latest/quick-examples.html - -Citation ------------------------------------- -If you use AutoIG, please cite us: - -.. code-block:: rst - - @inproceedings{dang2022framework, - title={A Framework for Generating Informative Benchmark Instances}, - author={Dang, Nguyen and Akg{\"u}n, {\"O}zg{\"u}r and Espasa, Joan and Miguel, Ian and Nightingale, Peter}, - booktitle={International Conference on Principles and Practice of Constraint Programming}, - year={2022} - } \ No newline at end of file diff --git a/bin/R-packages.R b/bin/R-packages.R deleted file mode 100644 index 5759fa46..00000000 --- a/bin/R-packages.R +++ /dev/null @@ -1,8 +0,0 @@ -paths <- list(R6="R6_2.5.1.tar.gz", data.table="data.table_1.14.2.tar.gz") -binDir <- "" -for (p in c("R6","data.table")){ - if (!require(p,character.only = TRUE)){ - install.packages(paste(binDir,paths[[p]],sep='/'), lib=binDir) - library(p,character.only = TRUE, lib.loc=binDir) - } -} diff --git a/bin/R6_2.5.1.tar.gz b/bin/R6_2.5.1.tar.gz deleted file mode 100644 index 78082479..00000000 Binary files a/bin/R6_2.5.1.tar.gz and /dev/null differ diff --git a/bin/data.table_1.14.2.tar.gz b/bin/data.table_1.14.2.tar.gz deleted file mode 100644 index 590bbd27..00000000 Binary files a/bin/data.table_1.14.2.tar.gz and /dev/null differ diff --git a/bin/install-all.sh b/bin/install-all.sh deleted file mode 100755 index 0e41772f..00000000 --- a/bin/install-all.sh +++ /dev/null @@ -1,10 +0,0 @@ -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -pushd $BIN_DIR - -for s in conjure savilerow mininzinc irace runsolver ortools yuck picat -do - bash install-${s}.sh -done - -popd diff --git a/bin/install-conjure.sh b/bin/install-conjure.sh deleted file mode 100755 index b1443db0..00000000 --- a/bin/install-conjure.sh +++ /dev/null @@ -1,34 +0,0 @@ -name="conjure" -url="https://github.com/conjure-cp/conjure" -#version="6977bc0" # essence-features branch, 2021-11-22 -#version="d806b9f" # master branch, 2022-01-07 - -echo "" -echo "============= INSTALLING $name ===================" -#echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -pushd $BIN_DIR - -mkdir -p $name - -SOURCE_DIR="$name-source" -mkdir -p $SOURCE_DIR - -pushd $SOURCE_DIR -git clone $url -pushd conjure -#git checkout $version -export PATH=$BIN_DIR/$name/:$PATH -BIN_DIR=$BIN_DIR/$name make install -popd -popd - -rm -rf $SOURCE_DIR - -# remove conjure's savilerow (savilerow should be installed later using install-savilerow.sh) -rm -rf $name/savilerow-* -rm -rf $name/lib - -popd diff --git a/bin/install-irace.sh b/bin/install-irace.sh deleted file mode 100755 index 78d8e2e7..00000000 --- a/bin/install-irace.sh +++ /dev/null @@ -1,52 +0,0 @@ -name="irace" -version="3.4.1" - -echo "" -echo "============= INSTALLING $name ===================" -echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -# check if R is installed -if ! [ -x "$(command -v R)" ]; then - echo "ERROR: R must be installed first. See https://www.r-project.org/ for how to install R." - exit 1 -fi - -url="https://cran.r-project.org/src/contrib/irace_3.4.1.tar.gz" - -pushd $BIN_DIR - -mkdir -p $name - -SOURCE_DIR="$name-source" -mkdir -p $SOURCE_DIR - -pushd $SOURCE_DIR -#wget $url -#tar zxf $(ls *.gz) -cp $BIN_DIR/irace-source.zip ./ -unzip irace-source.zip -#wget https://cran.r-project.org/src/contrib/R6_2.5.1.tar.gz -#tar zxf R6_2.5.1.tar.gz -#wget https://cran.r-project.org/src/contrib/data.table_1.14.2.tar.gz -#tar zxf data.table_1.14.2.tar.gz -#R CMD INSTALL -l $BIN_DIR/ R6 -cp $BIN_DIR/R-packages.R ./ -OS=$(uname) -if [ "$OS" == "Darwin" ]; then - sed -i "" "s##$BIN_DIR#g" R-packages.R -elif [ "$OS" == "Linux" ]; then - sed -i "s##$BIN_DIR#g" R-packages.R -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi -Rscript R-packages.R -export R_LIBS=$BIN_DIR/:$R_LIBS -R CMD INSTALL -l $BIN_DIR/ irace -popd - -rm -rf $SOURCE_DIR - -popd diff --git a/bin/install-mininzinc.sh b/bin/install-mininzinc.sh deleted file mode 100755 index 1608d795..00000000 --- a/bin/install-mininzinc.sh +++ /dev/null @@ -1,45 +0,0 @@ -name="minizinc" -version="2.8.5" - - -echo "" -echo "============= INSTALLING $name ===================" -echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -pushd $BIN_DIR - -OS=$(uname) -if [ "$OS" == "Darwin" ]; then - #url="https://github.com/MiniZinc/MiniZincIDE/releases/download/${version}/MiniZincIDE-${version}-bundled.dmg" - echo "Using local files (minizinc-2.5.5-part-mac.tgz) for minizinc installation" -elif [ "$OS" == "Linux" ]; then - url="https://github.com/MiniZinc/MiniZincIDE/releases/download/${version}/MiniZincIDE-${version}-bundle-linux-x86_64.tgz" -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi - -mkdir -p $name - -SOURCE_DIR="$name-source" -mkdir -p $SOURCE_DIR - -pushd $SOURCE_DIR -if [ "$OS" == "Linux" ]; then - wget $url - tar zxf $(ls *.tgz) - d=$(ls -d */) - mv ${d}/* $BIN_DIR/$name -else - cp $BIN_DIR/minizinc-2.5.5-part-mac.tgz ./ - tar zxf minizinc-2.5.5-part-mac.tgz - mv Resources/minizinc Resources/bin/ - cp -r Resources/* $BIN_DIR/minizinc -fi -popd - -rm -rf $SOURCE_DIR - -popd diff --git a/bin/install-ortools.sh b/bin/install-ortools.sh deleted file mode 100755 index e77c88bc..00000000 --- a/bin/install-ortools.sh +++ /dev/null @@ -1,65 +0,0 @@ -name="ortools" -version="9.2" - -echo "" -echo "============= INSTALLING $name ===================" -echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -# minizinc must be installed before ortools -if [ ! -d "$BIN_DIR/minizinc/share/minizinc" ]; then - echo "ERROR: minizinc must be installed in $BIN_DIR first. You can use the install-minizinc.sh script for the installation." - exit 1 -fi - -pushd $BIN_DIR - -OS=$(uname) -if [ "$OS" == "Darwin" ]; then - url="https://github.com/google/or-tools/releases/download/v9.2/or-tools_flatzinc_MacOsX-12.0.1_v9.2.9972.tar.gz" -elif [ "$OS" == "Linux" ]; then - url="https://github.com/google/or-tools/releases/download/v9.2/or-tools_amd64_flatzinc_ubuntu-18.04_v9.2.9972.tar.gz" -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi - -rm -rf $name -mkdir -p $name - -SOURCE_DIR="$name-source" -mkdir -p $SOURCE_DIR - -pushd $SOURCE_DIR -wget $url -tar zxf $(ls *.gz) -d=$(ls -d */) -mv ${d}/* $BIN_DIR/$name -popd - -rm -rf $SOURCE_DIR - -mv $BIN_DIR/$name/bin/fzn-or-tools $BIN_DIR/$name/bin/fzn-ortools - -cp -r $BIN_DIR/$name/share/minizinc $BIN_DIR/minizinc/share/minizinc/$name -CONFIG_FILE="$BIN_DIR/minizinc/share/minizinc/solvers/$name.msc" -cp solver.msc $CONFIG_FILE - -if [ "$OS" == "Darwin" ]; then - sed -i "" "s//$name/g" $CONFIG_FILE - sed -i "" "s//$version/g" $CONFIG_FILE - sed -i "" "s##../../../../$name/bin/fzn-$name#g" $CONFIG_FILE - sed -i "" "s##../$name#g" $CONFIG_FILE -elif [ "$OS" == "Linux" ]; then - sed -i "s//$name/g" $CONFIG_FILE - sed -i "s//$version/g" $CONFIG_FILE - sed -i "s##../../../../$name/bin/fzn-$name#g" $CONFIG_FILE - sed -i "s##../$name#g" $CONFIG_FILE - -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi - -popd diff --git a/bin/install-picat.sh b/bin/install-picat.sh deleted file mode 100755 index e1e13dd5..00000000 --- a/bin/install-picat.sh +++ /dev/null @@ -1,68 +0,0 @@ -name="picat" -version="9.2" - -echo "" -echo "============= INSTALLING $name ===================" -echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -# minizinc must be installed before picat -if [ ! -d "$BIN_DIR/minizinc/share/minizinc" ]; then - echo "ERROR: minizinc must be installed in $BIN_DIR first. You can use the install-minizinc.sh script for the installation." - exit 1 -fi - -pushd $BIN_DIR - -OS=$(uname) -if [ "$OS" == "Darwin" ]; then - url="http://picat-lang.org/download/picat316_macx.tar.gz" -elif [ "$OS" == "Linux" ]; then - url="http://picat-lang.org/download/picat316_linux64.tar.gz" -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi - -mkdir -p $name - -SOURCE_DIR="$name-source" -mkdir -p $SOURCE_DIR - -pushd $SOURCE_DIR - -# download picat binary and lib -wget $url -tar zxf $(ls picat*.gz) -d="Picat" -cp -r $d/lib $d/picat $BIN_DIR/$name/ # TODO: check the macos version - -# download picat flatzinc intepreter -wget https://github.com/nfzhou/fzn_picat/archive/refs/heads/main.zip; unzip main.zip -#wget https://github.com/hakank/fzn_picat/archive/6a12883ace8ab7b4cf94419af5a40139c105a005.zip; unzip 6a12883ace8ab7b4cf94419af5a40139c105a005.zip; mv fzn_picat-6a12883ace8ab7b4cf94419af5a40139c105a005 fzn_picat-main/ -cp -r fzn_picat-main/mznlib $BIN_DIR/minizinc/share/minizinc/$name -cp fzn_picat-main/*.pi $BIN_DIR/$name/ -popd - -rm -rf $SOURCE_DIR - -CONFIG_FILE="$BIN_DIR/minizinc/share/minizinc/solvers/$name.msc" -cp picat.msc $CONFIG_FILE - -if [ "$OS" == "Darwin" ]; then - #sed -i "" "s//$name/g" $CONFIG_FILE - echo "TODO" - exit 1 -elif [ "$OS" == "Linux" ]; then - sed -i "s//$name/g" $CONFIG_FILE - sed -i "s//$version/g" $CONFIG_FILE - #sed -i "s##$BIN_DIR#g" $CONFIG_FILE - #sed -i "s##$BIN_DIR/minizinc/share/minizinc/$name#g" $CONFIG_FILE - -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi - -popd diff --git a/bin/install-runsolver.sh b/bin/install-runsolver.sh deleted file mode 100755 index 446340fa..00000000 --- a/bin/install-runsolver.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -#set -x # echo commands -# set -E # exit on any non-zero commands -name="runsolver" - -OS=$(uname) -if [ "$OS" != "Linux" ]; then - echo "${name} only supports Linux, sorry :/" - exit 1 -fi - -echo "" -echo "============= INSTALLING $name ===================" -echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -url="https://www.cril.univ-artois.fr/~roussel/runsolver/runsolver-3.4.0.tar.bz2" - -pushd $BIN_DIR -wget $url -tar xvjf *.bz2 - -pushd $name/src -make - -if test -f "${name}"; then - echo "Installation seems to have run successfully." -else - echo "============= Installation has NOT been successful!!! ===================" -fi diff --git a/bin/install-savilerow.sh b/bin/install-savilerow.sh deleted file mode 100755 index 3eb343e2..00000000 --- a/bin/install-savilerow.sh +++ /dev/null @@ -1,50 +0,0 @@ -# NOTES: minion & chuffed & cadical will also be installed (using binaries provided by savilerow) -name="savilerow" -version="1.9.1" # release version on Sep 11, 2021 - - -echo "" -echo "============= INSTALLING $name ===================" -echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -pushd $BIN_DIR - -OS=$(uname) -if [ "$OS" == "Darwin" ]; then - OS_NAME="mac" -elif [ "$OS" == "Linux" ]; then - OS_NAME="linux" -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi - -sr="savilerow-${version}-${OS_NAME}" -#url="https://savilerow.cs.st-andrews.ac.uk/${sr}.tgz" -url="https://www-users.york.ac.uk/peter.nightingale/savilerow/${sr}.tgz" - -mkdir -p $name - -SOURCE_DIR="$name-source" -mkdir -p $SOURCE_DIR - -pushd $SOURCE_DIR -wget $url -tar zxf ${sr}.tgz -pushd ${sr} -bash compile.sh -chmod +x savilerow -cp -r savilerow savilerow.jar lib/ $BIN_DIR/$name -for solver in minion -do - mkdir -p $BIN_DIR/$solver - cp bin/*$solver* $BIN_DIR/$solver -done -popd -popd - -rm -rf $SOURCE_DIR - -popd diff --git a/bin/install-yuck.sh b/bin/install-yuck.sh deleted file mode 100755 index ce88fee9..00000000 --- a/bin/install-yuck.sh +++ /dev/null @@ -1,50 +0,0 @@ -name="yuck" -version="20210501" - -echo "" -echo "============= INSTALLING $name ===================" -echo "$name version: $version" - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -# minizinc must be installed before ortools -if [ ! -d "$BIN_DIR/minizinc/share/minizinc" ]; then - echo "ERROR: minizinc must be installed in $BIN_DIR first. You can use the install-minizinc.sh script for the installation." - exit 1 -fi - -pushd $BIN_DIR - -url="https://github.com/informarte/yuck/releases/download/20210501/yuck-${version}.zip" - -mkdir -p $name - -SOURCE_DIR="$name-source" -mkdir -p $SOURCE_DIR - -pushd $SOURCE_DIR -wget $url --no-check-certificate -d="yuck-${version}" -unzip $d.zip -pushd $d -mv bin/ lib/ doc/ $BIN_DIR/$name -OS=$(uname) -if [ "$OS" == "Darwin" ]; then - sed -i "" "s#../bin/yuck#../../../../$name/bin/yuck#g" mzn/yuck.msc - sed -i "" "s#.*mznlib.*# \"mznlib\": \"../$name\",#g" mzn/yuck.msc -elif [ "$OS" == "Linux" ]; then - sed -i "s#../bin/yuck#../../../../$name/bin/yuck#g" mzn/yuck.msc - sed -i "s#.*mznlib.*# \"mznlib\": \"$BIN_DIR/minizinc/share/minizinc/$name\",#g" mzn/yuck.msc -else - echo "Cannot determine your OS, uname reports: ${OS}" - exit 1 -fi - -cp mzn/yuck.msc $BIN_DIR/minizinc/share/minizinc/solvers/ -mv mzn/lib $BIN_DIR/minizinc/share/minizinc/$name -popd -popd - -rm -rf $SOURCE_DIR - -popd diff --git a/bin/irace-source.zip b/bin/irace-source.zip deleted file mode 100644 index a3fd71e7..00000000 Binary files a/bin/irace-source.zip and /dev/null differ diff --git a/bin/minizinc-2.5.5-part-mac.tgz b/bin/minizinc-2.5.5-part-mac.tgz deleted file mode 100644 index 5bb81673..00000000 Binary files a/bin/minizinc-2.5.5-part-mac.tgz and /dev/null differ diff --git a/bin/picat.msc b/bin/picat.msc deleted file mode 100644 index 91e0ca6f..00000000 --- a/bin/picat.msc +++ /dev/null @@ -1,15 +0,0 @@ -{ "id": "picat", - "name": "picat", - "description": "Picat FlatZinc solver", - "version": "", - "mznlib": "../picat", - "executable": "../../../../run_picat_sat.sh", - "tags": ["sat","int"], - "stdFlags": ["-a","-n","-f"], - "supportsMzn": false, - "supportsFzn": true, - "needsSolns2Out": true, - "needsMznExecutable": false, - "needsStdlibDir": false, - "isGUIApplication": false -} diff --git a/bin/run_picat_sat.sh b/bin/run_picat_sat.sh deleted file mode 100755 index 29ee3180..00000000 --- a/bin/run_picat_sat.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -# see https://groups.google.com/g/minizinc/c/mBmQL6gXKP0 for more details -picat $BIN_DIR/picat/fzn_picat_sat.pi $* diff --git a/bin/runsolver-3.4.0.tar.bz2 b/bin/runsolver-3.4.0.tar.bz2 deleted file mode 100644 index 82eccc63..00000000 Binary files a/bin/runsolver-3.4.0.tar.bz2 and /dev/null differ diff --git a/bin/set-path.sh b/bin/set-path.sh deleted file mode 100755 index 5828ba8e..00000000 --- a/bin/set-path.sh +++ /dev/null @@ -1,44 +0,0 @@ -# get current script's folder -if [ -n "$ZSH_VERSION" ]; then - BIN_DIR="$( cd "$( dirname "${(%):-%x}" )" &> /dev/null && pwd )" -elif [ -n "$BASH_VERSION" ]; then - BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -else - echo "Error: only bash and zsh are supported" - exit 1 -fi - -# AutoIG -export AUTOIG="$(dirname $BIN_DIR)" - -# conjure -export PATH=$BIN_DIR/conjure/:$PATH - -# savilerow -export PATH=$BIN_DIR/savilerow/:$PATH - -# minion -export PATH=$BIN_DIR/minion/:$PATH - -# irace -export PATH=$BIN_DIR/irace/bin:$PATH -export R_LIBS=$BIN_DIR/:$R_LIBS - -# minizinc -export PATH=$BIN_DIR/minizinc/bin/:$PATH -#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BIN_DIR/minizinc/lib -export MZN_SOLVER_PATH=$BIN_DIR/minizinc/share/minizinc/solvers -export MZN_STDLIB_DIR=$BIN_DIR/minizinc/share/minizinc/ - -# ortools -export PATH=$BIN_DIR/ortools/bin/:$PATH -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BIN_DIR/ortools/lib - -# yuck -export PATH=$BIN_DIR/yuck/bin/:$PATH - -# picat -export PATH=$BIN_DIR/picat/:$PATH - -# runsolver -export PATH=$BIN_DIR/runsolver/src/:$PATH diff --git a/bin/solver.msc b/bin/solver.msc deleted file mode 100644 index e1d95e29..00000000 --- a/bin/solver.msc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "", - "name": "", - "version": "", - "description": " FlatZinc executable", - "mznlib": "", - "executable": "", - "stdFlags": ["-a", "-n", "-p", "-f", "-r", "-v", "-l", "-s"], - "supportsMzn": false, - "supportsFzn": true, - "needsSolns2Out": true, - "needsMznExecutable": false, - "needsStdlibDir": false, - "isGUIApplication": false -} diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.01.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.01.dzn deleted file mode 100755 index 0941da56..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.01.dzn +++ /dev/null @@ -1,43 +0,0 @@ -roll_wid = 315; -max_roll_len = 20000; - -n_rm = 8; -rm_rec_ids = [{ 1 }, { 2 }, { 3, 4, 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 }]; -rm_ori = [{ 1, 2 }, { 1 }, { 1, 2, 3, 4 }, { 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }]; -rm_max_len = [181, 170, 343, 127, 56, 65, 213, 72]; -rm_max_wid = [131, 231, 204, 29, 100, 121, 75, 145]; - -n_rm_rec = 10; -rm_rec_len = [181, 170, 74, 197, 72, 127, 56, 65, 213, 72]; -rm_rec_wid = [131, 231, 147, 204, 138, 29, 100, 121, 75, 145]; -rm_rec_os_x = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 269, 57 - | 74, 0, 72, 0 - | 271, 0, 0, 66 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - |]; -rm_rec_os_y = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 57, 0, 0, 269 - | 0, 74, 0, 72 - | 66, 271, 0, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - |]; -n_st = 0; -st_len = []; -st_wid = []; -st_no_steps = []; -st_min_steps = []; -st_max_breaks = []; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.02.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.02.dzn deleted file mode 100644 index 64ee23a7..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.02.dzn +++ /dev/null @@ -1,39 +0,0 @@ -roll_wid = 457; -max_roll_len = 20000; - -n_rm = 8; -rm_rec_ids = [{ 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 6 }, { 7 }, { 8 }]; -rm_ori = [{ 1 }, { 1 }, { 1, 2 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1 }]; -rm_max_len = [77, 601, 190, 63, 68, 187, 67, 120]; -rm_max_wid = [110, 397, 192, 203, 154, 151, 104, 250]; - -n_rm_rec = 8; -rm_rec_len = [77, 601, 190, 63, 68, 187, 67, 120]; -rm_rec_wid = [110, 397, 192, 203, 154, 151, 104, 250]; -rm_rec_os_x = - [| 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - |]; -rm_rec_os_y = - [| 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - |]; -n_st = 0; -st_len = []; -st_wid = []; -st_no_steps = []; -st_min_steps = []; -st_max_breaks = []; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.03.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.03.dzn deleted file mode 100755 index aaa19246..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.03.dzn +++ /dev/null @@ -1,45 +0,0 @@ -roll_wid = 366; -max_roll_len = 20000; - -n_rm = 10; -rm_rec_ids = [{ 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 6, 7 }, { 8 }, { 9 }, { 10 }, { 11 }]; -rm_ori = [{ 1 }, { 1 }, { 1, 2 }, { 1 }, { 1 }, { 1, 3 }, { 1, 2 }, { 1 }, { 1 }, { 1 }]; -rm_max_len = [143, 77, 200, 81, 87, 587, 191, 184, 89, 118]; -rm_max_wid = [315, 126, 214, 118, 120, 249, 151, 145, 124, 10]; - -n_rm_rec = 11; -rm_rec_len = [143, 77, 200, 81, 87, 587, 167, 191, 184, 89, 118]; -rm_rec_wid = [315, 126, 214, 118, 120, 180, 69, 151, 145, 124, 10]; -rm_rec_os_x = - [| 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 0, -1 - | 0, -1, 420, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - |]; -rm_rec_os_y = - [| 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 69, -1, 0, -1 - | 0, -1, 180, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - |]; -n_st = 1; -st_len = [196]; -st_wid = [89]; -st_no_steps = [4]; -st_min_steps = [2]; -st_max_breaks = [3]; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.06.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.06.dzn deleted file mode 100644 index ed66e375..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.06.dzn +++ /dev/null @@ -1,75 +0,0 @@ -roll_wid = 457; -max_roll_len = 20000; - -n_rm = 13; -rm_rec_ids = [{ 1, 2, 3, 4 }, { 5 }, { 6 }, { 7, 8 }, { 9 }, { 10, 11 }, { 12 }, { 13 }, { 14, 15, 16, 17 }, { 18 }, { 19, 20, 21 }, { 22, 23, 24 }, { 25, 26 }]; -rm_ori = [{ 1, 3 }, { 1 }, { 1 }, { 1, 3 }, { 1 }, { 1, 3 }, { 1 }, { 1 }, { 1, 2, 3, 4 }, { 1 }, { 1, 3 }, { 1, 3 }, { 1, 3 }]; -rm_max_len = [505, 87, 73, 604, 86, 543, 573, 78, 370, 63, 675, 322, 307]; -rm_max_wid = [307, 120, 159, 243, 132, 283, 143, 106, 386, 129, 201, 379, 399]; - -n_rm_rec = 26; -rm_rec_len = [115, 246, 505, 130, 87, 73, 389, 604, 86, 192, 543, 573, 78, 342, 268, 198, 300, 63, 150, 302, 223, 322, 104, 260, 193, 114]; -rm_rec_wid = [77, 16, 124, 90, 120, 159, 91, 152, 132, 81, 202, 143, 106, 93, 139, 23, 131, 129, 168, 109, 201, 115, 147, 117, 399, 373]; -rm_rec_os_x = - [| 0, -1, 390, -1 - | 0, -1, 259, -1 - | 0, -1, 0, -1 - | 375, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 215, -1, 0, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, 351, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 28, 293 - | 0, 93, 102, 154 - | 70, 232, 102, 131 - | 70, 255, 0, 0 - | 0, -1, -1, -1 - | 0, -1, 525, -1 - | 150, -1, 223, -1 - | 452, -1, 0, -1 - | 0, -1, 0, -1 - | 0, -1, 218, -1 - | 0, -1, 62, -1 - | 0, -1, 114, -1 - | 193, -1, 0, -1 - |]; -rm_rec_os_y = - [| 230, -1, 0, -1 - | 214, -1, 77, -1 - | 90, -1, 93, -1 - | 0, -1, 217, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 152, -1, 0, -1 - | 0, -1, 91, -1 - | 0, -1, -1, -1 - | 202, -1, 0, -1 - | 0, -1, 81, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 293, 0, 0, 28 - | 154, 0, 93, 102 - | 131, 70, 232, 102 - | 0, 70, 255, 0 - | 0, -1, -1, -1 - | 33, -1, 0, -1 - | 92, -1, 0, -1 - | 0, -1, 0, -1 - | 264, -1, 0, -1 - | 117, -1, 115, -1 - | 0, -1, 262, -1 - | 0, -1, 0, -1 - | 26, -1, 0, -1 - |]; -n_st = 1; -st_len = [230]; -st_wid = [91]; -st_no_steps = [5]; -st_min_steps = [2]; -st_max_breaks = [3]; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.09.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.09.dzn deleted file mode 100755 index 944dc810..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.09.dzn +++ /dev/null @@ -1,73 +0,0 @@ -roll_wid = 458; -max_roll_len = 20000; - -n_rm = 19; -rm_rec_ids = [{ 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 6 }, { 7, 8, 9 }, { 10 }, { 11 }, { 12 }, { 13, 14 }, { 15 }, { 16 }, { 17, 18 }, { 19, 20 }, { 21 }, { 22 }, { 23 }, { 24, 25 }]; -rm_ori = [{ 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1 }, { 1, 3 }, { 1 }, { 1 }, { 1 }, { 1, 3 }, { 1 }, { 1 }, { 1, 3 }, { 1, 2, 3, 4 }, { 1 }, { 1 }, { 1, 2 }, { 1, 3 }]; -rm_max_len = [60, 424, 52, 351, 79, 56, 539, 88, 77, 551, 543, 80, 76, 550, 268, 323, 307, 437, 228]; -rm_max_wid = [215, 15, 119, 355, 102, 123, 281, 128, 126, 32, 283, 104, 111, 271, 289, 358, 341, 77, 401]; - -n_rm_rec = 25; -rm_rec_len = [60, 424, 52, 351, 79, 56, 194, 396, 539, 88, 77, 551, 192, 543, 80, 76, 550, 153, 145, 123, 323, 307, 437, 26, 202]; -rm_rec_wid = [215, 15, 119, 355, 102, 123, 79, 33, 169, 128, 126, 32, 81, 202, 104, 111, 125, 146, 289, 197, 358, 341, 77, 105, 401]; -rm_rec_os_x = - [| 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 345, -1 - | 0, -1, 143, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 351, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 0, -1 - | 397, -1, 0, -1 - | 0, 0, 123, 0 - | 145, 0, 0, 92 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, 202, -1 - | 26, -1, 0, -1 - |]; -rm_rec_os_y = - [| 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 202, -1, 0, -1 - | 169, -1, 79, -1 - | 0, -1, 112, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 202, -1, 0, -1 - | 0, -1, 81, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 146, -1, 0, -1 - | 0, -1, 125, -1 - | 0, 0, 0, 123 - | 92, 145, 0, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 296, -1, 0, -1 - | 0, -1, 0, -1 - |]; -n_st = 2; -st_len = [530, 315]; -st_wid = [83, 89]; -st_no_steps = [10, 7]; -st_min_steps = [2, 2]; -st_max_breaks = [6, 4]; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.11.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.11.dzn deleted file mode 100644 index 6c78ff1c..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.11.dzn +++ /dev/null @@ -1,41 +0,0 @@ -roll_wid = 315; -max_roll_len = 20000; - -n_rm = 7; -rm_rec_ids = [{ 1 }, { 2, 3 }, { 4 }, { 5 }, { 6 }, { 7 }, { 8, 9 }]; -rm_ori = [{ 1, 2 }, { 1, 2, 3, 4 }, { 1 }, { 1 }, { 1 }, { 1 }, { 1, 2, 3, 4 }]; -rm_max_len = [187, 311, 81, 561, 87, 108, 313]; -rm_max_wid = [153, 207, 123, 135, 114, 106, 390]; - -n_rm_rec = 9; -rm_rec_len = [187, 138, 311, 81, 561, 87, 108, 116, 197]; -rm_rec_wid = [153, 83, 124, 123, 135, 114, 106, 390, 144]; -rm_rec_os_x = - [| 0, 0, -1, -1 - | 0, 0, 173, 124 - | 0, 83, 0, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 197, 0 - | 116, 97, 0, 149 - |]; -rm_rec_os_y = - [| 0, 0, -1, -1 - | 124, 0, 0, 173 - | 0, 0, 83, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 0, 197 - | 149, 116, 97, 0 - |]; -n_st = 0; -st_len = []; -st_wid = []; -st_no_steps = []; -st_min_steps = []; -st_max_breaks = []; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.12.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.12.dzn deleted file mode 100755 index 7a5eb448..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.12.dzn +++ /dev/null @@ -1,45 +0,0 @@ -roll_wid = 315; -max_roll_len = 20000; - -n_rm = 9; -rm_rec_ids = [{ 1 }, { 2 }, { 3, 4, 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 }, { 11 }]; -rm_ori = [{ 1, 2 }, { 1 }, { 1, 2, 3, 4 }, { 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1, 2 }]; -rm_max_len = [181, 170, 343, 127, 56, 65, 213, 72, 112]; -rm_max_wid = [131, 231, 204, 29, 100, 121, 75, 145, 75]; - -n_rm_rec = 11; -rm_rec_len = [181, 170, 74, 197, 72, 127, 56, 65, 213, 72, 112]; -rm_rec_wid = [131, 231, 147, 204, 138, 29, 100, 121, 75, 145, 75]; -rm_rec_os_x = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 269, 57 - | 74, 0, 72, 0 - | 271, 0, 0, 66 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - |]; -rm_rec_os_y = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 57, 0, 0, 269 - | 0, 74, 0, 72 - | 66, 271, 0, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - |]; -n_st = 0; -st_len = []; -st_wid = []; -st_no_steps = []; -st_min_steps = []; -st_max_breaks = []; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.13.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.13.dzn deleted file mode 100644 index 7f94cda5..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.13.dzn +++ /dev/null @@ -1,47 +0,0 @@ -roll_wid = 400; -max_roll_len = 20000; - -n_rm = 10; -rm_rec_ids = [{ 1, 2 }, { 3 }, { 4 }, { 5 }, { 6 }, { 7 }, { 8 }, { 9, 10 }, { 11 }, { 12 }]; -rm_ori = [{ 1, 2, 3, 4 }, { 1, 2 }, { 1, 2 }, { 1 }, { 1, 2 }, { 1, 2 }, { 1 }, { 1, 2, 3, 4 }, { 1 }, { 1 }]; -rm_max_len = [210, 195, 106, 64, 187, 187, 89, 158, 87, 77]; -rm_max_wid = [254, 150, 103, 126, 153, 151, 128, 275, 120, 115]; - -n_rm_rec = 12; -rm_rec_len = [122, 88, 195, 106, 64, 187, 187, 89, 88, 70, 87, 77]; -rm_rec_wid = [177, 254, 150, 103, 126, 153, 151, 128, 275, 107, 120, 115]; -rm_rec_os_x = - [| 0, 0, 88, 77 - | 122, 0, 0, 0 - | 0, 0, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 70, 0 - | 88, 0, 0, 168 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - |]; -rm_rec_os_y = - [| 77, 0, 0, 88 - | 0, 122, 0, 0 - | 0, 0, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 0, 70 - | 168, 88, 0, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - |]; -n_st = 2; -st_len = [240, 230]; -st_wid = [94, 88]; -st_no_steps = [5, 5]; -st_min_steps = [2, 2]; -st_max_breaks = [3, 3]; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.19.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.19.dzn deleted file mode 100755 index 3d550332..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.19.dzn +++ /dev/null @@ -1,75 +0,0 @@ -roll_wid = 315; -max_roll_len = 20000; - -n_rm = 20; -rm_rec_ids = [{ 1 }, { 2 }, { 3, 4, 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 }, { 11 }, { 12, 13 }, { 14 }, { 15 }, { 16 }, { 17 }, { 18 }, { 19 }, { 20 }, { 21, 22, 23, 24 }, { 25 }, { 26 }]; -rm_ori = [{ 1, 2 }, { 1 }, { 1, 2, 3, 4 }, { 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1, 2 }, { 1, 3 }, { 1 }, { 1 }, { 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1, 3 }, { 1 }, { 1, 2 }]; -rm_max_len = [181, 170, 343, 127, 56, 65, 213, 72, 112, 510, 196, 76, 113, 63, 64, 198, 603, 649, 199, 166]; -rm_max_wid = [131, 231, 204, 29, 100, 121, 75, 145, 75, 272, 26, 108, 105, 203, 100, 150, 142, 242, 102, 142]; - -n_rm_rec = 26; -rm_rec_len = [181, 170, 74, 197, 72, 127, 56, 65, 213, 72, 112, 268, 510, 196, 76, 113, 63, 64, 198, 603, 73, 99, 190, 287, 199, 166]; -rm_rec_wid = [131, 231, 147, 204, 138, 29, 100, 121, 75, 145, 75, 130, 142, 26, 108, 105, 203, 100, 150, 142, 179, 228, 181, 242, 102, 142]; -rm_rec_os_x = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 269, 57 - | 74, 0, 72, 0 - | 271, 0, 0, 66 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 242, -1, 0, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 576, -1 - | 73, -1, 477, -1 - | 172, -1, 287, -1 - | 362, -1, 0, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - |]; -rm_rec_os_y = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 57, 0, 0, 269 - | 0, 74, 0, 72 - | 66, 271, 0, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 142, -1, 0, -1 - | 0, -1, 130, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 63, -1 - | 0, -1, 14, -1 - | 0, -1, 61, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - |]; -n_st = 1; -st_len = [153]; -st_wid = [91]; -st_no_steps = [3]; -st_min_steps = [1]; -st_max_breaks = [4]; - diff --git a/data/instances/competition/carpet-cutting/mzn_rnd_test.20.dzn b/data/instances/competition/carpet-cutting/mzn_rnd_test.20.dzn deleted file mode 100644 index ab3e0d9c..00000000 --- a/data/instances/competition/carpet-cutting/mzn_rnd_test.20.dzn +++ /dev/null @@ -1,101 +0,0 @@ -roll_wid = 315; -max_roll_len = 20000; - -n_rm = 30; -rm_rec_ids = [{ 1 }, { 2 }, { 3, 4, 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 }, { 11 }, { 12, 13 }, { 14 }, { 15 }, { 16 }, { 17 }, { 18 }, { 19 }, { 20 }, { 21, 22, 23, 24 }, { 25 }, { 26 }, { 27, 28, 29 }, { 30 }, { 31 }, { 32 }, { 33 }, { 34 }, { 35 }, { 36 }, { 37 }, { 38, 39 }]; -rm_ori = [{ 1, 2 }, { 1 }, { 1, 2, 3, 4 }, { 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1, 2 }, { 1, 3 }, { 1 }, { 1 }, { 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1, 3 }, { 1 }, { 1, 2 }, { 1, 3 }, { 1 }, { 1 }, { 1 }, { 1, 2 }, { 1 }, { 1 }, { 1 }, { 1 }, { 1, 2, 3, 4 }]; -rm_max_len = [181, 170, 343, 127, 56, 65, 213, 72, 112, 510, 196, 76, 113, 63, 64, 198, 603, 649, 199, 166, 632, 86, 53, 529, 228, 137, 75, 63, 146, 265]; -rm_max_wid = [131, 231, 204, 29, 100, 121, 75, 145, 75, 272, 26, 108, 105, 203, 100, 150, 142, 242, 102, 142, 207, 123, 111, 309, 27, 102, 111, 125, 102, 382]; - -n_rm_rec = 39; -rm_rec_len = [181, 170, 74, 197, 72, 127, 56, 65, 213, 72, 112, 268, 510, 196, 76, 113, 63, 64, 198, 603, 73, 99, 190, 287, 199, 166, 123, 392, 117, 86, 53, 529, 228, 137, 75, 63, 146, 83, 182]; -rm_rec_wid = [131, 231, 147, 204, 138, 29, 100, 121, 75, 145, 75, 130, 142, 26, 108, 105, 203, 100, 150, 142, 179, 228, 181, 242, 102, 142, 207, 172, 204, 123, 111, 309, 27, 102, 111, 125, 102, 310, 382]; -rm_rec_os_x = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 269, 57 - | 74, 0, 72, 0 - | 271, 0, 0, 66 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 242, -1, 0, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 576, -1 - | 73, -1, 477, -1 - | 172, -1, 287, -1 - | 362, -1, 0, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, 509, -1 - | 123, -1, 117, -1 - | 515, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, 182, 72 - | 83, 0, 0, 0 - |]; -rm_rec_os_y = - [| 0, 0, -1, -1 - | 0, -1, -1, -1 - | 57, 0, 0, 269 - | 0, 74, 0, 72 - | 66, 271, 0, 0 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 142, -1, 0, -1 - | 0, -1, 130, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, 63, -1 - | 0, -1, 14, -1 - | 0, -1, 61, -1 - | 0, -1, 0, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, 0, -1 - | 35, -1, 0, -1 - | 3, -1, 0, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, 0, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 0, -1, -1, -1 - | 72, 0, 0, 182 - | 0, 83, 0, 0 - |]; -n_st = 2; -st_len = [63, 294]; -st_wid = [126, 74]; -st_no_steps = [1, 6]; -st_min_steps = [1, 2]; -st_max_breaks = [2, 4]; - diff --git a/data/instances/competition/lot-sizing/pigment15a.psp.dzn b/data/instances/competition/lot-sizing/pigment15a.psp.dzn deleted file mode 100644 index 52e110c6..00000000 --- a/data/instances/competition/lot-sizing/pigment15a.psp.dzn +++ /dev/null @@ -1,35 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 5; -nb_orders = 14; -nb_periods = 15; -inventory_cost = 10; - -% item-type-1: order-1, order-2, -% item-type-2: order-3, order-4, order-5, -% item-type-3: order-6, order-7, order-8, -% item-type-4: order-9, order-10, order-11, -% item-type-5: order-12, order-13, order-14, - -due_period = [ 8, 14, 5, 12, 15, 7, 12, 14, 8, 11, 15, 9, 12, 15, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 105, 105, 105, 154, 154, 154, 130, 130, 130, 100, 100, 100, % o1 - 0, 0, 0, 105, 105, 105, 154, 154, 154, 130, 130, 130, 100, 100, 100, % o2 - 0, 146, 146, 0, 0, 0, 135, 135, 135, 139, 139, 139, 167, 167, 167, % o3 - 0, 146, 146, 0, 0, 0, 135, 135, 135, 139, 139, 139, 167, 167, 167, % o4 - 0, 146, 146, 0, 0, 0, 135, 135, 135, 139, 139, 139, 167, 167, 167, % o5 - 0, 101, 101, 183, 183, 183, 0, 0, 0, 193, 193, 193, 113, 113, 113, % o6 - 0, 101, 101, 183, 183, 183, 0, 0, 0, 193, 193, 193, 113, 113, 113, % o7 - 0, 101, 101, 183, 183, 183, 0, 0, 0, 193, 193, 193, 113, 113, 113, % o8 - 0, 188, 188, 112, 112, 112, 111, 111, 111, 0, 0, 0, 103, 103, 103, % o9 - 0, 188, 188, 112, 112, 112, 111, 111, 111, 0, 0, 0, 103, 103, 103, % o10 - 0, 188, 188, 112, 112, 112, 111, 111, 111, 0, 0, 0, 103, 103, 103, % o11 - 0, 179, 179, 117, 117, 117, 161, 161, 161, 124, 124, 124, 0, 0, 0, % o12 - 0, 179, 179, 117, 117, 117, 161, 161, 161, 124, 124, 124, 0, 0, 0, % o13 - 0, 179, 179, 117, 117, 117, 161, 161, 161, 124, 124, 124, 0, 0, 0, % o14 -]); - -nb_of_orders = [2, 3, 3, 3, 3, ]; -item_type = array1d(Orders0, [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, ]); diff --git a/data/instances/competition/lot-sizing/pigment15b.psp.dzn b/data/instances/competition/lot-sizing/pigment15b.psp.dzn deleted file mode 100644 index b380396c..00000000 --- a/data/instances/competition/lot-sizing/pigment15b.psp.dzn +++ /dev/null @@ -1,34 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 5; -nb_orders = 13; -nb_periods = 15; -inventory_cost = 10; - -% item-type-1: order-1, order-2, order-3, order-4, -% item-type-2: order-5, order-6, order-7, -% item-type-3: order-8, order-9, -% item-type-4: order-10, order-11, -% item-type-5: order-12, order-13, - -due_period = [ 6, 9, 11, 15, 10, 13, 15, 7, 14, 11, 14, 9, 15, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 0, 0, 128, 128, 128, 117, 117, 197, 197, 178, 178, % o1 - 0, 0, 0, 0, 0, 128, 128, 128, 117, 117, 197, 197, 178, 178, % o2 - 0, 0, 0, 0, 0, 128, 128, 128, 117, 117, 197, 197, 178, 178, % o3 - 0, 0, 0, 0, 0, 128, 128, 128, 117, 117, 197, 197, 178, 178, % o4 - 0, 125, 125, 125, 125, 0, 0, 0, 102, 102, 146, 146, 175, 175, % o5 - 0, 125, 125, 125, 125, 0, 0, 0, 102, 102, 146, 146, 175, 175, % o6 - 0, 125, 125, 125, 125, 0, 0, 0, 102, 102, 146, 146, 175, 175, % o7 - 0, 179, 179, 179, 179, 191, 191, 191, 0, 0, 190, 190, 161, 161, % o8 - 0, 179, 179, 179, 179, 191, 191, 191, 0, 0, 190, 190, 161, 161, % o9 - 0, 156, 156, 156, 156, 139, 139, 139, 119, 119, 0, 0, 189, 189, % o10 - 0, 156, 156, 156, 156, 139, 139, 139, 119, 119, 0, 0, 189, 189, % o11 - 0, 109, 109, 109, 109, 121, 121, 121, 111, 111, 187, 187, 0, 0, % o12 - 0, 109, 109, 109, 109, 121, 121, 121, 111, 111, 187, 187, 0, 0, % o13 -]); - -nb_of_orders = [4, 3, 2, 2, 2, ]; -item_type = array1d(Orders0, [0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, ]); diff --git a/data/instances/competition/lot-sizing/pigment15c.psp.dzn b/data/instances/competition/lot-sizing/pigment15c.psp.dzn deleted file mode 100644 index ad3eef16..00000000 --- a/data/instances/competition/lot-sizing/pigment15c.psp.dzn +++ /dev/null @@ -1,37 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 8; -nb_orders = 13; -nb_periods = 15; -inventory_cost = 10; - -% item-type-1: order-1, -% item-type-2: order-2, -% item-type-3: order-3, order-4, -% item-type-4: order-5, order-6, -% item-type-5: order-7, order-8, -% item-type-6: order-9, order-10, -% item-type-7: order-11, -% item-type-8: order-12, order-13, - -due_period = [ 15, 10, 11, 14, 9, 14, 9, 15, 11, 13, 14, 10, 14, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 149, 134, 134, 110, 110, 137, 137, 191, 191, 104, 192, 192, % o1 - 0, 131, 0, 139, 139, 192, 192, 118, 118, 117, 117, 161, 132, 132, % o2 - 0, 128, 115, 0, 0, 195, 195, 196, 196, 174, 174, 127, 144, 144, % o3 - 0, 128, 115, 0, 0, 195, 195, 196, 196, 174, 174, 127, 144, 144, % o4 - 0, 134, 154, 119, 119, 0, 0, 165, 165, 118, 118, 163, 109, 109, % o5 - 0, 134, 154, 119, 119, 0, 0, 165, 165, 118, 118, 163, 109, 109, % o6 - 0, 169, 118, 117, 117, 140, 140, 0, 0, 166, 166, 174, 116, 116, % o7 - 0, 169, 118, 117, 117, 140, 140, 0, 0, 166, 166, 174, 116, 116, % o8 - 0, 134, 153, 139, 139, 158, 158, 159, 159, 0, 0, 100, 170, 170, % o9 - 0, 134, 153, 139, 139, 158, 158, 159, 159, 0, 0, 100, 170, 170, % o10 - 0, 170, 199, 185, 185, 193, 193, 143, 143, 146, 146, 0, 186, 186, % o11 - 0, 162, 101, 130, 130, 115, 115, 193, 193, 190, 190, 150, 0, 0, % o12 - 0, 162, 101, 130, 130, 115, 115, 193, 193, 190, 190, 150, 0, 0, % o13 -]); - -nb_of_orders = [1, 1, 2, 2, 2, 2, 1, 2, ]; -item_type = array1d(Orders0, [0, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, ]); diff --git a/data/instances/competition/lot-sizing/pigment15d.psp.dzn b/data/instances/competition/lot-sizing/pigment15d.psp.dzn deleted file mode 100644 index 6ca02bb8..00000000 --- a/data/instances/competition/lot-sizing/pigment15d.psp.dzn +++ /dev/null @@ -1,38 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 10; -nb_orders = 12; -nb_periods = 15; -inventory_cost = 10; - -% item-type-1: order-1, order-2, -% item-type-2: order-3, -% item-type-3: order-4, -% item-type-4: order-5, order-6, -% item-type-5: order-7, -% item-type-6: order-8, -% item-type-7: order-9, -% item-type-8: order-10, -% item-type-9: order-11, -% item-type-10: order-12, - -due_period = [ 13, 15, 14, 15, 11, 14, 13, 13, 15, 7, 15, 14, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 131, 109, 191, 191, 193, 107, 124, 138, 107, 179, % o1 - 0, 0, 0, 131, 109, 191, 191, 193, 107, 124, 138, 107, 179, % o2 - 0, 193, 193, 0, 175, 110, 110, 187, 169, 120, 153, 162, 119, % o3 - 0, 101, 101, 136, 0, 170, 170, 116, 195, 154, 160, 173, 165, % o4 - 0, 187, 187, 110, 175, 0, 0, 134, 150, 175, 150, 183, 124, % o5 - 0, 187, 187, 110, 175, 0, 0, 134, 150, 175, 150, 183, 124, % o6 - 0, 157, 157, 102, 156, 181, 181, 0, 130, 178, 170, 131, 141, % o7 - 0, 130, 130, 151, 161, 157, 157, 196, 0, 138, 184, 112, 107, % o8 - 0, 170, 170, 110, 174, 154, 154, 114, 196, 0, 165, 192, 175, % o9 - 0, 110, 110, 121, 136, 162, 162, 195, 117, 139, 0, 190, 103, % o10 - 0, 165, 165, 178, 125, 126, 126, 111, 175, 119, 193, 0, 180, % o11 - 0, 144, 144, 192, 168, 172, 172, 184, 184, 191, 150, 113, 0, % o12 -]); - -nb_of_orders = [2, 1, 1, 2, 1, 1, 1, 1, 1, 1, ]; -item_type = array1d(Orders0, [0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, ]); diff --git a/data/instances/competition/lot-sizing/pigment20a.psp.dzn b/data/instances/competition/lot-sizing/pigment20a.psp.dzn deleted file mode 100644 index 6e880c3b..00000000 --- a/data/instances/competition/lot-sizing/pigment20a.psp.dzn +++ /dev/null @@ -1,38 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 5; -nb_orders = 17; -nb_periods = 20; -inventory_cost = 10; - -% item-type-1: order-1, order-2, order-3, -% item-type-2: order-4, order-5, -% item-type-3: order-6, order-7, order-8, order-9, -% item-type-4: order-10, order-11, order-12, order-13, order-14, -% item-type-5: order-15, order-16, order-17, - -due_period = [ 12, 13, 17, 15, 18, 4, 6, 9, 13, 4, 9, 12, 19, 20, 10, 11, 18, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 o17 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 0, 152, 152, 121, 121, 121, 121, 122, 122, 122, 122, 122, 124, 124, 124, % o1 - 0, 0, 0, 0, 152, 152, 121, 121, 121, 121, 122, 122, 122, 122, 122, 124, 124, 124, % o2 - 0, 0, 0, 0, 152, 152, 121, 121, 121, 121, 122, 122, 122, 122, 122, 124, 124, 124, % o3 - 0, 112, 112, 112, 0, 0, 163, 163, 163, 163, 188, 188, 188, 188, 188, 102, 102, 102, % o4 - 0, 112, 112, 112, 0, 0, 163, 163, 163, 163, 188, 188, 188, 188, 188, 102, 102, 102, % o5 - 0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o6 - 0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o7 - 0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o8 - 0, 121, 121, 121, 191, 191, 0, 0, 0, 0, 108, 108, 108, 108, 108, 137, 137, 137, % o9 - 0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o10 - 0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o11 - 0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o12 - 0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o13 - 0, 120, 120, 120, 133, 133, 184, 184, 184, 184, 0, 0, 0, 0, 0, 173, 173, 173, % o14 - 0, 184, 184, 184, 154, 154, 166, 166, 166, 166, 116, 116, 116, 116, 116, 0, 0, 0, % o15 - 0, 184, 184, 184, 154, 154, 166, 166, 166, 166, 116, 116, 116, 116, 116, 0, 0, 0, % o16 - 0, 184, 184, 184, 154, 154, 166, 166, 166, 166, 116, 116, 116, 116, 116, 0, 0, 0, % o17 -]); - -nb_of_orders = [3, 2, 4, 5, 3, ]; -item_type = array1d(Orders0, [0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, ]); diff --git a/data/instances/competition/lot-sizing/pigment20b.psp.dzn b/data/instances/competition/lot-sizing/pigment20b.psp.dzn deleted file mode 100644 index a8d1292c..00000000 --- a/data/instances/competition/lot-sizing/pigment20b.psp.dzn +++ /dev/null @@ -1,44 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 10; -nb_orders = 18; -nb_periods = 20; -inventory_cost = 10; - -% item-type-1: order-1, order-2, -% item-type-2: order-3, order-4, -% item-type-3: order-5, order-6, -% item-type-4: order-7, order-8, order-9, -% item-type-5: order-10, order-11, -% item-type-6: order-12, order-13, -% item-type-7: order-14, -% item-type-8: order-15, order-16, -% item-type-9: order-17, -% item-type-10: order-18, - -due_period = [ 4, 17, 5, 19, 5, 18, 6, 17, 19, 8, 16, 6, 18, 9, 4, 20, 10, 19, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 o17 o18 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 114, 114, 160, 160, 127, 127, 127, 172, 172, 176, 176, 132, 199, 199, 197, 183, % o1 - 0, 0, 0, 114, 114, 160, 160, 127, 127, 127, 172, 172, 176, 176, 132, 199, 199, 197, 183, % o2 - 0, 153, 153, 0, 0, 123, 123, 114, 114, 114, 138, 138, 198, 198, 147, 170, 170, 195, 171, % o3 - 0, 153, 153, 0, 0, 123, 123, 114, 114, 114, 138, 138, 198, 198, 147, 170, 170, 195, 171, % o4 - 0, 115, 115, 183, 183, 0, 0, 147, 147, 147, 189, 189, 111, 111, 135, 198, 198, 185, 138, % o5 - 0, 115, 115, 183, 183, 0, 0, 147, 147, 147, 189, 189, 111, 111, 135, 198, 198, 185, 138, % o6 - 0, 106, 106, 159, 159, 185, 185, 0, 0, 0, 134, 134, 164, 164, 122, 166, 166, 151, 104, % o7 - 0, 106, 106, 159, 159, 185, 185, 0, 0, 0, 134, 134, 164, 164, 122, 166, 166, 151, 104, % o8 - 0, 106, 106, 159, 159, 185, 185, 0, 0, 0, 134, 134, 164, 164, 122, 166, 166, 151, 104, % o9 - 0, 135, 135, 122, 122, 166, 166, 110, 110, 110, 0, 0, 100, 100, 118, 130, 130, 166, 199, % o10 - 0, 135, 135, 122, 122, 166, 166, 110, 110, 110, 0, 0, 100, 100, 118, 130, 130, 166, 199, % o11 - 0, 116, 116, 116, 116, 114, 114, 150, 150, 150, 138, 138, 0, 0, 188, 114, 114, 124, 126, % o12 - 0, 116, 116, 116, 116, 114, 114, 150, 150, 150, 138, 138, 0, 0, 188, 114, 114, 124, 126, % o13 - 0, 152, 152, 124, 124, 125, 125, 119, 119, 119, 136, 136, 118, 118, 0, 169, 169, 199, 123, % o14 - 0, 101, 101, 161, 161, 171, 171, 177, 177, 177, 111, 111, 147, 147, 180, 0, 0, 110, 101, % o15 - 0, 101, 101, 161, 161, 171, 171, 177, 177, 177, 111, 111, 147, 147, 180, 0, 0, 110, 101, % o16 - 0, 142, 142, 186, 186, 156, 156, 167, 167, 167, 191, 191, 122, 122, 137, 180, 180, 0, 123, % o17 - 0, 182, 182, 181, 181, 132, 132, 181, 181, 181, 138, 138, 195, 195, 165, 110, 110, 123, 0, % o18 -]); - -nb_of_orders = [2, 2, 2, 3, 2, 2, 1, 2, 1, 1, ]; -item_type = array1d(Orders0, [0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, ]); diff --git a/data/instances/competition/lot-sizing/pigment20c.psp.dzn b/data/instances/competition/lot-sizing/pigment20c.psp.dzn deleted file mode 100644 index 28fe7eb3..00000000 --- a/data/instances/competition/lot-sizing/pigment20c.psp.dzn +++ /dev/null @@ -1,45 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 10; -nb_orders = 19; -nb_periods = 20; -inventory_cost = 10; - -% item-type-1: order-1, order-2, -% item-type-2: order-3, order-4, -% item-type-3: order-5, order-6, -% item-type-4: order-7, -% item-type-5: order-8, order-9, -% item-type-6: order-10, order-11, -% item-type-7: order-12, order-13, -% item-type-8: order-14, order-15, -% item-type-9: order-16, order-17, -% item-type-10: order-18, order-19, - -due_period = [ 9, 11, 5, 14, 15, 20, 13, 10, 18, 11, 13, 10, 20, 12, 15, 8, 17, 11, 13, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 o17 o18 o19 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 151, 151, 175, 175, 115, 184, 184, 110, 110, 187, 187, 182, 182, 127, 127, 172, 172, % o1 - 0, 0, 0, 151, 151, 175, 175, 115, 184, 184, 110, 110, 187, 187, 182, 182, 127, 127, 172, 172, % o2 - 0, 175, 175, 0, 0, 125, 125, 119, 156, 156, 198, 198, 132, 132, 145, 145, 125, 125, 126, 126, % o3 - 0, 175, 175, 0, 0, 125, 125, 119, 156, 156, 198, 198, 132, 132, 145, 145, 125, 125, 126, 126, % o4 - 0, 192, 192, 101, 101, 0, 0, 102, 130, 130, 163, 163, 137, 137, 161, 161, 193, 193, 108, 108, % o5 - 0, 192, 192, 101, 101, 0, 0, 102, 130, 130, 163, 163, 137, 137, 161, 161, 193, 193, 108, 108, % o6 - 0, 195, 195, 163, 163, 115, 115, 0, 178, 178, 130, 130, 121, 121, 158, 158, 114, 114, 125, 125, % o7 - 0, 131, 131, 151, 151, 150, 150, 184, 0, 0, 145, 145, 143, 143, 140, 140, 140, 140, 131, 131, % o8 - 0, 131, 131, 151, 151, 150, 150, 184, 0, 0, 145, 145, 143, 143, 140, 140, 140, 140, 131, 131, % o9 - 0, 194, 194, 171, 171, 117, 117, 131, 131, 131, 0, 0, 166, 166, 122, 122, 119, 119, 173, 173, % o10 - 0, 194, 194, 171, 171, 117, 117, 131, 131, 131, 0, 0, 166, 166, 122, 122, 119, 119, 173, 173, % o11 - 0, 151, 151, 166, 166, 156, 156, 197, 100, 100, 110, 110, 0, 0, 117, 117, 148, 148, 152, 152, % o12 - 0, 151, 151, 166, 166, 156, 156, 197, 100, 100, 110, 110, 0, 0, 117, 117, 148, 148, 152, 152, % o13 - 0, 112, 112, 109, 109, 186, 186, 172, 167, 167, 128, 128, 102, 102, 0, 0, 114, 114, 189, 189, % o14 - 0, 112, 112, 109, 109, 186, 186, 172, 167, 167, 128, 128, 102, 102, 0, 0, 114, 114, 189, 189, % o15 - 0, 134, 134, 109, 109, 136, 136, 166, 142, 142, 186, 186, 130, 130, 142, 142, 0, 0, 118, 118, % o16 - 0, 134, 134, 109, 109, 136, 136, 166, 142, 142, 186, 186, 130, 130, 142, 142, 0, 0, 118, 118, % o17 - 0, 154, 154, 194, 194, 186, 186, 112, 149, 149, 184, 184, 195, 195, 132, 132, 133, 133, 0, 0, % o18 - 0, 154, 154, 194, 194, 186, 186, 112, 149, 149, 184, 184, 195, 195, 132, 132, 133, 133, 0, 0, % o19 -]); - -nb_of_orders = [2, 2, 2, 1, 2, 2, 2, 2, 2, 2, ]; -item_type = array1d(Orders0, [0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, ]); diff --git a/data/instances/competition/lot-sizing/pigment30a.psp.dzn b/data/instances/competition/lot-sizing/pigment30a.psp.dzn deleted file mode 100644 index 74bf86a6..00000000 --- a/data/instances/competition/lot-sizing/pigment30a.psp.dzn +++ /dev/null @@ -1,33 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 5; -nb_orders = 12; -nb_periods = 30; -inventory_cost = 10; - -% item-type-1: order-1, order-2, order-3, -% item-type-2: order-4, order-5, -% item-type-3: order-6, order-7, order-8, -% item-type-4: order-9, -% item-type-5: order-10, order-11, order-12, - -due_period = [ 5, 20, 28, 16, 28, 14, 16, 27, 2, 10, 21, 30, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 0, 184, 184, 194, 194, 194, 130, 112, 112, 112, % o1 - 0, 0, 0, 0, 184, 184, 194, 194, 194, 130, 112, 112, 112, % o2 - 0, 0, 0, 0, 184, 184, 194, 194, 194, 130, 112, 112, 112, % o3 - 0, 114, 114, 114, 0, 0, 172, 172, 172, 100, 185, 185, 185, % o4 - 0, 114, 114, 114, 0, 0, 172, 172, 172, 100, 185, 185, 185, % o5 - 0, 143, 143, 143, 175, 175, 0, 0, 0, 125, 173, 173, 173, % o6 - 0, 143, 143, 143, 175, 175, 0, 0, 0, 125, 173, 173, 173, % o7 - 0, 143, 143, 143, 175, 175, 0, 0, 0, 125, 173, 173, 173, % o8 - 0, 104, 104, 104, 110, 110, 191, 191, 191, 0, 156, 156, 156, % o9 - 0, 127, 127, 127, 195, 195, 172, 172, 172, 139, 0, 0, 0, % o10 - 0, 127, 127, 127, 195, 195, 172, 172, 172, 139, 0, 0, 0, % o11 - 0, 127, 127, 127, 195, 195, 172, 172, 172, 139, 0, 0, 0, % o12 -]); - -nb_of_orders = [3, 2, 3, 1, 3, ]; -item_type = array1d(Orders0, [0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, ]); diff --git a/data/instances/competition/lot-sizing/pigment30b.psp.dzn b/data/instances/competition/lot-sizing/pigment30b.psp.dzn deleted file mode 100644 index 58c9dbf6..00000000 --- a/data/instances/competition/lot-sizing/pigment30b.psp.dzn +++ /dev/null @@ -1,37 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 10; -nb_orders = 11; -nb_periods = 30; -inventory_cost = 10; - -% item-type-1: order-1, -% item-type-2: order-2, -% item-type-3: order-3, -% item-type-4: order-4, -% item-type-5: -% item-type-6: order-5, -% item-type-7: order-6, -% item-type-8: order-7, order-8, -% item-type-9: order-9, -% item-type-10: order-10, order-11, - -due_period = [ 30, 28, 29, 29, 28, 10, 27, 30, 15, 14, 30, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 196, 179, 146, 185, 191, 153, 153, 182, 170, 170, % o1 - 0, 182, 0, 121, 135, 163, 118, 140, 140, 198, 155, 155, % o2 - 0, 180, 138, 0, 146, 108, 160, 148, 148, 127, 185, 185, % o3 - 0, 133, 112, 185, 0, 120, 180, 125, 125, 128, 164, 164, % o4 - 0, 168, 184, 169, 181, 0, 193, 160, 160, 162, 154, 154, % o5 - 0, 143, 127, 140, 115, 125, 0, 121, 121, 198, 104, 104, % o6 - 0, 122, 191, 143, 197, 120, 155, 0, 0, 195, 161, 161, % o7 - 0, 122, 191, 143, 197, 120, 155, 0, 0, 195, 161, 161, % o8 - 0, 172, 108, 134, 159, 100, 163, 141, 141, 0, 192, 192, % o9 - 0, 168, 100, 120, 194, 168, 126, 159, 159, 142, 0, 0, % o10 - 0, 168, 100, 120, 194, 168, 126, 159, 159, 142, 0, 0, % o11 -]); - -nb_of_orders = [1, 1, 1, 1, 0, 1, 1, 2, 1, 2, ]; -item_type = array1d(Orders0, [0, 1, 2, 3, 4, 6, 7, 8, 8, 9, 10, 10, ]); diff --git a/data/instances/competition/lot-sizing/pigment30c.psp.dzn b/data/instances/competition/lot-sizing/pigment30c.psp.dzn deleted file mode 100644 index 1c6d5d21..00000000 --- a/data/instances/competition/lot-sizing/pigment30c.psp.dzn +++ /dev/null @@ -1,42 +0,0 @@ -% Automatically generated DZN file for Lot Sizing Problem - -nb_item_types = 10; -nb_orders = 16; -nb_periods = 30; -inventory_cost = 10; - -% item-type-1: order-1, order-2, -% item-type-2: order-3, -% item-type-3: order-4, -% item-type-4: order-5, order-6, -% item-type-5: order-7, -% item-type-6: order-8, order-9, order-10, order-11, order-12, -% item-type-7: order-13, -% item-type-8: order-14, -% item-type-9: order-15, -% item-type-10: order-16, - -due_period = [ 8, 29, 28, 15, 10, 30, 13, 9, 10, 11, 13, 14, 10, 7, 15, 14, ]; -change_cost = array2d(Orders0, Orders0, [ -% 0 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, % 0 - 0, 0, 0, 161, 186, 172, 172, 194, 193, 193, 193, 193, 193, 126, 111, 153, 149, % o1 - 0, 0, 0, 161, 186, 172, 172, 194, 193, 193, 193, 193, 193, 126, 111, 153, 149, % o2 - 0, 120, 120, 0, 140, 110, 110, 108, 120, 120, 120, 120, 120, 121, 137, 154, 198, % o3 - 0, 131, 131, 109, 0, 142, 142, 144, 116, 116, 116, 116, 116, 129, 183, 154, 135, % o4 - 0, 148, 148, 109, 141, 0, 0, 121, 192, 192, 192, 192, 192, 167, 154, 185, 104, % o5 - 0, 148, 148, 109, 141, 0, 0, 121, 192, 192, 192, 192, 192, 167, 154, 185, 104, % o6 - 0, 155, 155, 196, 103, 186, 186, 0, 105, 105, 105, 105, 105, 189, 164, 128, 124, % o7 - 0, 173, 173, 118, 195, 145, 145, 176, 0, 0, 0, 0, 0, 136, 170, 193, 150, % o8 - 0, 173, 173, 118, 195, 145, 145, 176, 0, 0, 0, 0, 0, 136, 170, 193, 150, % o9 - 0, 173, 173, 118, 195, 145, 145, 176, 0, 0, 0, 0, 0, 136, 170, 193, 150, % o10 - 0, 173, 173, 118, 195, 145, 145, 176, 0, 0, 0, 0, 0, 136, 170, 193, 150, % o11 - 0, 173, 173, 118, 195, 145, 145, 176, 0, 0, 0, 0, 0, 136, 170, 193, 150, % o12 - 0, 186, 186, 117, 155, 154, 154, 159, 157, 157, 157, 157, 157, 0, 197, 104, 102, % o13 - 0, 149, 149, 181, 156, 143, 143, 148, 168, 168, 168, 168, 168, 107, 0, 119, 174, % o14 - 0, 118, 118, 129, 188, 125, 125, 175, 142, 142, 142, 142, 142, 176, 100, 0, 118, % o15 - 0, 171, 171, 184, 167, 157, 157, 136, 126, 126, 126, 126, 126, 194, 158, 167, 0, % o16 -]); - -nb_of_orders = [2, 1, 1, 2, 1, 5, 1, 1, 1, 1, ]; -item_type = array1d(Orders0, [0, 1, 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 9, 10, ]); diff --git a/data/instances/competition/macc/175.dzn b/data/instances/competition/macc/175.dzn deleted file mode 100644 index 7ec377e2..00000000 --- a/data/instances/competition/macc/175.dzn +++ /dev/null @@ -1,16 +0,0 @@ -A = 2; -T = 11; -X = 9; -Y = 9; -Z = 2; -building = array2d(YY,XX, [ - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,1,0,0,0,0,0, - 0,0,0,1,0,0,0,0,0, - 0,0,0,1,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, -]); diff --git a/data/instances/competition/macc/307.dzn b/data/instances/competition/macc/307.dzn deleted file mode 100644 index 78967bab..00000000 --- a/data/instances/competition/macc/307.dzn +++ /dev/null @@ -1,16 +0,0 @@ -A = 2; -T = 13; -X = 9; -Y = 9; -Z = 3; -building = array2d(YY,XX, [ - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, -]); diff --git a/data/instances/competition/macc/37.dzn b/data/instances/competition/macc/37.dzn deleted file mode 100644 index 23e05e73..00000000 --- a/data/instances/competition/macc/37.dzn +++ /dev/null @@ -1,14 +0,0 @@ -A = 2; -T = 10; -X = 7; -Y = 7; -Z = 3; -building = array2d(YY,XX, [ - 0,0,0,0,0,0,0, - 0,0,2,0,0,0,0, - 0,0,0,0,0,0,0, - 0,0,0,0,0,0,0, - 0,0,0,0,0,0,0, - 0,0,0,0,0,0,0, - 0,0,0,0,0,0,0, -]); diff --git a/data/instances/competition/macc/455.dzn b/data/instances/competition/macc/455.dzn deleted file mode 100644 index 81d8cb18..00000000 --- a/data/instances/competition/macc/455.dzn +++ /dev/null @@ -1,14 +0,0 @@ -A = 2; -T = 14; -X = 7; -Y = 7; -Z = 3; -building = array2d(YY,XX, [ - 0,0,0,0,0,0,0, - 0,0,2,0,0,0,0, - 0,0,2,0,0,0,0, - 0,0,0,0,0,0,0, - 0,0,0,0,0,0,0, - 0,0,0,0,0,0,0, - 0,0,0,0,0,0,0, -]); diff --git a/data/instances/competition/macc/46.dzn b/data/instances/competition/macc/46.dzn deleted file mode 100644 index 20b3baed..00000000 --- a/data/instances/competition/macc/46.dzn +++ /dev/null @@ -1,16 +0,0 @@ -A = 2; -T = 8; -X = 9; -Y = 9; -Z = 2; -building = array2d(YY,XX, [ - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,1,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0, -]); diff --git a/data/instances/competition/mario/mario_easy_5.dzn b/data/instances/competition/mario/mario_easy_5.dzn deleted file mode 100644 index a476dd84..00000000 --- a/data/instances/competition/mario/mario_easy_5.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 15; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 1500; -conso = [|0,897,18,694,884,901,521,570,338,544,464,166,60,149,312|0,0,685,618,795,43,803,603,61,233,961,271,952,680,36|18,685,0,929,143,664,137,658,711,825,541,806,189,108,913|694,618,929,0,726,376,490,374,71,708,639,290,608,810,519|884,795,143,726,0,985,361,942,527,500,782,11,980,389,86|901,43,664,376,985,0,419,250,861,665,859,593,146,139,108|521,803,137,490,361,419,0,903,209,447,531,406,871,211,353|570,603,658,374,942,250,903,0,72,882,79,133,814,336,372|338,61,711,71,527,861,209,72,0,431,618,77,501,178,547|544,233,825,708,500,665,447,882,431,0,568,622,440,620,720|464,961,541,639,782,859,531,79,618,568,0,517,805,893,210|166,271,806,290,11,593,406,133,77,622,517,0,212,315,250|60,952,189,608,980,146,871,814,501,440,805,212,0,168,593|149,680,108,810,389,139,211,336,178,620,893,315,168,0,548|312,36,913,519,86,108,353,372,547,720,210,250,593,548,0|]; -goldInHouse = [0,0,74,24,6,5,54,91,22,21,31,3,47,60,28]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_medium_1.dzn b/data/instances/competition/mario/mario_medium_1.dzn deleted file mode 100644 index 57216aab..00000000 --- a/data/instances/competition/mario/mario_medium_1.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 30; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 3000; -conso = [|0,797,917,369,62,850,980,886,321,995,349,313,694,63,252,112,246,118,252,719,437,75,66,862,819,534,391,59,30,487|0,0,260,641,570,760,1,272,791,537,164,615,566,883,332,695,147,295,118,844,977,900,471,290,466,735,811,507,69,671|917,260,0,645,700,776,720,230,97,736,919,399,581,902,973,105,771,543,523,211,904,817,438,346,400,959,537,112,648,941|369,641,645,0,897,813,275,939,951,162,923,705,474,124,610,765,420,120,87,330,734,646,218,315,498,524,301,908,580,909|62,570,700,897,0,993,636,830,166,371,873,275,749,690,513,401,240,898,615,623,419,924,539,446,3,105,654,310,341,859|850,760,776,813,993,0,371,972,258,803,87,57,405,302,872,772,318,535,819,378,292,598,368,564,419,540,655,431,612,61|980,1,720,275,636,371,0,871,569,831,991,869,856,209,578,349,177,787,755,461,548,607,139,674,754,645,539,141,88,68|886,272,230,939,830,972,871,0,387,441,599,117,305,541,420,239,138,652,607,6,161,686,436,263,341,253,39,121,776,27|321,791,97,951,166,258,569,387,0,20,253,946,83,943,669,698,798,167,195,253,739,776,952,74,760,390,777,593,394,988|995,537,736,162,371,803,831,441,20,0,31,830,735,166,253,733,335,350,744,389,3,587,321,404,157,788,47,15,973,619|349,164,919,923,873,87,991,599,253,31,0,329,791,192,515,729,987,582,301,19,769,116,112,900,339,585,33,626,433,954|313,615,399,705,275,57,869,117,946,830,329,0,50,483,699,443,677,159,980,768,804,330,170,842,681,540,38,65,821,830|694,566,581,474,749,405,856,305,83,735,791,50,0,533,364,341,60,177,45,27,831,928,121,352,805,247,74,355,597,812|63,883,902,124,690,302,209,541,943,166,192,483,533,0,736,458,122,99,840,833,381,604,194,288,442,99,904,725,466,152|252,332,973,610,513,872,578,420,669,253,515,699,364,736,0,721,661,213,464,41,183,755,819,6,892,600,993,657,151,929|112,695,105,765,401,772,349,239,698,733,729,443,341,458,721,0,620,305,232,503,361,597,53,290,724,278,581,895,484,199|246,147,771,420,240,318,177,138,798,335,987,677,60,122,661,620,0,662,249,97,542,653,512,100,273,312,654,299,39,911|118,295,543,120,898,535,787,652,167,350,582,159,177,99,213,305,662,0,839,561,156,433,154,891,382,892,976,853,325,261|252,118,523,87,615,819,755,607,195,744,301,980,45,840,464,232,249,839,0,153,733,780,851,735,426,874,763,785,777,616|719,844,211,330,623,378,461,6,253,389,19,768,27,833,41,503,97,561,153,0,84,171,810,378,415,681,569,253,669,665|437,977,904,734,419,292,548,161,739,3,769,804,831,381,183,361,542,156,733,84,0,369,522,106,641,194,573,802,157,30|75,900,817,646,924,598,607,686,776,587,116,330,928,604,755,597,653,433,780,171,369,0,64,100,167,346,194,885,108,232|66,471,438,218,539,368,139,436,952,321,112,170,121,194,819,53,512,154,851,810,522,64,0,934,261,320,661,444,955,170|862,290,346,315,446,564,674,263,74,404,900,842,352,288,6,290,100,891,735,378,106,100,934,0,485,28,34,677,582,256|819,466,400,498,3,419,754,341,760,157,339,681,805,442,892,724,273,382,426,415,641,167,261,485,0,970,351,100,149,898|534,735,959,524,105,540,645,253,390,788,585,540,247,99,600,278,312,892,874,681,194,346,320,28,970,0,792,368,370,751|391,811,537,301,654,655,539,39,777,47,33,38,74,904,993,581,654,976,763,569,573,194,661,34,351,792,0,578,862,284|59,507,112,908,310,431,141,121,593,15,626,65,355,725,657,895,299,853,785,253,802,885,444,677,100,368,578,0,755,649|30,69,648,580,341,612,88,776,394,973,433,821,597,466,151,484,39,325,777,669,157,108,955,582,149,370,862,755,0,282|487,671,941,909,859,61,68,27,988,619,954,830,812,152,929,199,911,261,616,665,30,232,170,256,898,751,284,649,282,0|]; -goldInHouse = [0,0,47,13,54,4,34,6,78,48,69,73,17,63,62,34,92,62,96,89,76,32,10,99,74,59,98,53,37,2]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_medium_3.dzn b/data/instances/competition/mario/mario_medium_3.dzn deleted file mode 100644 index 84bc441d..00000000 --- a/data/instances/competition/mario/mario_medium_3.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 30; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 3000; -conso = [|0,746,732,842,516,825,440,909,312,491,792,117,376,655,722,596,561,915,627,177,219,582,618,677,959,55,382,71,851,389|0,0,558,527,527,784,953,638,283,712,826,830,757,771,617,126,414,454,628,985,27,944,82,307,884,631,317,645,847,501|732,558,0,249,86,122,505,85,215,637,314,937,799,784,770,341,53,956,789,479,786,485,480,118,524,399,239,396,668,726|842,527,249,0,265,776,239,158,338,334,236,976,721,11,555,253,362,368,25,888,79,709,379,675,838,972,360,480,694,346|516,527,86,265,0,698,783,489,912,817,149,909,507,355,546,777,373,64,401,171,182,469,835,269,376,465,376,179,557,997|825,784,122,776,698,0,983,827,286,984,656,749,358,495,887,187,122,360,329,155,653,195,468,871,653,202,606,615,570,244|440,953,505,239,783,983,0,558,292,426,682,612,159,230,804,366,198,815,213,701,753,39,17,408,461,870,741,820,573,324|909,638,85,158,489,827,558,0,204,989,184,107,929,742,994,109,740,944,268,269,20,283,915,470,951,58,446,391,211,591|312,283,215,338,912,286,292,204,0,354,62,207,283,215,346,162,469,328,926,382,269,616,516,475,765,236,936,532,545,434|491,712,637,334,817,984,426,989,354,0,917,687,771,30,297,467,315,520,434,972,641,169,377,115,530,430,193,498,756,658|792,826,314,236,149,656,682,184,62,917,0,118,157,280,105,774,699,254,216,759,608,848,579,403,428,65,776,702,936,201|117,830,937,976,909,749,612,107,207,687,118,0,277,888,380,803,637,229,481,759,624,498,338,140,882,144,552,277,400,882|376,757,799,721,507,358,159,929,283,771,157,277,0,596,898,860,450,436,936,887,823,199,578,937,951,426,761,122,98,716|655,771,784,11,355,495,230,742,215,30,280,888,596,0,618,387,462,233,815,107,323,31,567,742,684,98,500,803,580,931|722,617,770,555,546,887,804,994,346,297,105,380,898,618,0,472,870,859,349,484,873,474,768,408,302,719,924,146,212,90|596,126,341,253,777,187,366,109,162,467,774,803,860,387,472,0,125,684,947,974,533,93,453,790,207,275,616,616,394,547|561,414,53,362,373,122,198,740,469,315,699,637,450,462,870,125,0,866,326,55,501,318,565,837,669,877,222,72,974,878|915,454,956,368,64,360,815,944,328,520,254,229,436,233,859,684,866,0,225,663,64,844,531,882,51,775,924,778,902,800|627,628,789,25,401,329,213,268,926,434,216,481,936,815,349,947,326,225,0,64,865,818,361,55,603,795,729,824,468,590|177,985,479,888,171,155,701,269,382,972,759,759,887,107,484,974,55,663,64,0,773,877,938,703,672,270,844,971,253,244|219,27,786,79,182,653,753,20,269,641,608,624,823,323,873,533,501,64,865,773,0,595,523,167,463,256,211,553,86,505|582,944,485,709,469,195,39,283,616,169,848,498,199,31,474,93,318,844,818,877,595,0,966,360,131,832,960,95,634,405|618,82,480,379,835,468,17,915,516,377,579,338,578,567,768,453,565,531,361,938,523,966,0,296,397,450,135,354,284,846|677,307,118,675,269,871,408,470,475,115,403,140,937,742,408,790,837,882,55,703,167,360,296,0,403,840,826,716,7,106|959,884,524,838,376,653,461,951,765,530,428,882,951,684,302,207,669,51,603,672,463,131,397,403,0,830,681,933,170,780|55,631,399,972,465,202,870,58,236,430,65,144,426,98,719,275,877,775,795,270,256,832,450,840,830,0,504,183,692,70|382,317,239,360,376,606,741,446,936,193,776,552,761,500,924,616,222,924,729,844,211,960,135,826,681,504,0,306,768,17|71,645,396,480,179,615,820,391,532,498,702,277,122,803,146,616,72,778,824,971,553,95,354,716,933,183,306,0,837,229|851,847,668,694,557,570,573,211,545,756,936,400,98,580,212,394,974,902,468,253,86,634,284,7,170,692,768,837,0,166|389,501,726,346,997,244,324,591,434,658,201,882,716,931,90,547,878,800,590,244,505,405,846,106,780,70,17,229,166,0|]; -goldInHouse = [0,0,10,81,28,2,49,64,59,61,85,82,77,14,81,6,76,37,86,99,11,92,85,95,78,13,57,59,46,93]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_medium_4.dzn b/data/instances/competition/mario/mario_medium_4.dzn deleted file mode 100644 index 66d550d7..00000000 --- a/data/instances/competition/mario/mario_medium_4.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 30; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 3000; -conso = [|0,372,290,660,111,753,21,582,969,292,685,338,901,310,912,792,410,693,95,532,629,815,873,4,840,347,540,406,204,593|0,0,448,716,136,358,302,589,187,276,805,156,686,685,633,319,340,652,259,861,768,332,189,628,69,890,916,434,36,791|290,448,0,281,717,258,177,177,785,980,421,227,255,580,7,21,985,788,29,175,311,180,375,458,579,164,849,456,982,764|660,716,281,0,115,234,559,610,736,633,360,393,698,928,692,896,776,18,44,356,217,917,613,409,854,718,78,915,909,119|111,136,717,115,0,205,49,342,913,607,959,459,341,56,964,703,771,283,71,301,545,377,961,441,944,295,164,140,287,151|753,358,258,234,205,0,318,825,715,436,233,790,476,606,485,744,746,205,553,941,386,473,258,510,933,817,592,885,405,652|21,302,177,559,49,318,0,840,715,937,590,391,997,82,143,323,916,744,703,966,876,52,728,937,422,308,5,258,266,453|582,589,177,610,342,825,840,0,890,754,858,132,869,470,154,664,370,348,481,611,872,655,176,681,385,546,198,487,354,911|969,187,785,736,913,715,715,890,0,19,769,190,783,900,788,2,155,290,695,331,216,151,606,974,887,986,175,185,437,954|292,276,980,633,607,436,937,754,19,0,473,179,86,964,322,132,864,729,209,284,276,445,737,203,596,554,600,61,70,655|685,805,421,360,959,233,590,858,769,473,0,552,243,196,630,297,285,938,471,950,876,155,141,781,842,864,553,783,178,312|338,156,227,393,459,790,391,132,190,179,552,0,74,780,273,538,966,784,229,416,208,173,419,353,514,40,267,113,357,523|901,686,255,698,341,476,997,869,783,86,243,74,0,74,832,563,111,922,574,237,614,291,435,475,587,248,908,339,712,497|310,685,580,928,56,606,82,470,900,964,196,780,74,0,818,65,341,531,608,652,832,58,905,973,809,235,647,244,25,713|912,633,7,692,964,485,143,154,788,322,630,273,832,818,0,731,347,109,366,605,513,677,531,173,778,57,963,289,331,688|792,319,21,896,703,744,323,664,2,132,297,538,563,65,731,0,727,967,295,933,469,355,952,446,364,284,891,814,484,677|410,340,985,776,771,746,916,370,155,864,285,966,111,341,347,727,0,855,134,430,240,61,162,630,409,330,666,546,368,365|693,652,788,18,283,205,744,348,290,729,938,784,922,531,109,967,855,0,30,680,201,316,455,269,243,797,189,466,363,951|95,259,29,44,71,553,703,481,695,209,471,229,574,608,366,295,134,30,0,153,36,492,856,714,296,358,219,226,11,655|532,861,175,356,301,941,966,611,331,284,950,416,237,652,605,933,430,680,153,0,185,611,484,797,760,662,792,177,64,933|629,768,311,217,545,386,876,872,216,276,876,208,614,832,513,469,240,201,36,185,0,531,521,785,908,602,252,405,535,589|815,332,180,917,377,473,52,655,151,445,155,173,291,58,677,355,61,316,492,611,531,0,577,211,857,117,275,436,818,108|873,189,375,613,961,258,728,176,606,737,141,419,435,905,531,952,162,455,856,484,521,577,0,892,557,356,357,309,962,385|4,628,458,409,441,510,937,681,974,203,781,353,475,973,173,446,630,269,714,797,785,211,892,0,836,309,941,985,308,576|840,69,579,854,944,933,422,385,887,596,842,514,587,809,778,364,409,243,296,760,908,857,557,836,0,409,357,987,523,940|347,890,164,718,295,817,308,546,986,554,864,40,248,235,57,284,330,797,358,662,602,117,356,309,409,0,494,509,117,543|540,916,849,78,164,592,5,198,175,600,553,267,908,647,963,891,666,189,219,792,252,275,357,941,357,494,0,623,232,185|406,434,456,915,140,885,258,487,185,61,783,113,339,244,289,814,546,466,226,177,405,436,309,985,987,509,623,0,227,915|204,36,982,909,287,405,266,354,437,70,178,357,712,25,331,484,368,363,11,64,535,818,962,308,523,117,232,227,0,227|593,791,764,119,151,652,453,911,954,655,312,523,497,713,688,677,365,951,655,933,589,108,385,576,940,543,185,915,227,0|]; -goldInHouse = [0,0,3,58,67,5,11,46,62,27,92,8,52,60,62,52,69,76,62,48,75,69,22,3,39,3,33,23,69,41]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_medium_5.dzn b/data/instances/competition/mario/mario_medium_5.dzn deleted file mode 100644 index 36948074..00000000 --- a/data/instances/competition/mario/mario_medium_5.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 30; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 3000; -conso = [|0,897,18,694,884,901,521,570,338,544,464,166,60,149,312,685,618,795,43,803,603,61,233,961,271,952,680,36,929,143|0,0,664,137,658,711,825,541,806,189,108,913,726,376,490,374,71,708,639,290,608,810,519,985,361,942,527,500,782,11|18,664,0,980,389,86,419,250,861,665,859,593,146,139,108,903,209,447,531,406,871,211,353,72,882,79,133,814,336,372|694,137,980,0,431,618,77,501,178,547,568,622,440,620,720,517,805,893,210,212,315,250,168,593,548,629,184,494,352,35|884,658,389,431,0,853,611,512,405,19,320,277,962,88,448,650,704,564,314,527,163,104,678,530,258,115,668,841,449,581|901,711,86,618,853,0,877,263,201,981,948,214,499,374,113,401,979,157,798,552,841,675,708,492,952,485,481,523,426,696|521,825,419,77,611,877,0,497,583,639,879,384,711,437,665,314,676,729,109,981,409,200,924,935,68,195,404,54,659,825|570,541,250,501,512,263,497,0,481,615,701,137,787,869,732,229,934,337,16,480,443,221,936,577,580,643,494,852,637,630|338,806,861,178,405,201,583,481,0,351,365,424,683,129,314,770,455,845,465,266,221,96,824,274,749,698,731,715,362,366|544,189,665,547,19,981,639,615,351,0,530,385,932,897,436,536,374,9,364,492,187,884,209,983,410,233,28,590,678,0|464,108,859,568,320,948,879,701,365,530,0,23,60,17,335,639,565,237,14,80,821,925,638,894,433,624,546,745,426,188|166,913,593,622,277,214,384,137,424,385,23,0,596,212,68,723,486,749,979,56,434,454,835,704,278,873,10,372,933,997|60,726,146,440,962,499,711,787,683,932,60,596,0,678,565,303,552,657,993,307,118,655,207,183,515,429,429,91,327,545|149,376,139,620,88,374,437,869,129,897,17,212,678,0,512,601,900,829,621,16,226,480,718,111,688,100,714,570,968,324|312,490,108,720,448,113,665,732,314,436,335,68,565,512,0,491,242,922,424,883,532,588,191,472,803,362,862,409,301,337|685,374,903,517,650,401,314,229,770,536,639,723,303,601,491,0,340,277,72,833,18,607,523,831,758,286,509,453,394,233|618,71,209,805,704,979,676,934,455,374,565,486,552,900,242,340,0,523,96,451,897,594,136,897,941,912,517,24,901,246|795,708,447,893,564,157,729,337,845,9,237,749,657,829,922,277,523,0,608,899,882,610,402,638,44,855,350,3,439,181|43,639,531,210,314,798,109,16,465,364,14,979,993,621,424,72,96,608,0,333,200,243,100,554,72,762,371,977,666,938|803,290,406,212,527,552,981,480,266,492,80,56,307,16,883,833,451,899,333,0,976,758,556,0,631,503,19,548,772,779|603,608,871,315,163,841,409,443,221,187,821,434,118,226,532,18,897,882,200,976,0,918,521,255,997,71,568,29,570,352|61,810,211,250,104,675,200,221,96,884,925,454,655,480,588,607,594,610,243,758,918,0,991,581,240,374,392,196,326,157|233,519,353,168,678,708,924,936,824,209,638,835,207,718,191,523,136,402,100,556,521,991,0,211,989,521,985,354,568,547|961,985,72,593,530,492,935,577,274,983,894,704,183,111,472,831,897,638,554,0,255,581,211,0,376,403,909,331,731,287|271,361,882,548,258,952,68,580,749,410,433,278,515,688,803,758,941,44,72,631,997,240,989,376,0,979,693,436,648,864|952,942,79,629,115,485,195,643,698,233,624,873,429,100,362,286,912,855,762,503,71,374,521,403,979,0,638,466,457,383|680,527,133,184,668,481,404,494,731,28,546,10,429,714,862,509,517,350,371,19,568,392,985,909,693,638,0,394,779,818|36,500,814,494,841,523,54,852,715,590,745,372,91,570,409,453,24,3,977,548,29,196,354,331,436,466,394,0,321,760|929,782,336,352,449,426,659,637,362,678,426,933,327,968,301,394,901,439,666,772,570,326,568,731,648,457,779,321,0,785|143,11,372,35,581,696,825,630,366,0,188,997,545,324,337,233,246,181,938,779,352,157,547,287,864,383,818,760,785,0|]; -goldInHouse = [0,0,74,24,6,5,54,91,22,21,31,3,47,60,28,90,78,15,17,17,8,65,8,56,61,2,80,47,15,20]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_n_medium_1.dzn b/data/instances/competition/mario/mario_n_medium_1.dzn deleted file mode 100644 index ac4c1aa3..00000000 --- a/data/instances/competition/mario/mario_n_medium_1.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 30; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 3000; -conso = [|0,1992,2294,923,156,2127,2452,2217,803,2489,874,784,1736,158,631,281,617,296,631,1798,1094,188,166,2155,2049,1337,979,149,76,1218|0,0,651,1602,1427,1900,3,681,1977,1344,410,1537,1417,2207,830,1738,368,738,296,2110,2444,2250,1178,726,1166,1838,2027,1268,172,1679|2294,651,0,1614,1752,1942,1800,575,243,1841,2299,998,1454,2257,2432,264,1929,1358,1307,529,2261,2043,1096,865,1000,2398,1344,281,1620,2354|923,1602,1614,0,2242,2034,689,2347,2379,405,2308,1763,1187,310,1526,1912,1050,300,218,825,1837,1616,547,787,1247,1312,754,2271,1451,2273|156,1427,1752,2242,0,2483,1590,2075,416,928,2183,688,1872,1725,1284,1004,601,2245,1538,1558,1048,2310,1349,1117,9,264,1635,775,852,2147|2127,1900,1942,2034,2483,0,928,2432,645,2008,218,144,1014,755,2181,1931,795,1339,2047,946,731,1497,921,1411,1048,1350,1637,1078,1532,153|2452,3,1800,689,1590,928,0,2178,1424,2078,2478,2174,2141,523,1445,873,444,1967,1888,1154,1371,1517,348,1685,1885,1614,1347,354,220,170|2217,681,575,2347,2075,2432,2178,0,967,1103,1499,293,764,1354,1051,599,345,1630,1519,16,402,1716,1090,657,854,633,98,303,1941,69|803,1977,243,2379,416,645,1424,967,0,51,633,2366,208,2359,1672,1747,1995,418,489,634,1849,1941,2381,187,1900,977,1944,1484,986,2470|2489,1344,1841,405,928,2008,2078,1103,51,0,79,2075,1838,415,634,1833,837,875,1860,973,9,1469,804,1012,393,1970,119,39,2434,1548|874,410,2299,2308,2183,218,2478,1499,633,79,0,824,1979,481,1288,1823,2469,1455,754,49,1924,292,280,2251,849,1462,82,1567,1083,2385|784,1537,998,1763,688,144,2174,293,2366,2075,824,0,125,1207,1749,1108,1693,399,2451,1921,2010,825,426,2105,1702,1351,96,164,2053,2076|1736,1417,1454,1187,1872,1014,2141,764,208,1838,1979,125,0,1334,910,854,151,442,114,68,2079,2320,304,882,2014,618,185,888,1494,2031|158,2207,2257,310,1725,755,523,1354,2359,415,481,1207,1334,0,1840,1147,305,247,2102,2083,952,1510,485,722,1106,247,2262,1814,1166,381|631,830,2432,1526,1284,2181,1445,1051,1672,634,1288,1749,910,1840,0,1804,1653,533,1161,103,458,1889,2049,15,2231,1501,2484,1644,379,2324|281,1738,264,1912,1004,1931,873,599,1747,1833,1823,1108,854,1147,1804,0,1551,763,581,1259,904,1494,133,726,1810,697,1452,2238,1211,499|617,368,1929,1050,601,795,444,345,1995,837,2469,1693,151,305,1653,1551,0,1655,624,243,1357,1634,1281,251,683,781,1635,749,99,2277|296,738,1358,300,2245,1339,1967,1630,418,875,1455,399,442,247,533,763,1655,0,2098,1404,392,1082,386,2228,955,2231,2441,2134,812,652|631,296,1307,218,1538,2047,1888,1519,489,1860,754,2451,114,2102,1161,581,624,2098,0,384,1834,1950,2128,1837,1066,2186,1907,1963,1943,1540|1798,2110,529,825,1558,946,1154,16,634,973,49,1921,68,2083,103,1259,243,1404,384,0,210,428,2026,947,1039,1703,1424,634,1673,1664|1094,2444,2261,1837,1048,731,1371,402,1849,9,1924,2010,2079,952,458,904,1357,392,1834,210,0,923,1306,267,1603,487,1434,2005,394,77|188,2250,2043,1616,2310,1497,1517,1716,1941,1469,292,825,2320,1510,1889,1494,1634,1082,1950,428,923,0,161,252,418,866,486,2214,270,580|166,1178,1096,547,1349,921,348,1090,2381,804,280,426,304,485,2049,133,1281,386,2128,2026,1306,161,0,2336,654,802,1654,1112,2388,425|2155,726,865,787,1117,1411,1685,657,187,1012,2251,2105,882,722,15,726,251,2228,1837,947,267,252,2336,0,1212,70,86,1694,1455,641|2049,1166,1000,1247,9,1048,1885,854,1900,393,849,1702,2014,1106,2231,1810,683,955,1066,1039,1603,418,654,1212,0,2425,879,252,374,2246|1337,1838,2398,1312,264,1350,1614,633,977,1970,1462,1351,618,247,1501,697,781,2231,2186,1703,487,866,802,70,2425,0,1980,920,927,1878|979,2027,1344,754,1635,1637,1347,98,1944,119,82,96,185,2262,2484,1452,1635,2441,1907,1424,1434,486,1654,86,879,1980,0,1447,2156,711|149,1268,281,2271,775,1078,354,303,1484,39,1567,164,888,1814,1644,2238,749,2134,1963,634,2005,2214,1112,1694,252,920,1447,0,1889,1624|76,172,1620,1451,852,1532,220,1941,986,2434,1083,2053,1494,1166,379,1211,99,812,1943,1673,394,270,2388,1455,374,927,2156,1889,0,707|1218,1679,2354,2273,2147,153,170,69,2470,1548,2385,2076,2031,381,2324,499,2277,652,1540,1664,77,580,425,641,2246,1878,711,1624,707,0|]; -goldInHouse = [0,0,47,13,54,4,34,6,78,48,69,73,17,63,62,34,92,62,96,89,76,32,10,99,74,59,98,53,37,2]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_n_medium_3.dzn b/data/instances/competition/mario/mario_n_medium_3.dzn deleted file mode 100644 index 3f33047d..00000000 --- a/data/instances/competition/mario/mario_n_medium_3.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 30; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 3000; -conso = [|0,1867,1830,2105,1290,2064,1101,2274,782,1229,1980,292,941,1638,1807,1490,1403,2288,1568,443,549,1455,1546,1692,2397,139,956,178,2129,973|0,0,1396,1319,1317,1961,2384,1596,708,1780,2067,2076,1893,1928,1544,316,1037,1135,1571,2464,67,2362,207,769,2210,1578,794,1614,2119,1253|1830,1396,0,623,215,305,1263,212,537,1593,785,2343,1997,1961,1925,854,132,2390,1973,1197,1965,1213,1201,296,1310,997,599,991,1672,1815|2105,1319,623,0,663,1941,599,395,846,835,590,2441,1804,28,1389,634,907,921,63,2222,199,1773,948,1689,2096,2430,900,1201,1736,865|1290,1317,215,663,0,1746,1959,1223,2280,2044,373,2274,1268,888,1366,1943,933,161,1003,427,456,1173,2088,674,941,1164,942,449,1393,2494|2064,1961,305,1941,1746,0,2458,2069,717,2462,1641,1873,896,1239,2218,469,306,900,823,389,1633,489,1172,2177,1633,507,1517,1537,1426,610|1101,2384,1263,599,1959,2458,0,1396,731,1067,1705,1530,397,576,2012,917,496,2039,534,1754,1883,99,42,1020,1154,2177,1854,2051,1432,811|2274,1596,212,395,1223,2069,1396,0,511,2473,460,269,2324,1857,2485,274,1850,2361,670,674,50,709,2289,1176,2379,145,1117,978,527,1478|782,708,537,846,2280,717,731,511,0,887,156,518,708,538,865,407,1174,820,2315,955,672,1541,1292,1188,1913,592,2340,1332,1364,1085|1229,1780,1593,835,2044,2462,1067,2473,887,0,2293,1719,1929,75,744,1167,788,1301,1085,2432,1603,423,944,288,1327,1075,482,1246,1891,1646|1980,2067,785,590,373,1641,1705,460,156,2293,0,295,393,700,262,1935,1748,636,540,1899,1521,2120,1447,1008,1070,164,1940,1757,2341,504|292,2076,2343,2441,2274,1873,1530,269,518,1719,295,0,693,2221,950,2008,1593,574,1203,1899,1560,1245,845,351,2205,361,1381,693,1001,2205|941,1893,1997,1804,1268,896,397,2324,708,1929,393,693,0,1490,2247,2151,1125,1092,2341,2218,2058,499,1447,2344,2377,1066,1903,305,245,1791|1638,1928,1961,28,888,1239,576,1857,538,75,700,2221,1490,0,1545,968,1156,584,2039,267,807,77,1417,1855,1712,246,1250,2008,1452,2329|1807,1544,1925,1389,1366,2218,2012,2485,865,744,262,950,2247,1545,0,1180,2176,2147,874,1212,2183,1186,1922,1020,755,1799,2310,366,530,227|1490,316,854,634,1943,469,917,274,407,1167,1935,2008,2151,968,1180,0,313,1710,2369,2436,1334,232,1133,1976,517,687,1542,1541,987,1369|1403,1037,132,907,933,306,496,1850,1174,788,1748,1593,1125,1156,2176,313,0,2166,816,137,1252,796,1412,2094,1672,2193,556,181,2435,2196|2288,1135,2390,921,161,900,2039,2361,820,1301,636,574,1092,584,2147,1710,2166,0,563,1658,161,2110,1327,2207,128,1939,2311,1946,2257,2001|1568,1571,1973,63,1003,823,534,670,2315,1085,540,1203,2341,2039,874,2369,816,563,0,161,2163,2047,903,138,1508,1987,1823,2062,1170,1476|443,2464,1197,2222,427,389,1754,674,955,2432,1899,1899,2218,267,1212,2436,137,1658,161,0,1933,2194,2345,1757,1681,675,2112,2428,632,610|549,67,1965,199,456,1633,1883,50,672,1603,1521,1560,2058,807,2183,1334,1252,161,2163,1933,0,1487,1308,419,1158,641,529,1383,216,1263|1455,2362,1213,1773,1173,489,99,709,1541,423,2120,1245,499,77,1186,232,796,2110,2047,2194,1487,0,2415,901,327,2081,2402,238,1585,1012|1546,207,1201,948,2088,1172,42,2289,1292,944,1447,845,1447,1417,1922,1133,1412,1327,903,2345,1308,2415,0,740,994,1126,337,887,710,2115|1692,769,296,1689,674,2177,1020,1176,1188,288,1008,351,2344,1855,1020,1976,2094,2207,138,1757,419,901,740,0,1009,2101,2066,1790,19,265|2397,2210,1310,2096,941,1633,1154,2379,1913,1327,1070,2205,2377,1712,755,517,1672,128,1508,1681,1158,327,994,1009,0,2075,1703,2332,427,1951|139,1578,997,2430,1164,507,2177,145,592,1075,164,361,1066,246,1799,687,2193,1939,1987,675,641,2081,1126,2101,2075,0,1260,459,1731,175|956,794,599,900,942,1517,1854,1117,2340,482,1940,1381,1903,1250,2310,1542,556,2311,1823,2112,529,2402,337,2066,1703,1260,0,765,1922,44|178,1614,991,1201,449,1537,2051,978,1332,1246,1757,693,305,2008,366,1541,181,1946,2062,2428,1383,238,887,1790,2332,459,765,0,2094,574|2129,2119,1672,1736,1393,1426,1432,527,1364,1891,2341,1001,245,1452,530,987,2435,2257,1170,632,216,1585,710,19,427,1731,1922,2094,0,416|973,1253,1815,865,2494,610,811,1478,1085,1646,504,2205,1791,2329,227,1369,2196,2001,1476,610,1263,1012,2115,265,1951,175,44,574,416,0|]; -goldInHouse = [0,0,10,81,28,2,49,64,59,61,85,82,77,14,81,6,76,37,86,99,11,92,85,95,78,13,57,59,46,93]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_n_medium_5.dzn b/data/instances/competition/mario/mario_n_medium_5.dzn deleted file mode 100644 index 93d19ec0..00000000 --- a/data/instances/competition/mario/mario_n_medium_5.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 30; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 2000; -goldTotalAmount = 3000; -conso = [|0,2243,46,1737,2212,2253,1302,1427,845,1361,1160,415,151,373,780,1714,1545,1989,107,2008,1508,154,582,2404,678,2380,1701,90,2323,357|0,0,1660,344,1646,1778,2064,1353,2015,473,271,2284,1816,942,1225,935,178,1770,1599,726,1521,2026,1297,2462,902,2356,1318,1251,1956,29|46,1660,0,2450,973,215,1049,625,2153,1663,2149,1482,366,348,272,2259,524,1118,1329,1015,2177,528,884,180,2206,199,332,2036,842,931|1737,344,2450,0,1078,1545,194,1253,445,1368,1421,1555,1100,1550,1800,1292,2013,2234,527,530,787,626,420,1484,1372,1574,461,1235,882,89|2212,1646,973,1078,0,2133,1527,1281,1014,49,802,694,2405,221,1120,1626,1762,1412,785,1319,409,261,1695,1325,646,288,1670,2102,1123,1454|2253,1778,215,1545,2133,0,2192,658,502,2452,2372,537,1249,936,282,1003,2448,394,1996,1382,2104,1688,1770,1231,2380,1214,1202,1308,1067,1741|1302,2064,1049,194,1527,2192,0,1242,1459,1599,2199,962,1778,1092,1664,785,1691,1824,273,2454,1023,501,2310,2338,171,488,1011,135,1648,2064|1427,1353,625,1253,1281,658,1242,0,1204,1538,1752,342,1967,2174,1830,574,2336,844,41,1200,1108,552,2340,1443,1452,1609,1235,2130,1593,1575|845,2015,2153,445,1014,502,1459,1204,0,879,912,1061,1709,324,786,1926,1137,2113,1162,667,554,241,2061,685,1872,1747,1829,1789,905,916|1361,473,1663,1368,49,2452,1599,1538,879,0,1326,963,2331,2244,1090,1340,937,23,910,1230,468,2211,523,2458,1025,584,70,1476,1697,1|1160,271,2149,1421,802,2372,2199,1752,912,1326,0,58,151,43,839,1599,1412,593,36,201,2053,2312,1595,2236,1084,1560,1366,1863,1066,471|415,2284,1482,1555,694,537,962,342,1061,963,58,0,1490,531,170,1809,1215,1873,2448,140,1085,1135,2089,1760,697,2184,26,932,2332,2494|151,1816,366,1100,2405,1249,1778,1967,1709,2331,151,1490,0,1696,1414,759,1380,1643,2483,767,296,1639,517,458,1287,1072,1074,228,817,1364|373,942,348,1550,221,936,1092,2174,324,2244,43,531,1696,0,1282,1504,2251,2072,1552,40,566,1201,1796,279,1720,250,1786,1427,2420,810|780,1225,272,1800,1120,282,1664,1830,786,1090,839,170,1414,1282,0,1228,607,2305,1060,2209,1331,1472,479,1181,2008,906,2157,1024,753,844|1714,935,2259,1292,1626,1003,785,574,1926,1340,1599,1809,759,1504,1228,0,850,694,181,2083,45,1519,1308,2078,1895,715,1272,1134,985,583|1545,178,524,2013,1762,2448,1691,2336,1137,937,1412,1215,1380,2251,607,850,0,1308,240,1129,2242,1485,341,2243,2354,2281,1293,61,2253,616|1989,1770,1118,2234,1412,394,1824,844,2113,23,593,1873,1643,2072,2305,694,1308,0,1520,2249,2206,1526,1005,1596,111,2139,876,9,1099,454|107,1599,1329,527,785,1996,273,41,1162,910,36,2448,2483,1552,1060,181,240,1520,0,832,501,608,252,1385,181,1906,927,2442,1666,2346|2008,726,1015,530,1319,1382,2454,1200,667,1230,201,140,767,40,2209,2083,1129,2249,832,0,2440,1895,1390,1,1579,1257,49,1371,1930,1948|1508,1521,2177,787,409,2104,1023,1108,554,468,2053,1085,296,566,1331,45,2242,2206,501,2440,0,2296,1302,637,2493,178,1422,73,1427,881|154,2026,528,626,261,1688,501,552,241,2211,2312,1135,1639,1201,1472,1519,1485,1526,608,1895,2296,0,2478,1453,600,937,980,492,815,392|582,1297,884,420,1695,1770,2310,2340,2061,523,1595,2089,517,1796,479,1308,341,1005,252,1390,1302,2478,0,529,2473,1302,2463,885,1421,1368|2404,2462,180,1484,1325,1231,2338,1443,685,2458,2236,1760,458,279,1181,2078,2243,1596,1385,1,637,1453,529,0,942,1008,2274,828,1827,717|678,902,2206,1372,646,2380,171,1452,1872,1025,1084,697,1287,1720,2008,1895,2354,111,181,1579,2493,600,2473,942,0,2449,1733,1090,1620,2161|2380,2356,199,1574,288,1214,488,1609,1747,584,1560,2184,1072,250,906,715,2281,2139,1906,1257,178,937,1302,1008,2449,0,1596,1165,1142,959|1701,1318,332,461,1670,1202,1011,1235,1829,70,1366,26,1074,1786,2157,1272,1293,876,927,49,1422,980,2463,2274,1733,1596,0,986,1948,2046|90,1251,2036,1235,2102,1308,135,2130,1789,1476,1863,932,228,1427,1024,1134,61,9,2442,1371,73,492,885,828,1090,1165,986,0,803,1902|2323,1956,842,882,1123,1067,1648,1593,905,1697,1066,2332,817,2420,753,985,2253,1099,1666,1930,1427,815,1421,1827,1620,1142,1948,803,0,1964|357,29,931,89,1454,1741,2064,1575,916,1,471,2494,1364,810,844,583,616,454,2346,1948,881,392,1368,717,2161,959,2046,1902,1964,0|]; -goldInHouse = [0,0,74,24,6,5,54,91,22,21,31,3,47,60,28,90,78,15,17,17,8,65,8,56,61,2,80,47,15,20]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_t_hard_2.dzn b/data/instances/competition/mario/mario_t_hard_2.dzn deleted file mode 100644 index be4bdd25..00000000 --- a/data/instances/competition/mario/mario_t_hard_2.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 100; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 20000; -goldTotalAmount = 10000; -conso = [|0,108,372,40,67,389,350,106,219,347,68,94,86,434,114,14,416,67,399,30,231,178,147,99,142,256,214,62,135,53,362,179,26,307,150,430,324,497,115,367,88,402,155,358,419,342,240,134,83,336,267,259,466,398,31,399,9,258,402,70,473,314,62,194,113,234,356,38,126,194,447,291,136,435,388,133,271,8,23,105,419,131,193,72,92,246,465,108,337,335,102,286,235,403,449,143,167,170,464,296|0,0,166,409,379,122,457,218,304,124,157,257,147,256,111,445,100,28,438,457,432,117,315,0,197,63,294,224,467,209,239,407,313,81,367,397,474,335,270,99,5,201,205,124,176,138,297,153,449,185,71,75,492,471,243,445,26,170,237,386,99,352,11,268,124,463,241,227,29,414,26,193,149,38,432,102,457,104,200,77,417,214,476,401,411,65,141,206,14,209,69,80,222,29,278,315,7,247,89,130|372,166,0,372,136,303,401,279,141,366,109,335,365,415,431,249,475,352,366,131,232,317,359,494,378,17,122,252,160,107,110,300,258,274,486,422,317,175,203,395,324,301,151,29,30,236,108,475,200,239,66,385,200,443,499,159,451,277,13,296,316,391,414,450,186,29,63,204,440,127,279,281,277,91,88,324,159,101,496,85,109,302,89,56,48,90,275,40,314,330,100,47,10,235,86,244,176,37,149,118|40,409,372,0,82,199,352,417,490,120,258,16,183,367,218,146,398,416,20,29,168,164,387,189,105,59,375,85,461,385,268,169,41,46,33,220,122,131,212,208,65,367,203,372,274,202,268,26,419,366,498,384,73,107,491,326,170,77,78,309,206,186,474,210,119,57,134,93,69,415,249,272,68,104,86,317,353,282,352,422,8,339,231,428,283,453,386,371,216,35,414,156,332,150,5,0,236,149,225,489|67,379,136,82,0,38,119,492,371,438,476,143,255,212,259,451,388,25,71,176,134,281,384,182,428,182,49,390,421,168,85,289,352,278,331,301,230,422,231,284,300,282,266,295,173,110,421,68,422,42,271,168,114,311,401,409,226,266,204,270,130,429,286,426,180,135,62,153,90,249,218,219,491,482,403,5,408,99,272,453,338,19,42,371,71,354,408,431,415,151,463,335,248,284,195,259,122,402,114,392|389,122,303,199,38,0,61,81,222,179,13,113,445,397,204,25,79,216,18,112,405,289,334,422,85,62,145,453,91,328,210,285,375,21,73,298,368,491,213,281,441,5,456,499,459,380,9,81,160,310,337,245,35,167,139,350,36,452,303,463,143,489,334,435,381,392,53,209,164,464,47,319,325,345,78,435,219,116,362,425,185,367,316,74,324,380,85,299,277,250,277,71,80,386,185,350,123,224,327,466|350,457,401,352,119,61,0,256,114,282,235,248,274,233,319,9,43,203,321,412,431,157,363,13,400,421,8,260,196,108,52,116,332,295,463,367,236,29,128,238,446,268,186,291,345,215,262,253,365,349,4,339,165,302,345,474,159,35,262,160,262,266,170,326,338,375,334,314,342,129,341,42,102,278,280,450,403,419,76,124,424,164,123,199,194,17,362,269,190,366,440,371,28,477,37,31,176,341,434,132|106,218,279,417,492,81,256,0,272,338,240,223,184,140,468,57,85,25,317,98,242,160,394,208,30,356,219,92,440,287,207,163,341,108,465,361,311,215,391,21,334,244,493,125,75,233,263,488,250,270,105,337,58,496,352,314,169,262,389,435,146,309,267,278,122,419,154,132,82,499,483,257,438,211,484,65,0,486,360,467,409,4,228,64,77,205,245,245,182,171,310,417,266,94,255,110,247,214,56,147|219,304,141,490,371,222,114,272,0,225,234,103,340,482,35,277,358,350,435,143,9,13,165,390,64,50,315,134,461,387,376,347,498,70,284,71,268,371,109,279,34,496,63,285,474,464,220,279,460,37,375,246,20,443,232,299,79,193,289,482,258,282,139,449,235,41,71,12,320,4,148,371,386,112,347,341,279,318,31,448,8,357,191,282,231,339,429,475,385,478,332,106,15,88,298,498,419,84,308,473|347,124,366,120,438,179,282,338,225,0,262,348,444,180,138,200,178,494,150,252,31,263,414,47,366,498,477,284,232,470,452,441,156,114,302,460,96,188,467,50,403,196,86,340,312,114,162,236,327,457,205,432,420,116,360,182,265,492,79,299,265,308,143,295,204,237,381,172,41,321,6,359,172,262,456,32,23,13,283,472,27,178,314,148,266,175,209,178,468,188,170,73,337,210,251,387,489,344,22,46|68,157,109,258,476,13,235,240,234,262,0,33,435,136,499,326,69,447,499,407,330,25,497,310,439,318,289,401,289,206,395,59,203,344,388,346,366,106,466,494,98,391,211,440,257,2,415,10,177,137,154,176,455,170,306,88,283,202,351,197,476,293,470,117,100,338,480,202,205,244,458,340,319,125,179,370,130,183,126,359,241,196,265,44,25,149,135,292,72,276,394,191,129,417,122,71,140,324,107,276|94,257,335,16,143,113,248,223,103,348,33,0,263,428,277,51,309,428,429,208,484,455,384,94,274,210,456,117,316,99,65,494,198,477,393,233,112,463,23,104,471,118,187,460,81,194,215,399,477,196,42,141,150,315,61,263,131,125,155,377,209,450,439,312,358,133,481,253,145,410,254,17,164,415,293,262,21,91,454,443,41,153,95,397,191,315,278,405,441,38,353,2,354,325,149,416,40,435,138,78|86,147,365,183,255,445,274,184,340,444,435,263,0,496,479,318,86,287,145,433,411,208,238,472,148,297,291,9,232,417,330,206,94,91,206,244,351,244,221,236,478,267,441,420,332,326,245,135,450,173,143,438,441,239,47,404,101,493,357,267,274,179,324,225,187,326,443,258,208,412,161,294,95,351,106,287,43,413,36,205,279,186,480,58,146,452,299,247,199,175,185,12,155,373,101,180,447,289,161,259|434,256,415,367,212,397,233,140,482,180,136,428,496,0,293,156,214,425,475,273,73,170,212,482,265,249,162,17,249,131,337,241,229,395,342,302,49,423,168,247,350,118,84,381,70,329,115,202,303,413,458,49,36,290,146,262,335,110,346,186,423,46,214,360,234,498,242,320,35,45,356,112,231,463,467,413,177,122,148,456,156,148,3,430,493,7,368,379,23,136,333,275,372,407,305,427,121,387,186,145|114,111,431,218,259,204,319,468,35,138,499,277,479,293,0,449,118,18,438,107,171,39,22,162,175,154,328,422,104,215,149,253,33,332,495,340,288,123,413,169,185,122,324,182,251,434,334,300,217,412,32,154,23,229,84,440,156,340,440,12,436,222,289,52,363,201,492,390,405,442,195,102,105,410,37,334,329,496,499,396,344,249,86,40,398,349,90,97,373,474,130,207,433,351,351,491,331,347,480,226|14,445,249,146,451,25,9,57,277,200,326,51,318,156,449,0,407,276,450,211,83,31,152,389,125,442,439,137,337,470,200,110,188,482,472,471,65,328,173,62,353,15,442,235,227,67,313,216,62,410,449,484,363,211,383,469,311,125,146,263,221,237,490,492,138,181,184,447,138,459,144,333,114,166,275,171,435,303,317,354,279,195,498,297,5,117,257,117,260,300,137,294,227,60,416,81,487,186,391,306|416,100,475,398,388,79,43,85,358,178,69,309,86,214,118,407,0,470,205,13,449,344,203,121,186,249,389,342,202,317,480,41,345,180,149,233,162,247,228,156,38,65,154,490,465,263,8,59,386,77,12,271,329,61,415,481,348,191,404,26,300,320,389,291,118,210,108,141,350,136,217,2,327,345,263,57,393,306,336,348,388,149,371,185,290,267,333,211,72,322,404,159,95,29,425,147,26,144,268,72|67,28,352,416,25,216,203,25,350,494,447,428,287,425,18,276,470,0,452,291,494,232,24,16,427,359,292,329,6,473,412,336,366,1,19,97,234,270,420,438,397,335,95,51,353,434,355,465,7,470,441,173,376,129,319,10,354,69,462,355,89,199,373,460,101,110,25,240,478,22,438,271,355,93,85,426,364,292,91,324,367,363,28,457,319,310,434,79,148,159,284,104,106,161,49,22,336,116,63,178|399,438,366,20,71,18,321,317,435,150,499,429,145,475,438,450,205,452,0,217,488,248,85,123,249,492,82,24,348,167,120,214,139,170,171,6,486,422,162,438,85,337,144,444,176,163,49,400,167,369,345,386,336,152,195,64,262,412,344,295,454,119,406,403,373,66,44,470,474,23,128,7,260,242,452,165,63,138,324,491,291,483,284,454,101,47,370,141,250,378,295,493,331,175,474,426,351,384,87,211|30,457,131,29,176,112,412,98,143,252,407,208,433,273,107,211,13,291,217,0,397,309,361,122,94,318,127,103,327,416,450,151,148,139,244,360,499,469,134,444,332,5,267,380,91,3,140,224,24,37,96,384,192,156,17,129,16,206,426,154,423,3,464,195,266,422,464,177,116,474,42,456,12,310,0,25,373,183,139,467,276,476,296,158,419,480,15,328,227,157,447,323,460,112,174,239,29,266,60,237|231,432,232,168,134,405,431,242,9,31,330,484,411,73,171,83,449,494,488,397,0,441,66,292,254,470,460,131,155,102,154,368,125,183,282,45,357,0,413,313,377,461,343,380,394,282,327,495,7,221,394,140,387,440,197,426,60,162,456,443,40,149,370,31,181,1,290,397,496,442,391,57,377,256,77,216,107,260,152,221,172,322,115,165,384,1,426,377,376,184,393,449,441,379,33,316,135,283,492,196|178,117,317,164,281,289,157,160,13,263,25,455,208,170,39,31,344,232,248,309,441,0,312,211,33,80,121,310,194,300,421,454,147,374,384,28,220,150,428,375,303,421,0,464,451,83,270,303,397,203,327,255,89,100,160,303,437,49,244,205,130,331,377,109,480,259,377,411,210,3,115,359,494,297,354,198,3,435,482,154,32,95,77,458,108,247,317,328,349,238,66,327,418,125,246,313,495,336,14,451|147,315,359,387,384,334,363,394,165,414,497,384,238,212,22,152,203,24,85,361,66,312,0,199,113,272,349,197,359,433,318,20,328,362,419,123,121,298,388,178,164,411,155,463,485,259,78,98,274,134,273,212,48,411,320,430,474,451,43,442,325,97,112,250,255,125,111,123,109,32,321,274,196,290,170,349,75,91,360,160,47,402,274,418,333,396,223,329,144,122,28,238,420,367,468,62,143,156,33,186|99,0,494,189,182,422,13,208,390,47,310,94,472,482,162,389,121,16,123,122,292,211,199,0,307,153,33,100,385,225,305,308,216,239,387,279,259,221,7,435,353,465,42,212,455,459,90,497,319,85,418,40,84,83,226,417,294,392,129,113,441,165,79,340,227,101,326,436,34,25,401,61,48,95,362,391,257,134,289,407,368,149,418,487,102,318,374,39,252,141,299,28,31,301,153,49,333,259,56,197|142,197,378,105,428,85,400,30,64,366,439,274,148,265,175,125,186,427,249,94,254,33,113,307,0,0,247,7,14,392,13,368,271,4,1,226,332,217,250,20,479,417,400,240,490,235,272,488,306,308,95,102,135,14,248,67,118,282,166,182,488,308,142,134,56,339,290,301,268,87,480,21,176,270,137,400,269,231,22,249,286,207,224,115,278,314,216,478,385,147,27,493,8,263,432,393,332,451,189,97|256,63,17,59,182,62,421,356,50,498,318,210,297,249,154,442,249,359,492,318,470,80,272,153,0,0,67,430,359,75,479,312,275,171,471,246,357,92,393,476,35,171,37,301,103,425,385,119,18,253,402,358,171,42,233,343,288,314,364,141,371,67,56,340,288,221,342,494,115,239,81,91,54,87,350,334,370,91,59,211,331,241,62,85,129,175,119,331,357,326,185,158,369,150,249,277,61,433,484,353|214,294,122,375,49,145,8,219,315,477,289,456,291,162,328,439,389,292,82,127,460,121,349,33,247,67,0,339,156,377,381,470,486,316,99,207,158,201,190,233,294,296,455,195,406,113,179,392,74,452,395,39,146,121,387,301,456,3,397,281,405,482,149,14,137,102,330,432,321,467,284,200,435,295,485,242,317,407,92,494,120,215,57,187,424,309,222,317,1,413,398,473,420,95,267,323,88,141,308,8|62,224,252,85,390,453,260,92,134,284,401,117,9,17,422,137,342,329,24,103,131,310,197,100,7,430,339,0,396,35,69,230,133,141,84,313,294,434,380,355,488,276,191,188,21,235,370,201,125,259,470,367,435,381,340,93,294,273,396,491,311,408,294,469,228,257,73,124,395,453,470,495,253,60,191,146,83,419,292,20,111,373,107,456,468,458,262,7,435,203,51,345,290,103,386,250,263,362,103,363|135,467,160,461,421,91,196,440,461,232,289,316,232,249,104,337,202,6,348,327,155,194,359,385,14,359,156,396,0,254,493,171,141,156,271,243,225,348,488,419,103,392,283,438,50,29,201,392,75,60,197,322,310,353,90,341,108,62,250,449,394,166,165,109,414,304,321,116,442,42,362,288,350,459,301,259,451,53,387,459,418,101,227,223,214,472,321,56,168,26,351,294,97,90,353,267,62,366,18,246|53,209,107,385,168,328,108,287,387,470,206,99,417,131,215,470,317,473,167,416,102,300,433,225,392,75,377,35,254,0,223,491,161,322,24,425,130,294,458,291,427,449,203,197,191,402,190,3,31,482,326,115,18,203,129,72,390,409,388,298,486,304,134,53,403,465,426,165,44,74,291,89,378,312,492,117,48,365,261,350,224,79,133,404,319,440,76,159,324,103,289,354,121,36,458,210,65,113,452,316|362,239,110,268,85,210,52,207,376,452,395,65,330,337,149,200,480,412,120,450,154,421,318,305,13,479,381,69,493,223,0,226,100,391,422,99,315,241,336,486,114,443,461,345,239,222,386,230,404,92,278,341,26,424,381,130,108,59,73,393,486,217,354,35,324,180,305,74,47,488,250,412,282,292,36,245,303,464,24,435,85,160,171,287,165,258,217,279,233,45,97,474,301,238,117,496,302,212,80,404|179,407,300,169,289,285,116,163,347,441,59,494,206,241,253,110,41,336,214,151,368,454,20,308,368,312,470,230,171,491,226,0,426,315,401,380,141,316,180,304,362,81,19,246,365,156,445,38,453,235,342,398,359,356,132,349,493,155,88,150,337,69,210,492,175,166,326,428,190,280,411,307,340,299,326,111,53,321,20,357,353,359,253,104,425,305,201,45,187,87,85,479,35,153,459,202,270,87,400,397|26,313,258,41,352,375,332,341,498,156,203,198,94,229,33,188,345,366,139,148,125,147,328,216,271,275,486,133,141,161,100,426,0,131,406,270,213,361,442,274,389,412,245,140,260,80,113,446,450,452,2,32,142,193,311,481,352,230,131,471,175,484,452,324,88,318,348,133,19,154,72,46,442,120,14,497,231,317,10,0,406,228,425,172,377,149,475,187,389,111,271,358,499,332,185,409,71,196,349,325|307,81,274,46,278,21,295,108,70,114,344,477,91,395,332,482,180,1,170,139,183,374,362,239,4,171,316,141,156,322,391,315,131,0,196,242,15,59,316,75,99,347,76,105,141,292,341,329,365,91,402,494,394,99,194,289,422,4,449,30,228,173,295,269,209,328,1,210,43,204,488,118,224,406,176,6,175,397,87,203,242,124,399,53,17,374,403,470,38,193,381,242,3,356,359,492,408,55,340,216|150,367,486,33,331,73,463,465,284,302,388,393,206,342,495,472,149,19,171,244,282,384,419,387,1,471,99,84,271,24,422,401,406,196,0,33,486,427,381,77,386,449,175,376,123,388,29,116,259,414,217,395,252,467,32,269,121,339,97,474,79,65,354,122,419,12,30,141,469,391,376,398,347,350,141,323,348,199,236,340,452,163,6,454,120,440,284,214,100,224,494,90,309,484,44,104,494,459,311,239|430,397,422,220,301,298,367,361,71,460,346,233,244,302,340,471,233,97,6,360,45,28,123,279,226,246,207,313,243,425,99,380,270,242,33,0,228,113,218,99,357,168,118,49,105,462,496,352,447,373,160,467,423,288,410,205,462,64,217,351,295,324,79,304,194,437,468,274,411,361,496,373,60,370,320,354,9,76,285,302,368,200,236,249,308,29,269,410,7,106,415,489,49,444,498,308,345,258,4,411|324,474,317,122,230,368,236,311,268,96,366,112,351,49,288,65,162,234,486,499,357,220,121,259,332,357,158,294,225,130,315,141,213,15,486,228,0,395,31,310,183,292,109,6,130,9,200,367,385,315,341,493,190,472,425,395,49,3,366,455,47,274,278,147,211,261,439,495,349,400,383,476,336,477,203,121,440,284,55,433,285,140,291,231,103,94,413,486,399,118,32,465,446,235,288,480,105,268,279,57|497,335,175,131,422,491,29,215,371,188,106,463,244,423,123,328,247,270,422,469,0,150,298,221,217,92,201,434,348,294,241,316,361,59,427,113,395,0,225,221,136,141,146,107,191,116,384,20,306,484,446,171,119,30,475,359,446,363,350,313,437,249,185,51,151,123,122,288,439,443,3,86,380,307,21,447,259,287,128,473,183,104,445,208,144,31,24,383,94,361,296,162,33,480,274,42,11,316,415,260|115,270,203,212,231,213,128,391,109,467,466,23,221,168,413,173,228,420,162,134,413,428,388,7,250,393,190,380,488,458,336,180,442,316,381,218,31,225,0,446,128,115,261,225,72,87,487,431,18,118,336,491,477,192,487,202,357,159,113,186,390,292,494,379,377,463,338,420,113,454,487,73,472,444,159,37,177,249,164,159,298,6,204,18,2,185,100,42,304,459,249,257,168,138,401,247,144,244,8,38|367,99,395,208,284,281,238,21,279,50,494,104,236,247,169,62,156,438,438,444,313,375,178,435,20,476,233,355,419,291,486,304,274,75,77,99,310,221,446,0,68,177,55,67,279,95,307,146,233,92,123,52,253,170,266,308,244,435,32,303,393,378,172,17,480,70,212,182,118,470,175,277,106,223,179,104,282,467,118,493,434,47,110,454,442,132,406,157,295,206,465,406,463,397,298,293,278,297,153,63|88,5,324,65,300,441,446,334,34,403,98,471,478,350,185,353,38,397,85,332,377,303,164,353,479,35,294,488,103,427,114,362,389,99,386,357,183,136,128,68,0,410,361,44,57,79,448,482,413,412,153,211,162,210,354,402,475,266,272,303,356,155,26,96,98,318,391,442,232,278,125,458,238,96,304,402,394,479,216,246,61,257,13,499,489,18,361,212,269,151,16,5,367,380,187,217,3,6,229,260|402,201,301,367,282,5,268,244,496,196,391,118,267,118,122,15,65,335,337,5,461,421,411,465,417,171,296,276,392,449,443,81,412,347,449,168,292,141,115,177,410,0,248,55,140,473,420,88,341,107,119,477,112,190,157,102,198,269,398,222,4,234,104,288,374,370,145,357,209,305,70,20,23,253,247,358,229,251,332,67,325,227,358,99,42,26,416,58,414,123,385,453,108,366,87,193,82,487,433,239|155,205,151,203,266,456,186,493,63,86,211,187,441,84,324,442,154,95,144,267,343,0,155,42,400,37,455,191,283,203,461,19,245,76,175,118,109,146,261,55,361,248,0,457,194,186,315,120,177,19,195,400,405,67,60,355,183,357,311,300,490,310,261,178,369,470,221,143,318,434,43,114,150,324,206,34,482,176,103,125,95,458,342,153,290,472,231,33,78,409,417,125,198,156,31,477,288,185,400,255|358,124,29,372,295,499,291,125,285,340,440,460,420,381,182,235,490,51,444,380,380,464,463,212,240,301,195,188,438,197,345,246,140,105,376,49,6,107,225,67,44,55,457,0,256,34,149,35,7,319,386,240,383,131,21,194,172,485,386,28,289,208,224,484,341,147,167,225,390,393,393,1,312,401,307,371,126,370,327,232,49,24,254,231,170,67,308,231,103,64,489,82,208,169,252,243,52,53,251,280|419,176,30,274,173,459,345,75,474,312,257,81,332,70,251,227,465,353,176,91,394,451,485,455,490,103,406,21,50,191,239,365,260,141,123,105,130,191,72,279,57,140,194,256,0,34,122,38,242,108,176,25,451,310,427,369,323,385,484,247,315,196,453,476,283,253,115,325,481,481,62,442,339,134,260,78,182,170,254,430,274,224,44,296,119,166,156,128,369,342,55,445,44,271,136,137,394,261,10,339|342,138,236,202,110,380,215,233,464,114,2,194,326,329,434,67,263,434,163,3,282,83,259,459,235,425,113,235,29,402,222,156,80,292,388,462,9,116,87,95,79,473,186,34,34,0,455,166,336,43,456,31,172,436,36,22,126,130,263,377,130,326,432,252,334,223,294,433,21,172,183,117,421,152,30,468,184,402,195,394,98,365,193,284,352,77,356,146,96,369,457,355,206,256,268,435,367,66,241,166|240,297,108,268,421,9,262,263,220,162,415,215,245,115,334,313,8,355,49,140,327,270,78,90,272,385,179,370,201,190,386,445,113,341,29,496,200,384,487,307,448,420,315,149,122,455,0,181,76,287,109,359,308,25,14,75,300,1,288,445,458,3,313,262,397,328,346,147,199,126,269,417,434,121,271,50,490,39,179,53,104,399,114,486,321,427,233,410,47,362,130,267,441,222,101,237,71,295,366,292|134,153,475,26,68,81,253,488,279,236,10,399,135,202,300,216,59,465,400,224,495,303,98,497,488,119,392,201,392,3,230,38,446,329,116,352,367,20,431,146,482,88,120,35,38,166,181,0,428,428,16,101,159,6,391,316,358,467,139,188,425,305,222,163,200,50,400,492,36,52,459,395,351,277,105,280,364,497,370,129,445,151,139,78,149,419,97,135,374,262,280,493,3,417,203,81,40,188,257,230|83,449,200,419,422,160,365,250,460,327,177,477,450,303,217,62,386,7,167,24,7,397,274,319,306,18,74,125,75,31,404,453,450,365,259,447,385,306,18,233,413,341,177,7,242,336,76,428,0,235,61,463,266,127,105,396,397,372,242,142,30,365,305,50,498,38,212,404,219,78,128,234,230,42,197,463,153,333,273,436,213,47,67,494,351,405,370,271,86,382,11,203,114,236,0,247,328,275,217,56|336,185,239,366,42,310,349,270,37,457,137,196,173,413,412,410,77,470,369,37,221,203,134,85,308,253,452,259,60,482,92,235,452,91,414,373,315,484,118,92,412,107,19,319,108,43,287,428,235,0,11,131,5,398,61,401,38,389,178,59,250,338,323,357,120,87,187,417,355,333,29,248,234,479,485,398,432,252,60,459,347,289,331,192,64,372,79,438,357,225,97,291,255,75,53,437,459,20,433,400|267,71,66,498,271,337,4,105,375,205,154,42,143,458,32,449,12,441,345,96,394,327,273,418,95,402,395,470,197,326,278,342,2,402,217,160,341,446,336,123,153,119,195,386,176,456,109,16,61,11,0,69,155,228,296,193,411,188,252,42,185,485,144,124,115,20,145,186,55,476,499,49,51,353,172,36,434,263,151,276,368,9,384,240,4,196,275,163,335,370,53,438,59,405,212,362,486,181,47,50|259,75,385,384,168,245,339,337,246,432,176,141,438,49,154,484,271,173,386,384,140,255,212,40,102,358,39,367,322,115,341,398,32,494,395,467,493,171,491,52,211,477,400,240,25,31,359,101,463,131,69,0,260,448,457,370,338,122,374,308,464,433,355,292,11,432,372,119,205,357,21,308,448,167,282,92,69,406,52,100,406,258,288,357,330,395,487,28,356,21,409,276,168,454,0,301,29,225,329,379|466,492,200,73,114,35,165,58,20,420,455,150,441,36,23,363,329,376,336,192,387,89,48,84,135,171,146,435,310,18,26,359,142,394,252,423,190,119,477,253,162,112,405,383,451,172,308,159,266,5,155,260,0,362,83,417,492,120,112,113,447,244,357,456,62,367,84,226,127,221,57,443,383,352,141,346,52,174,288,492,41,394,125,165,152,418,337,24,167,393,353,372,300,347,246,220,4,9,54,25|398,471,443,107,311,167,302,496,443,116,170,315,239,290,229,211,61,129,152,156,440,100,411,83,14,42,121,381,353,203,424,356,193,99,467,288,472,30,192,170,210,190,67,131,310,436,25,6,127,398,228,448,362,0,16,91,278,175,64,86,178,304,91,72,378,485,339,18,7,195,49,173,177,54,498,129,432,195,351,83,269,323,339,88,109,19,7,157,282,136,117,346,165,412,122,251,451,347,63,317|31,243,499,491,401,139,345,352,232,360,306,61,47,146,84,383,415,319,195,17,197,160,320,226,248,233,387,340,90,129,381,132,311,194,32,410,425,475,487,266,354,157,60,21,427,36,14,391,105,61,296,457,83,16,0,163,7,419,340,42,163,300,313,143,416,211,316,158,254,205,444,268,390,84,114,56,42,392,404,314,412,292,182,285,360,265,172,358,46,249,19,403,183,364,214,402,357,49,329,273|399,445,159,326,409,350,474,314,299,182,88,263,404,262,440,469,481,10,64,129,426,303,430,417,67,343,301,93,341,72,130,349,481,289,269,205,395,359,202,308,402,102,355,194,369,22,75,316,396,401,193,370,417,91,163,0,357,208,185,452,354,21,195,306,312,268,272,499,46,106,446,478,314,177,121,415,183,289,341,170,337,268,279,176,125,484,251,342,436,359,427,208,421,348,283,418,279,377,266,470|9,26,451,170,226,36,159,169,79,265,283,131,101,335,156,311,348,354,262,16,60,437,474,294,118,288,456,294,108,390,108,493,352,422,121,462,49,446,357,244,475,198,183,172,323,126,300,358,397,38,411,338,492,278,7,357,0,9,192,490,271,431,144,161,199,454,185,182,425,323,43,307,289,464,157,389,225,382,222,434,484,329,445,384,185,3,451,410,139,186,338,0,0,300,312,36,273,339,117,379|258,170,277,77,266,452,35,262,193,492,202,125,493,110,340,125,191,69,412,206,162,49,451,392,282,314,3,273,62,409,59,155,230,4,339,64,3,363,159,435,266,269,357,485,385,130,1,467,372,389,188,122,120,175,419,208,9,0,333,151,130,40,242,383,272,451,305,301,489,187,197,13,406,202,356,24,234,368,337,88,27,328,409,0,59,74,101,207,62,120,250,485,471,96,498,177,257,142,40,63|402,237,13,78,204,303,262,389,289,79,351,155,357,346,440,146,404,462,344,426,456,244,43,129,166,364,397,396,250,388,73,88,131,449,97,217,366,350,113,32,272,398,311,386,484,263,288,139,242,178,252,374,112,64,340,185,192,333,0,32,328,158,329,385,406,325,18,411,180,84,439,40,311,138,490,116,280,76,245,160,8,52,447,316,17,178,306,175,494,444,305,444,450,371,470,247,107,421,480,336|70,386,296,309,270,463,160,435,482,299,197,377,267,186,12,263,26,355,295,154,443,205,442,113,182,141,281,491,449,298,393,150,471,30,474,351,455,313,186,303,303,222,300,28,247,377,445,188,142,59,42,308,113,86,42,452,490,151,32,0,323,337,263,292,236,383,477,247,40,345,465,343,64,267,167,11,42,237,114,183,130,110,58,220,109,173,195,271,210,68,280,103,219,267,152,352,80,120,162,368|473,99,316,206,130,143,262,146,258,265,476,209,274,423,436,221,300,89,454,423,40,130,325,441,488,371,405,311,394,486,486,337,175,228,79,295,47,437,390,393,356,4,490,289,315,130,458,425,30,250,185,464,447,178,163,354,271,130,328,323,0,427,301,48,474,171,403,146,118,214,291,158,384,451,423,232,151,30,368,392,358,303,153,216,203,337,431,207,140,319,297,149,160,242,183,144,158,334,24,84|314,352,391,186,429,489,266,309,282,308,293,450,179,46,222,237,320,199,119,3,149,331,97,165,308,67,482,408,166,304,217,69,484,173,65,324,274,249,292,378,155,234,310,208,196,326,3,305,365,338,485,433,244,304,300,21,431,40,158,337,427,0,348,319,281,397,359,452,373,353,235,131,206,489,219,141,258,172,24,69,40,395,156,156,17,53,177,91,492,375,150,120,42,493,102,28,426,495,464,374|62,11,414,474,286,334,170,267,139,143,470,439,324,214,289,490,389,373,406,464,370,377,112,79,142,56,149,294,165,134,354,210,452,295,354,79,278,185,494,172,26,104,261,224,453,432,313,222,305,323,144,355,357,91,313,195,144,242,329,263,301,348,0,393,478,288,394,238,399,236,305,310,462,187,364,346,85,391,104,246,408,217,347,311,101,143,62,32,340,346,401,319,77,246,133,139,327,112,361,309|194,268,450,210,426,435,326,278,449,295,117,312,225,360,52,492,291,460,403,195,31,109,250,340,134,340,14,469,109,53,35,492,324,269,122,304,147,51,379,17,96,288,178,484,476,252,262,163,50,357,124,292,456,72,143,306,161,383,385,292,48,319,393,0,405,151,150,192,112,322,380,222,404,65,258,246,260,363,155,384,420,41,96,436,178,410,282,271,54,78,228,439,395,80,166,277,139,172,396,114|113,124,186,119,180,381,338,122,235,204,100,358,187,234,363,138,118,101,373,266,181,480,255,227,56,288,137,228,414,403,324,175,88,209,419,194,211,151,377,480,98,374,369,341,283,334,397,200,498,120,115,11,62,378,416,312,199,272,406,236,474,281,478,405,0,495,195,102,351,104,104,406,282,498,343,221,215,190,479,68,224,395,320,195,38,94,460,83,488,372,173,303,53,410,321,196,206,11,300,271|234,463,29,57,135,392,375,419,41,237,338,133,326,498,201,181,210,110,66,422,1,259,125,101,339,221,102,257,304,465,180,166,318,328,12,437,261,123,463,70,318,370,470,147,253,223,328,50,38,87,20,432,367,485,211,268,454,451,325,383,171,397,288,151,495,0,118,181,230,446,479,181,421,479,366,47,375,417,306,415,2,211,245,69,187,159,212,288,486,170,6,245,328,450,13,56,179,325,402,423|356,241,63,134,62,53,334,154,71,381,480,481,443,242,492,184,108,25,44,464,290,377,111,326,290,342,330,73,321,426,305,326,348,1,30,468,439,122,338,212,391,145,221,167,115,294,346,400,212,187,145,372,84,339,316,272,185,305,18,477,403,359,394,150,195,118,0,212,219,275,175,97,268,270,221,306,21,488,2,223,40,147,144,341,459,130,492,270,349,107,216,229,285,63,25,243,262,387,475,409|38,227,204,93,153,209,314,132,12,172,202,253,258,320,390,447,141,240,470,177,397,411,123,436,301,494,432,124,116,165,74,428,133,210,141,274,495,288,420,182,442,357,143,225,325,433,147,492,404,417,186,119,226,18,158,499,182,301,411,247,146,452,238,192,102,181,212,0,168,115,82,344,423,165,70,247,284,383,327,287,85,485,342,99,404,73,135,168,70,173,459,9,158,497,144,409,260,202,88,26|126,29,440,69,90,164,342,82,320,41,205,145,208,35,405,138,350,478,474,116,496,210,109,34,268,115,321,395,442,44,47,190,19,43,469,411,349,439,113,118,232,209,318,390,481,21,199,36,219,355,55,205,127,7,254,46,425,489,180,40,118,373,399,112,351,230,219,168,0,306,251,75,36,262,310,245,124,135,187,143,442,62,434,51,452,190,22,75,469,263,463,419,160,448,108,195,411,261,238,111|194,414,127,415,249,464,129,499,4,321,244,410,412,45,442,459,136,22,23,474,442,3,32,25,87,239,467,453,42,74,488,280,154,204,391,361,400,443,454,470,278,305,434,393,481,172,126,52,78,333,476,357,221,195,205,106,323,187,84,345,214,353,236,322,104,446,275,115,306,0,39,108,167,230,147,411,246,430,469,102,176,402,385,251,146,472,250,124,290,174,462,478,114,67,458,380,43,431,371,479|447,26,279,249,218,47,341,483,148,6,458,254,161,356,195,144,217,438,128,42,391,115,321,401,480,81,284,470,362,291,250,411,72,488,376,496,383,3,487,175,125,70,43,393,62,183,269,459,128,29,499,21,57,49,444,446,43,197,439,465,291,235,305,380,104,479,175,82,251,39,0,212,55,139,211,118,199,464,132,144,482,144,308,134,352,311,8,18,220,417,303,7,337,160,6,132,475,470,198,329|291,193,281,272,219,319,42,257,371,359,340,17,294,112,102,333,2,271,7,456,57,359,274,61,21,91,200,495,288,89,412,307,46,118,398,373,476,86,73,277,458,20,114,1,442,117,417,395,234,248,49,308,443,173,268,478,307,13,40,343,158,131,310,222,406,181,97,344,75,108,212,0,459,483,260,327,324,283,298,406,317,275,188,117,148,479,250,404,412,379,434,325,359,227,446,94,184,365,419,228|136,149,277,68,491,325,102,438,386,172,319,164,95,231,105,114,327,355,260,12,377,494,196,48,176,54,435,253,350,378,282,340,442,224,347,60,336,380,472,106,238,23,150,312,339,421,434,351,230,234,51,448,383,177,390,314,289,406,311,64,384,206,462,404,282,421,268,423,36,167,55,459,0,104,449,349,450,472,165,162,496,58,51,31,445,453,377,59,104,84,367,139,228,232,23,75,180,125,450,185|435,38,91,104,482,345,278,211,112,262,125,415,351,463,410,166,345,93,242,310,256,297,290,95,270,87,295,60,459,312,292,299,120,406,350,370,477,307,444,223,96,253,324,401,134,152,121,277,42,479,353,167,352,54,84,177,464,202,138,267,451,489,187,65,498,479,270,165,262,230,139,483,104,0,399,362,219,152,347,369,414,37,241,383,324,407,217,473,90,254,333,275,304,56,401,375,119,28,441,134|388,432,88,86,403,78,280,484,347,456,179,293,106,467,37,275,263,85,452,0,77,354,170,362,137,350,485,191,301,492,36,326,14,176,141,320,203,21,159,179,304,247,206,307,260,30,271,105,197,485,172,282,141,498,114,121,157,356,490,167,423,219,364,258,343,366,221,70,310,147,211,260,449,399,0,314,160,38,115,318,218,226,393,433,315,107,258,163,431,104,242,288,422,405,354,301,392,152,259,333|133,102,324,317,5,435,450,65,341,32,370,262,287,413,334,171,57,426,165,25,216,198,349,391,400,334,242,146,259,117,245,111,497,6,323,354,121,447,37,104,402,358,34,371,78,468,50,280,463,398,36,92,346,129,56,415,389,24,116,11,232,141,346,246,221,47,306,247,245,411,118,327,349,362,314,0,225,101,347,144,92,402,283,381,105,288,240,64,294,351,315,299,283,228,227,241,238,73,197,158|271,457,159,353,408,219,403,0,279,23,130,21,43,177,329,435,393,364,63,373,107,3,75,257,269,370,317,83,451,48,303,53,231,175,348,9,440,259,177,282,394,229,482,126,182,184,490,364,153,432,434,69,52,432,42,183,225,234,280,42,151,258,85,260,215,375,21,284,124,246,199,324,450,219,160,225,0,230,13,20,344,61,388,337,57,53,415,414,318,159,216,90,66,234,353,480,268,432,53,349|8,104,101,282,99,116,419,486,318,13,183,91,413,122,496,303,306,292,138,183,260,435,91,134,231,91,407,419,53,365,464,321,317,397,199,76,284,287,249,467,479,251,176,370,170,402,39,497,333,252,263,406,174,195,392,289,382,368,76,237,30,172,391,363,190,417,488,383,135,430,464,283,472,152,38,101,230,0,242,428,449,349,259,475,154,218,52,425,287,116,422,108,263,472,23,356,427,484,44,195|23,200,496,352,272,362,76,360,31,283,126,454,36,148,499,317,336,91,324,139,152,482,360,289,22,59,92,292,387,261,24,20,10,87,236,285,55,128,164,118,216,332,103,327,254,195,179,370,273,60,151,52,288,351,404,341,222,337,245,114,368,24,104,155,479,306,2,327,187,469,132,298,165,347,115,347,13,242,0,196,101,475,56,357,460,378,421,362,267,456,430,418,295,307,30,121,387,304,126,439|105,77,85,422,453,425,124,467,448,472,359,443,205,456,396,354,348,324,491,467,221,154,160,407,249,211,494,20,459,350,435,357,0,203,340,302,433,473,159,493,246,67,125,232,430,394,53,129,436,459,276,100,492,83,314,170,434,88,160,183,392,69,246,384,68,415,223,287,143,102,144,406,162,369,318,144,20,428,196,0,188,60,69,94,5,99,30,378,211,343,62,340,358,366,285,157,262,149,448,89|419,417,109,8,338,185,424,409,8,27,241,41,279,156,344,279,388,367,291,276,172,32,47,368,286,331,120,111,418,224,85,353,406,242,452,368,285,183,298,434,61,325,95,49,274,98,104,445,213,347,368,406,41,269,412,337,484,27,8,130,358,40,408,420,224,2,40,85,442,176,482,317,496,414,218,92,344,449,101,188,0,240,111,17,4,461,218,46,383,301,489,45,256,458,97,477,273,220,365,383|131,214,302,339,19,367,164,4,357,178,196,153,186,148,249,195,149,363,483,476,322,95,402,149,207,241,215,373,101,79,160,359,228,124,163,200,140,104,6,47,257,227,458,24,224,365,399,151,47,289,9,258,394,323,292,268,329,328,52,110,303,395,217,41,395,211,147,485,62,402,144,275,58,37,226,402,61,349,475,60,240,0,396,65,238,468,357,398,309,18,192,36,498,43,429,177,266,345,22,484|193,476,89,231,42,316,123,228,191,314,265,95,480,3,86,498,371,28,284,296,115,77,274,418,224,62,57,107,227,133,171,253,425,399,6,236,291,445,204,110,13,358,342,254,44,193,114,139,67,331,384,288,125,339,182,279,445,409,447,58,153,156,347,96,320,245,144,342,434,385,308,188,51,241,393,283,388,259,56,69,111,396,0,491,104,312,316,382,110,442,81,123,68,356,349,470,279,204,341,267|72,401,56,428,371,74,199,64,282,148,44,397,58,430,40,297,185,457,454,158,165,458,418,487,115,85,187,456,223,404,287,104,172,53,454,249,231,208,18,454,499,99,153,231,296,284,486,78,494,192,240,357,165,88,285,176,384,0,316,220,216,156,311,436,195,69,341,99,51,251,134,117,31,383,433,381,337,475,357,94,17,65,491,0,318,31,280,443,59,58,78,237,186,487,498,240,306,56,247,91|92,411,48,283,71,324,194,77,231,266,25,191,146,493,398,5,290,319,101,419,384,108,333,102,278,129,424,468,214,319,165,425,377,17,120,308,103,144,2,442,489,42,290,170,119,352,321,149,351,64,4,330,152,109,360,125,185,59,17,109,203,17,101,178,38,187,459,404,452,146,352,148,445,324,315,105,57,154,460,5,4,238,104,318,0,183,372,376,390,416,126,438,383,265,134,187,104,306,222,176|246,65,90,453,354,380,17,205,339,175,149,315,452,7,349,117,267,310,47,480,1,247,396,318,314,175,309,458,472,440,258,305,149,374,440,29,94,31,185,132,18,26,472,67,166,77,427,419,405,372,196,395,418,19,265,484,3,74,178,173,337,53,143,410,94,159,130,73,190,472,311,479,453,407,107,288,53,218,378,99,461,468,312,31,183,0,488,207,58,154,368,453,232,146,201,58,324,47,444,272|465,141,275,386,408,85,362,245,429,209,135,278,299,368,90,257,333,434,370,15,426,317,223,374,216,119,222,262,321,76,217,201,475,403,284,269,413,24,100,406,361,416,231,308,156,356,233,97,370,79,275,487,337,7,172,251,451,101,306,195,431,177,62,282,460,212,492,135,22,250,8,250,377,217,258,240,415,52,421,30,218,357,316,280,372,488,0,119,226,434,15,387,396,374,129,63,24,80,65,17|108,206,40,371,431,299,269,245,475,178,292,405,247,379,97,117,211,79,141,328,377,328,329,39,478,331,317,7,56,159,279,45,187,470,214,410,486,383,42,157,212,58,33,231,128,146,410,135,271,438,163,28,24,157,358,342,410,207,175,271,207,91,32,271,83,288,270,168,75,124,18,404,59,473,163,64,414,425,362,378,46,398,382,443,376,207,119,0,351,205,404,86,121,229,272,62,42,277,410,477|337,14,314,216,415,277,190,182,385,468,72,441,199,23,373,260,72,148,250,227,376,349,144,252,385,357,1,435,168,324,233,187,389,38,100,7,399,94,304,295,269,414,78,103,369,96,47,374,86,357,335,356,167,282,46,436,139,62,494,210,140,492,340,54,488,486,349,70,469,290,220,412,104,90,431,294,318,287,267,211,383,309,110,59,390,58,226,351,0,374,467,194,242,444,111,119,366,233,372,370|335,209,330,35,151,250,366,171,478,188,276,38,175,136,474,300,322,159,378,157,184,238,122,141,147,326,413,203,26,103,45,87,111,193,224,106,118,361,459,206,151,123,409,64,342,369,362,262,382,225,370,21,393,136,249,359,186,120,444,68,319,375,346,78,372,170,107,173,263,174,417,379,84,254,104,351,159,116,456,343,301,18,442,58,416,154,434,205,374,0,197,137,55,412,454,127,192,123,392,385|102,69,100,414,463,277,440,310,332,170,394,353,185,333,130,137,404,284,295,447,393,66,28,299,27,185,398,51,351,289,97,85,271,381,494,415,32,296,249,465,16,385,417,489,55,457,130,280,11,97,53,409,353,117,19,427,338,250,305,280,297,150,401,228,173,6,216,459,463,462,303,434,367,333,242,315,216,422,430,62,489,192,81,78,126,368,15,404,467,197,0,328,241,229,272,204,33,374,369,244|286,80,47,156,335,71,371,417,106,73,191,2,12,275,207,294,159,104,493,323,449,327,238,28,493,158,473,345,294,354,474,479,358,242,90,489,465,162,257,406,5,453,125,82,445,355,267,493,203,291,438,276,372,346,403,208,0,485,444,103,149,120,319,439,303,245,229,9,419,478,7,325,139,275,288,299,90,108,418,340,45,36,123,237,438,453,387,86,194,137,328,0,240,110,146,238,259,158,72,210|235,222,10,332,248,80,28,266,15,337,129,354,155,372,433,227,95,106,331,460,441,418,420,31,8,369,420,290,97,121,301,35,499,3,309,49,446,33,168,463,367,108,198,208,44,206,441,3,114,255,59,168,300,165,183,421,0,471,450,219,160,42,77,395,53,328,285,158,160,114,337,359,228,304,422,283,66,263,295,358,256,498,68,186,383,232,396,121,242,55,241,240,0,335,266,89,332,221,489,223|403,29,235,150,284,386,477,94,88,210,417,325,373,407,351,60,29,161,175,112,379,125,367,301,263,150,95,103,90,36,238,153,332,356,484,444,235,480,138,397,380,366,156,169,271,256,222,417,236,75,405,454,347,412,364,348,300,96,371,267,242,493,246,80,410,450,63,497,448,67,160,227,232,56,405,228,234,472,307,366,458,43,356,487,265,146,374,229,444,412,229,110,335,0,90,401,453,331,224,464|449,278,86,5,195,185,37,255,298,251,122,149,101,305,351,416,425,49,474,174,33,246,468,153,432,249,267,386,353,458,117,459,185,359,44,498,288,274,401,298,187,87,31,252,136,268,101,203,0,53,212,0,246,122,214,283,312,498,470,152,183,102,133,166,321,13,25,144,108,458,6,446,23,401,354,227,353,23,30,285,97,429,349,498,134,201,129,272,111,454,272,146,266,90,0,390,473,193,473,471|143,315,244,0,259,350,31,110,498,387,71,416,180,427,491,81,147,22,426,239,316,313,62,49,393,277,323,250,267,210,496,202,409,492,104,308,480,42,247,293,217,193,477,243,137,435,237,81,247,437,362,301,220,251,402,418,36,177,247,352,144,28,139,277,196,56,243,409,195,380,132,94,75,375,301,241,480,356,121,157,477,177,470,240,187,58,63,62,119,127,204,238,89,401,390,0,33,486,237,460|167,7,176,236,122,123,176,247,419,489,140,40,447,121,331,487,26,336,351,29,135,495,143,333,332,61,88,263,62,65,302,270,71,408,494,345,105,11,144,278,3,82,288,52,394,367,71,40,328,459,486,29,4,451,357,279,273,257,107,80,158,426,327,139,206,179,262,260,411,43,475,184,180,119,392,238,268,427,387,262,273,266,279,306,104,324,24,42,366,192,33,259,332,453,473,33,0,115,415,393|170,247,37,149,402,224,341,214,84,344,324,435,289,387,347,186,144,116,384,266,283,336,156,259,451,433,141,362,366,113,212,87,196,55,459,258,268,316,244,297,6,487,185,53,261,66,295,188,275,20,181,225,9,347,49,377,339,142,421,120,334,495,112,172,11,325,387,202,261,431,470,365,125,28,152,73,432,484,304,149,220,345,204,56,306,47,80,277,233,123,374,158,221,331,193,486,115,0,482,236|464,89,149,225,114,327,434,56,308,22,107,138,161,186,480,391,268,63,87,60,492,14,33,56,189,484,308,103,18,452,80,400,349,340,311,4,279,415,8,153,229,433,400,251,10,241,366,257,217,433,47,329,54,63,329,266,117,40,480,162,24,464,361,396,300,402,475,88,238,371,198,419,450,441,259,197,53,44,126,448,365,22,341,247,222,444,65,410,372,392,369,72,489,224,473,237,415,482,0,284|296,130,118,489,392,466,132,147,473,46,276,78,259,145,226,306,72,178,211,237,196,451,186,197,97,353,8,363,246,316,404,397,325,216,239,411,57,260,38,63,260,239,255,280,339,166,292,230,56,400,50,379,25,317,273,470,379,63,336,368,84,374,309,114,271,423,409,26,111,479,329,228,185,134,333,158,349,195,439,89,383,484,267,91,176,272,17,477,370,385,244,210,223,464,471,460,393,236,284,0|]; -goldInHouse = [0,0,40,67,89,50,6,19,47,68,94,86,34,14,14,16,67,99,30,31,78,47,99,42,56,14,62,35,53,62,79,26,7,50,30,24,97,15,67,88,2,55,58,19,42,40,34,83,36,67,59,66,98,31,99,9,58,2,70,73,14,62,94,13,34,56,38,26,94,47,91,36,35,88,33,71,8,23,5,19,31,93,72,92,46,65,8,37,35,2,86,35,3,49,43,67,70,64,96,66]; \ No newline at end of file diff --git a/data/instances/competition/mario/mario_t_hard_5.dzn b/data/instances/competition/mario/mario_t_hard_5.dzn deleted file mode 100644 index 5c7846ea..00000000 --- a/data/instances/competition/mario/mario_t_hard_5.dzn +++ /dev/null @@ -1,7 +0,0 @@ -nbHouses = 100; -MarioHouse = 1; -LuigiHouse = 2; -fuelMax = 20000; -goldTotalAmount = 10000; -conso = [|0,487,92,474,424,6,105,354,191,222,321,331,303,247,60,428,90,478,215,17,17,308,165,308,356,261,402,180,147,215,320,189,292,57,129,207,30,446,43,69,133,384,451,370,357,41,198,452,42,53,95,425,305,212,137,3,412,59,400,447,431,99,251,307,326,298,465,233,197,44,18,49,236,158,30,355,57,269,360,413,399,165,73,184,363,156,91,388,6,391,237,343,111,200,101,100,85,27,469,54|0,0,60,75,253,340,468,244,149,423,470,264,179,266,55,63,28,98,104,388,311,443,240,253,24,324,70,138,318,23,391,151,292,76,340,205,247,408,385,316,5,405,244,74,499,373,65,6,396,289,492,264,209,377,41,462,261,429,405,117,134,482,485,419,199,399,424,56,185,328,71,383,149,46,409,47,3,121,177,343,477,22,270,296,128,408,77,5,185,435,348,161,148,173,188,82,400,216,105,181|92,60,0,387,404,218,471,261,186,150,259,325,123,419,149,72,352,275,227,325,334,108,483,122,370,245,494,158,78,310,332,153,427,163,488,180,180,374,47,321,460,437,422,47,417,51,169,140,453,394,3,116,302,86,179,198,325,187,72,402,106,125,190,473,168,121,233,226,133,443,480,62,341,118,431,246,397,281,170,270,178,20,394,369,52,364,165,489,393,328,18,261,286,467,35,93,278,35,416,75|474,75,387,0,145,149,457,135,229,64,8,2,145,105,80,132,403,92,58,440,0,72,354,341,121,456,214,110,121,418,163,444,458,362,17,312,314,48,7,188,200,388,363,166,91,39,116,156,291,431,45,268,470,167,117,480,258,485,470,183,487,208,63,86,123,6,232,41,499,412,52,10,193,222,278,252,18,199,409,165,3,216,4,270,363,313,355,385,332,192,380,290,280,3,159,15,99,242,361,397|424,253,404,145,0,92,105,275,487,356,344,147,354,262,457,407,200,374,460,484,130,285,58,447,105,427,271,342,236,384,17,49,156,155,435,399,466,181,240,322,193,331,285,419,473,396,93,107,304,429,422,367,92,158,462,337,194,330,326,61,465,20,84,204,84,242,108,212,274,450,359,65,24,448,231,134,368,298,339,353,381,124,351,62,3,97,166,298,330,434,356,481,228,262,447,33,195,114,330,218|6,340,218,149,92,0,469,344,459,392,146,315,338,184,425,478,103,488,279,127,355,136,157,306,56,493,104,358,198,430,46,0,221,106,493,452,248,295,97,98,149,232,397,58,427,121,142,427,49,464,146,365,317,391,232,193,377,19,197,476,319,56,299,449,384,319,83,63,475,169,109,311,31,277,296,51,406,261,340,465,42,41,107,370,297,82,148,423,86,19,232,101,404,27,239,385,147,478,168,352|105,468,471,457,105,469,0,30,85,104,205,322,345,328,166,138,204,83,472,260,408,209,484,144,284,391,318,257,466,101,52,328,318,338,396,250,18,220,151,98,463,67,156,211,26,136,105,95,465,130,72,216,97,489,465,274,411,223,148,428,234,176,459,168,359,483,371,436,412,452,372,174,383,90,414,188,120,40,382,343,138,239,390,351,298,326,114,14,105,266,428,245,458,342,43,59,281,380,116,347|354,244,261,135,275,344,30,0,470,435,338,323,9,36,128,219,322,116,165,359,233,156,16,379,54,248,278,173,52,202,106,498,227,266,403,442,359,147,493,2,292,361,9,104,372,26,7,46,176,429,211,105,224,466,292,165,262,119,446,22,70,311,394,9,56,232,120,289,266,497,289,293,428,78,203,274,82,233,266,23,247,309,352,461,173,108,205,402,384,499,466,486,48,23,56,208,206,325,170,435|191,149,186,229,487,459,85,470,0,418,89,164,476,441,7,110,121,314,198,425,428,262,215,472,258,45,472,11,200,112,129,293,172,34,456,177,357,431,115,92,304,468,280,226,171,336,259,443,388,375,452,348,423,442,36,350,5,104,196,46,309,229,176,276,145,460,319,143,482,114,1,236,385,114,327,379,490,203,414,101,111,371,50,23,435,426,138,87,181,66,161,95,183,239,165,467,132,118,92,56|222,423,150,64,356,392,104,435,418,0,470,376,152,47,62,300,352,451,157,190,169,93,451,84,411,418,419,110,348,395,339,323,463,168,424,126,19,209,438,379,195,55,148,252,302,92,30,268,123,411,384,472,471,147,492,147,348,22,317,63,434,117,163,159,1,455,30,460,434,219,438,409,403,128,486,55,309,169,274,305,370,342,443,457,140,462,37,40,125,125,176,405,72,174,203,114,445,143,171,142|321,470,259,8,344,146,205,338,89,470,0,366,237,225,267,473,412,39,476,248,46,237,207,127,452,50,442,476,359,263,227,301,273,231,174,355,85,354,319,397,132,10,382,51,354,335,320,217,9,358,75,28,261,91,473,367,325,481,150,444,121,421,420,426,417,396,200,438,399,254,244,406,494,454,455,30,343,178,233,7,137,333,345,491,472,258,29,250,277,225,317,159,126,160,479,306,385,146,123,82|331,264,325,2,147,315,322,323,164,376,366,0,480,195,111,120,265,317,278,166,436,357,467,270,266,23,473,240,183,167,65,27,105,140,68,25,424,135,292,370,206,281,102,34,328,442,153,282,190,486,126,116,216,322,56,340,226,448,183,87,428,337,206,108,103,359,482,306,499,35,86,421,130,177,181,397,110,215,23,321,35,65,423,234,168,182,201,143,188,20,460,245,201,217,317,455,277,214,104,475|303,179,123,145,354,338,345,9,476,152,237,480,0,57,7,371,21,387,466,152,50,99,69,423,37,418,229,362,454,316,244,486,100,204,463,16,33,86,378,368,485,2,386,289,403,496,92,269,464,428,4,409,38,130,165,234,30,458,384,351,171,391,200,259,178,243,341,30,19,149,498,488,426,138,169,458,387,440,205,373,443,33,359,257,31,100,22,80,228,423,461,496,66,38,163,384,283,455,18,394|247,266,419,105,262,184,328,36,441,47,225,195,57,0,379,384,341,328,61,61,300,109,141,306,387,288,46,282,403,466,396,21,496,481,42,261,240,307,46,284,285,468,153,22,78,172,358,199,452,486,219,419,416,117,411,162,490,152,401,383,460,123,386,316,117,300,89,437,389,336,159,459,173,57,469,355,473,213,131,119,178,53,181,125,123,280,176,480,37,98,491,52,22,281,487,382,230,315,241,189|60,55,149,80,457,425,166,128,7,62,267,111,7,379,0,356,334,369,428,244,333,483,26,39,477,214,56,308,389,216,13,379,46,29,87,376,130,229,362,57,303,401,71,366,393,74,247,185,465,117,26,277,218,338,279,332,219,36,378,498,489,15,93,398,143,261,456,244,364,403,344,441,222,275,403,346,441,464,462,352,306,354,91,205,306,48,486,332,3,164,304,255,351,440,256,154,192,44,282,29|428,63,72,132,407,478,138,219,110,300,473,120,371,384,356,0,4,65,97,186,312,398,405,177,116,466,10,337,420,28,72,399,202,155,264,375,85,418,7,196,337,213,78,125,468,490,70,390,401,406,415,32,52,77,421,33,391,401,107,52,224,175,464,396,195,280,215,398,258,214,18,156,396,480,103,397,0,64,340,339,57,132,262,96,348,364,289,410,140,185,234,393,165,292,385,64,139,162,337,55|90,28,352,403,200,103,204,322,121,352,412,265,21,341,334,4,0,306,181,11,275,188,69,28,85,259,297,360,474,422,93,452,28,280,355,463,401,296,382,485,240,191,222,220,466,19,71,365,415,160,6,384,107,449,466,147,12,242,25,481,496,186,350,266,177,228,115,31,49,351,431,322,193,91,177,100,114,158,189,355,62,392,21,57,157,267,21,206,148,52,224,0,380,283,30,185,316,121,394,87|478,98,275,92,374,488,83,116,314,451,39,317,387,328,369,65,306,0,59,37,97,408,497,324,162,423,269,186,129,191,125,275,91,239,32,2,207,432,400,57,311,252,239,390,207,224,367,495,183,57,27,266,220,235,402,319,48,338,275,482,219,102,86,196,459,46,433,62,380,401,187,402,301,138,52,311,387,191,91,488,475,449,60,133,264,283,277,55,183,20,35,25,359,250,95,403,253,281,99,175|215,104,227,58,460,279,472,165,198,157,476,278,466,61,428,97,181,59,0,400,273,339,406,230,458,48,474,23,226,141,414,188,449,330,128,297,244,42,224,59,122,397,45,172,357,110,177,225,90,92,220,2,117,135,210,83,139,434,287,319,41,107,481,221,15,183,70,230,354,18,271,125,468,10,340,151,78,216,201,464,210,48,151,288,251,99,341,275,387,40,306,258,73,443,164,494,407,300,346,492|17,388,325,440,484,127,260,359,425,190,248,166,152,61,244,186,11,37,400,0,86,23,211,192,101,438,428,208,321,402,252,9,404,4,174,404,365,291,67,406,259,358,95,10,480,167,383,100,199,319,121,347,375,207,481,396,398,304,211,479,62,115,345,344,274,339,174,142,374,51,77,68,154,457,306,361,376,61,363,18,96,448,304,463,337,236,64,86,31,493,250,71,5,378,441,333,169,214,100,344|17,311,334,0,130,355,408,233,428,169,46,436,50,300,333,312,275,97,273,86,0,238,151,74,458,214,217,266,348,344,143,147,96,257,230,189,15,224,495,148,189,384,172,77,418,151,1,162,421,184,101,494,452,429,251,239,99,107,357,269,230,372,323,468,354,444,246,289,336,424,109,154,397,376,338,312,422,186,470,131,71,188,215,69,231,355,335,307,243,419,433,13,233,4,443,305,237,402,47,60|308,443,108,72,285,136,209,156,262,93,237,357,99,109,483,398,188,408,339,23,238,0,322,497,356,365,162,55,366,215,416,196,259,85,324,337,396,145,429,325,379,15,399,460,126,327,299,237,1,391,412,167,122,166,309,404,290,302,493,319,493,481,207,360,315,107,238,130,1,333,418,429,147,105,294,346,348,207,465,429,112,424,239,422,115,270,117,416,370,364,133,362,303,144,437,394,89,50,271,108|165,240,483,354,58,157,484,16,215,451,207,467,69,141,26,405,69,497,406,211,151,322,0,110,71,114,321,403,168,340,255,86,62,431,130,36,271,11,224,404,182,469,332,207,67,358,428,438,307,320,187,91,340,202,67,322,6,132,36,67,365,105,329,421,422,304,99,212,13,7,156,56,81,322,270,91,180,341,159,85,281,109,341,100,476,36,138,222,177,169,286,27,18,46,120,184,431,214,96,58|308,253,122,341,447,306,144,379,472,84,127,270,423,306,39,177,28,324,230,192,74,497,110,0,308,99,243,457,374,476,162,392,434,297,253,2,263,292,158,148,343,136,426,465,18,61,391,451,207,210,90,383,491,367,481,161,280,155,405,51,67,335,66,184,118,202,234,201,466,340,408,35,344,314,211,36,123,51,68,200,39,69,377,124,305,36,114,293,268,120,134,299,438,210,251,162,483,216,215,307|356,24,370,121,105,56,284,54,258,411,452,266,37,387,477,116,85,162,458,101,458,356,71,308,0,268,422,365,404,228,46,264,330,366,293,263,440,90,455,337,381,85,304,476,378,472,393,81,377,328,15,346,2,54,308,132,372,198,494,272,393,294,305,362,372,405,481,462,272,101,365,203,442,66,313,233,460,189,350,239,12,13,16,386,208,194,213,369,375,228,264,161,301,438,425,393,485,209,428,368|261,324,245,456,427,493,391,248,45,418,50,23,418,288,214,466,259,423,48,438,214,365,114,99,268,0,332,251,198,7,240,330,489,123,295,110,404,179,301,349,202,251,243,371,59,149,365,286,480,317,428,81,409,84,210,326,398,261,185,340,147,73,198,79,425,1,91,103,53,478,179,232,432,349,213,386,270,77,301,287,405,82,490,486,438,180,471,236,102,197,321,401,350,328,29,22,17,371,444,353|402,70,494,214,271,104,318,278,472,419,442,473,229,46,56,10,297,269,474,428,217,162,321,243,422,332,0,367,312,298,122,440,224,417,386,227,37,223,201,249,226,291,354,186,53,283,494,89,156,358,250,497,241,284,415,29,365,166,35,234,421,24,327,468,377,67,311,373,296,237,111,390,388,87,212,244,446,30,178,15,407,42,489,304,204,468,466,456,144,29,58,112,60,330,203,113,246,63,366,469|180,138,158,110,342,358,257,173,11,110,476,240,362,282,308,337,360,186,23,208,266,55,403,457,365,251,367,0,415,56,164,412,324,2,228,228,64,317,83,288,1,346,400,85,412,293,87,315,486,105,337,467,209,179,205,247,409,449,363,437,117,283,486,29,366,265,83,123,86,332,112,40,153,335,19,450,490,402,358,82,305,134,469,255,474,380,491,197,309,353,168,211,355,87,415,67,194,330,92,240|147,318,78,121,236,198,466,52,200,348,359,183,454,403,389,420,474,129,226,321,348,366,168,374,404,198,312,415,0,234,10,91,10,89,356,361,250,201,92,303,1,108,172,161,34,349,88,179,308,162,127,191,134,189,459,248,240,345,10,392,215,54,135,298,16,416,416,134,429,110,90,414,7,291,435,449,138,254,1,370,368,28,323,44,195,471,177,121,85,29,377,302,232,110,56,430,88,247,125,355|215,23,310,418,384,430,101,202,112,395,263,167,316,466,216,28,422,191,141,402,344,215,340,476,228,7,298,56,234,0,4,125,276,486,58,398,52,322,166,363,211,161,489,55,109,390,465,232,105,302,85,24,43,26,172,99,281,395,126,12,369,375,30,306,243,113,128,341,325,91,38,78,435,370,135,408,113,101,332,173,492,291,411,241,493,421,190,401,189,217,184,341,266,95,91,36,367,189,322,89|320,391,332,163,17,46,52,106,129,339,227,65,244,396,13,72,93,125,414,252,143,416,255,162,46,240,122,164,10,4,0,315,96,115,256,288,382,489,257,172,434,144,21,289,220,234,256,365,82,222,228,181,240,188,480,87,326,351,220,459,59,391,181,2,438,484,244,135,457,65,348,116,176,273,381,149,189,379,225,124,186,477,3,32,328,391,431,215,24,255,489,28,344,217,196,83,317,465,291,332|189,151,153,444,49,0,328,498,293,323,301,27,486,21,379,399,452,275,188,9,147,196,86,392,264,330,440,412,91,125,315,0,450,21,48,186,392,352,193,32,494,382,53,31,332,293,319,391,329,145,329,380,194,494,232,373,50,162,348,164,11,430,88,6,247,93,253,390,25,392,109,321,70,42,2,108,365,288,255,221,219,126,19,61,11,328,301,255,258,371,245,167,175,432,129,66,303,15,76,65|292,292,427,458,156,221,318,227,172,463,273,105,100,496,46,202,28,91,449,404,96,259,62,434,330,489,224,324,10,276,96,450,0,395,206,52,129,51,181,154,192,288,14,52,167,269,69,303,118,248,434,315,10,256,108,113,30,150,462,252,151,161,281,419,249,223,25,306,143,443,201,360,404,305,477,54,29,453,103,219,411,28,231,499,13,80,220,289,443,310,204,189,277,231,96,100,23,468,13,289|57,76,163,362,155,106,338,266,34,168,231,140,204,481,29,155,280,239,330,4,257,85,431,297,366,123,417,2,89,486,115,21,395,0,15,35,487,44,382,104,399,208,269,349,444,41,288,403,295,189,168,117,205,294,208,122,235,266,441,11,240,1,124,127,330,255,147,312,14,354,300,267,32,228,454,403,356,19,44,222,270,296,484,321,5,487,487,87,454,149,47,306,1,128,146,323,440,25,304,296|129,340,488,17,435,493,396,403,456,424,174,68,463,42,87,264,355,32,128,174,230,324,130,253,293,295,386,228,356,58,256,48,206,15,0,464,250,285,175,178,267,342,497,195,376,69,448,197,206,4,259,41,275,434,440,409,442,386,480,122,488,347,356,212,346,49,112,211,445,176,294,427,64,229,248,180,4,162,162,79,216,405,54,140,385,11,394,464,386,275,346,77,78,121,363,133,147,27,452,8|207,205,180,312,399,452,250,442,177,126,355,25,16,261,376,375,463,2,297,404,189,337,36,2,263,110,227,228,361,398,288,186,52,35,464,0,389,47,447,266,329,336,432,124,371,279,307,444,181,187,499,292,470,280,236,212,45,21,241,112,492,286,171,96,352,449,392,115,412,88,167,23,418,291,445,291,322,304,231,385,447,177,55,447,259,379,411,264,363,177,248,344,140,36,361,56,436,348,95,380|30,247,180,314,466,248,18,359,357,19,85,424,33,240,130,85,401,207,244,365,15,396,271,263,440,404,37,64,250,52,382,392,129,487,250,389,0,85,25,249,99,149,125,63,493,36,449,419,421,454,40,188,54,449,51,365,196,447,419,54,348,192,153,484,169,68,203,163,30,112,301,266,205,180,199,161,77,232,127,310,68,236,75,175,437,398,368,177,429,74,490,287,1,266,87,433,339,172,132,182|446,408,374,48,181,295,220,147,431,209,354,135,86,307,229,418,296,432,42,291,224,145,11,292,90,179,223,317,201,322,489,352,51,44,285,47,85,0,394,394,124,285,249,272,44,89,21,92,412,405,378,343,394,204,199,436,73,200,238,123,438,58,96,305,204,114,150,223,95,258,148,89,193,474,488,32,137,70,487,159,53,439,16,179,39,107,126,94,244,480,335,124,140,473,371,305,143,334,303,230|43,385,47,7,240,97,151,493,115,438,319,292,378,46,362,7,382,400,224,67,495,429,224,158,455,301,201,83,92,166,257,193,181,382,175,447,25,394,0,477,465,84,138,102,78,172,445,237,39,232,18,350,9,121,21,299,60,124,116,180,205,152,394,207,106,26,259,131,218,397,241,274,357,110,226,434,184,95,151,360,401,419,303,319,322,449,181,5,134,294,363,77,10,46,392,480,79,483,69,34|69,316,321,188,322,98,98,2,92,379,397,370,368,284,57,196,485,57,59,406,148,325,404,148,337,349,249,288,303,363,172,32,154,104,178,266,249,394,477,0,316,165,127,113,356,65,476,409,440,1,337,264,105,98,432,413,474,117,63,194,319,40,41,303,367,76,188,15,266,380,225,143,128,493,65,266,167,178,56,191,227,336,200,467,213,123,71,246,370,303,418,425,278,269,316,174,157,38,227,283|133,5,460,200,193,149,463,292,304,195,132,206,485,285,303,337,240,311,122,259,189,379,182,343,381,202,226,1,1,211,434,494,192,399,267,329,99,124,465,316,0,160,382,294,150,453,47,326,310,90,373,90,404,1,170,311,177,130,447,366,123,37,153,87,148,486,286,23,94,135,165,400,353,293,313,175,419,195,290,212,277,129,182,235,388,389,2,444,71,172,409,220,364,327,323,30,71,108,11,241|384,405,437,388,331,232,67,361,468,55,10,281,2,468,401,213,191,252,397,358,384,15,469,136,85,251,291,346,108,161,144,382,288,208,342,336,149,285,84,165,160,0,159,253,152,252,296,273,97,123,437,111,311,368,398,303,304,285,459,495,481,25,304,439,487,277,282,217,183,270,355,397,300,217,49,376,39,447,188,348,85,239,70,364,269,269,434,326,364,358,1,475,126,474,197,499,191,258,15,342|451,244,422,363,285,397,156,9,280,148,382,102,386,153,71,78,222,239,45,95,172,399,332,426,304,243,354,400,172,489,21,53,14,269,497,432,125,249,138,127,382,159,0,83,56,27,127,333,208,404,495,306,181,155,414,226,208,433,251,480,149,204,225,426,469,470,210,457,285,446,203,38,341,257,79,339,283,496,23,213,431,488,343,306,245,482,346,288,283,274,42,400,105,409,403,298,430,174,304,406|370,74,47,166,419,58,211,104,226,252,51,34,289,22,366,125,220,390,172,10,77,460,207,465,476,371,186,85,161,55,289,31,52,349,195,124,63,272,102,113,294,253,83,0,239,42,373,408,260,446,63,1,101,170,401,193,23,21,299,222,35,284,150,71,203,385,132,358,225,40,38,96,105,225,216,321,211,389,75,177,290,96,403,267,16,24,153,329,442,115,456,294,325,135,260,154,447,54,387,185|357,499,417,91,473,427,26,372,171,302,354,328,403,78,393,468,466,207,357,480,418,126,67,18,378,59,53,412,34,109,220,332,167,444,376,371,493,44,78,356,150,152,56,239,0,360,286,152,207,150,451,390,383,355,72,51,240,247,85,238,272,92,390,414,97,310,470,365,254,401,19,110,303,293,105,139,77,267,174,138,144,374,92,218,147,476,375,47,254,31,347,324,64,186,433,462,365,330,26,498|41,373,51,39,396,121,136,26,336,92,335,442,496,172,74,490,19,224,110,167,151,327,358,61,472,149,283,293,349,390,234,293,269,41,69,279,36,89,172,65,453,252,27,42,360,0,287,104,29,126,108,497,34,256,42,33,117,216,463,355,161,17,338,106,377,448,471,174,464,486,20,30,493,88,380,443,228,244,496,265,480,65,122,225,473,347,389,135,490,414,368,207,268,323,43,436,287,407,51,456|198,65,169,116,93,142,105,7,259,30,320,153,92,358,247,70,71,367,177,383,1,299,428,391,393,365,494,87,88,465,256,319,69,288,448,307,449,21,445,476,47,296,127,373,286,287,0,402,127,287,355,173,167,283,359,334,262,489,25,45,131,44,379,307,380,469,281,206,448,30,129,26,495,305,23,236,230,210,42,168,372,209,15,446,97,410,87,13,376,287,388,483,300,196,397,262,137,426,271,229|452,6,140,156,107,427,95,46,443,268,217,282,269,199,185,390,365,495,225,100,162,237,438,451,81,286,89,315,179,232,365,391,303,403,197,444,419,92,237,409,326,273,333,408,152,104,402,0,50,390,69,27,121,179,46,349,14,83,147,289,356,206,195,351,476,473,44,405,475,233,41,447,4,376,105,155,169,13,496,138,84,81,419,24,250,134,230,441,122,243,451,431,499,411,466,305,13,403,429,339|42,396,453,291,304,49,465,176,388,123,9,190,464,452,465,401,415,183,90,199,421,1,307,207,377,480,156,486,308,105,82,329,118,295,206,181,421,412,39,440,310,97,208,260,207,29,127,50,0,299,287,137,329,483,197,266,314,85,41,328,377,314,328,464,355,13,212,79,233,136,78,2,81,486,203,434,263,268,53,62,461,382,414,432,404,257,467,488,248,171,346,73,143,71,22,474,317,22,84,477|53,289,394,431,429,464,130,429,375,411,358,486,428,486,117,406,160,57,92,319,184,391,320,210,328,317,358,105,162,302,222,145,248,189,4,187,454,405,232,1,90,123,404,446,150,126,287,390,299,0,304,479,472,236,63,464,338,384,86,265,411,131,265,95,164,13,389,245,361,119,195,343,276,157,384,241,125,447,279,178,23,195,339,107,144,101,28,362,141,7,221,316,377,288,341,179,135,277,403,417|95,492,3,45,422,146,72,211,452,384,75,126,4,219,26,415,6,27,220,121,101,412,187,90,15,428,250,337,127,85,228,329,434,168,259,499,40,378,18,337,373,437,495,63,451,108,355,69,287,304,0,353,436,480,63,360,409,159,478,234,42,143,24,59,62,337,7,291,314,422,219,251,188,217,489,406,474,67,76,343,215,14,83,109,357,340,262,329,404,77,395,449,107,211,73,366,297,115,276,145|425,264,116,268,367,365,216,105,348,472,28,116,409,419,277,32,384,266,2,347,494,167,91,383,346,81,497,467,191,24,181,380,315,117,41,292,188,343,350,264,90,111,306,1,390,497,173,27,137,479,353,0,89,36,191,436,67,18,140,216,475,277,122,210,285,60,189,318,272,401,461,83,103,349,53,126,166,273,252,271,305,48,119,314,120,314,107,460,211,439,256,389,161,317,263,366,197,414,317,19|305,209,302,470,92,317,97,224,423,471,261,216,38,416,218,52,107,220,117,375,452,122,340,491,2,409,241,209,134,43,240,194,10,205,275,470,54,394,9,105,404,311,181,101,383,34,167,121,329,472,436,89,0,332,84,246,159,114,200,434,149,343,15,78,291,134,273,90,174,246,416,158,312,13,372,255,122,227,281,250,126,87,42,8,326,5,26,201,488,132,5,287,137,323,464,434,261,335,38,134|212,377,86,167,158,391,489,466,442,147,91,322,130,117,338,77,449,235,135,207,429,166,202,367,54,84,284,179,189,26,188,494,256,294,434,280,449,204,121,98,1,368,155,170,355,256,283,179,483,236,480,36,332,0,56,391,86,497,395,101,22,327,350,77,79,92,267,200,328,406,481,155,345,348,310,270,101,188,119,80,171,112,465,161,138,383,157,492,352,447,229,326,165,206,311,443,93,207,483,356|137,41,179,117,462,232,465,292,36,492,473,56,165,411,279,421,466,402,210,481,251,309,67,481,308,210,415,205,459,172,480,232,108,208,440,236,51,199,21,432,170,398,414,401,72,42,359,46,197,63,63,191,84,56,0,260,287,125,323,291,178,377,412,43,264,379,188,2,313,179,436,322,397,93,483,458,140,151,397,348,34,355,102,313,71,456,343,24,143,342,123,358,0,254,253,352,349,288,426,316|3,462,198,480,337,193,274,165,350,147,367,340,234,162,332,33,147,319,83,396,239,404,322,161,132,326,29,247,248,99,87,373,113,122,409,212,365,436,299,413,311,303,226,193,51,33,334,349,266,464,360,436,246,391,260,0,312,212,431,221,20,212,42,164,417,188,70,115,136,235,380,302,198,82,220,15,182,208,481,44,340,76,258,115,198,112,394,36,365,339,11,455,212,425,68,186,37,176,260,208|412,261,325,258,194,377,411,262,5,348,325,226,30,490,219,391,12,48,139,398,99,290,6,280,372,398,365,409,240,281,326,50,30,235,442,45,196,73,60,474,177,304,208,23,240,117,262,14,314,338,409,67,159,86,287,312,0,356,87,211,247,403,123,420,207,440,382,292,296,490,239,171,261,286,217,152,432,117,16,280,209,312,18,236,300,417,311,364,44,238,143,306,354,75,477,499,20,216,237,32|59,429,187,485,330,19,223,119,104,22,481,448,458,152,36,401,242,338,434,304,107,302,132,155,198,261,166,449,345,395,351,162,150,266,386,21,447,200,124,117,130,285,433,21,247,216,489,83,85,384,159,18,114,497,125,212,356,0,357,261,196,479,245,303,300,233,279,316,263,406,479,430,105,333,475,268,330,314,297,38,494,469,402,376,447,424,483,48,493,169,33,201,50,287,260,143,293,327,69,384|400,405,72,470,326,197,148,446,196,317,150,183,384,401,378,107,25,275,287,211,357,493,36,405,494,185,35,363,10,126,220,348,462,441,480,241,419,238,116,63,447,459,251,299,85,463,25,147,41,86,478,140,200,395,323,431,87,357,0,85,336,108,296,198,112,185,226,180,341,23,464,29,440,59,322,450,444,263,430,482,387,215,155,93,195,62,103,79,328,325,471,413,98,421,64,479,94,259,124,469|447,117,402,183,61,476,428,22,46,63,444,87,351,383,498,52,481,482,319,479,269,319,67,51,272,340,234,437,392,12,459,164,252,11,122,112,54,123,180,194,366,495,480,222,238,355,45,289,328,265,234,216,434,101,291,221,211,261,85,0,458,493,192,364,283,397,164,264,414,450,171,419,431,478,82,289,474,354,296,64,323,1,185,179,289,309,12,22,16,181,46,54,257,200,389,263,491,180,374,179|431,134,106,487,465,319,234,70,309,434,121,428,171,460,489,224,496,219,41,62,230,493,365,67,393,147,421,117,215,369,59,11,151,240,488,492,348,438,205,319,123,481,149,35,272,161,131,356,377,411,42,475,149,22,178,20,247,196,336,458,0,411,457,180,361,111,240,74,107,217,405,188,378,368,332,269,172,145,361,49,89,136,239,378,365,333,336,33,145,390,244,329,14,63,482,455,465,29,276,448|99,482,125,208,20,56,176,311,229,117,421,337,391,123,15,175,186,102,107,115,372,481,105,335,294,73,24,283,54,375,391,430,161,1,347,286,192,58,152,40,37,25,204,284,92,17,44,206,314,131,143,277,343,327,377,212,403,479,108,493,411,0,58,20,218,312,462,179,478,299,351,266,352,11,458,300,6,114,360,123,499,250,175,66,444,20,298,17,433,349,372,216,6,455,306,490,85,40,207,101|251,485,190,63,84,299,459,394,176,163,420,206,200,386,93,464,350,86,481,345,323,207,329,66,305,198,327,486,135,30,181,88,281,124,356,171,153,96,394,41,153,304,225,150,390,338,379,195,328,265,24,122,15,350,412,42,123,245,296,192,457,58,0,11,432,80,347,315,126,233,443,8,34,467,307,108,106,198,82,366,303,82,259,201,382,317,232,402,184,263,200,83,83,51,28,355,487,392,381,322|307,419,473,86,204,449,168,9,276,159,426,108,259,316,398,396,266,196,221,344,468,360,421,184,362,79,468,29,298,306,2,6,419,127,212,96,484,305,207,303,87,439,426,71,414,106,307,351,464,95,59,210,78,77,43,164,420,303,198,364,180,20,11,0,314,196,206,479,377,152,32,101,243,455,330,77,247,186,282,211,382,198,186,344,282,290,349,320,359,164,38,18,397,313,68,68,243,157,399,181|326,199,168,123,84,384,359,56,145,1,417,103,178,117,143,195,177,459,15,274,354,315,422,118,372,425,377,366,16,243,438,247,249,330,346,352,169,204,106,367,148,487,469,203,97,377,380,476,355,164,62,285,291,79,264,417,207,300,112,283,361,218,432,314,0,67,197,263,406,250,493,310,498,127,158,65,326,328,321,112,99,18,178,23,311,223,39,338,164,65,453,435,337,388,237,431,259,73,122,131|298,399,121,6,242,319,483,232,460,455,396,359,243,300,261,280,228,46,183,339,444,107,304,202,405,1,67,265,416,113,484,93,223,255,49,449,68,114,26,76,486,277,470,385,310,448,469,473,13,13,337,60,134,92,379,188,440,233,185,397,111,312,80,196,67,0,316,215,358,147,483,320,143,278,15,318,256,484,421,311,408,27,313,330,192,388,237,387,332,227,286,295,476,215,18,410,133,118,303,150|465,424,233,232,108,83,371,120,319,30,200,482,341,89,456,215,115,433,70,174,246,238,99,234,481,91,311,83,416,128,244,253,25,147,112,392,203,150,259,188,286,282,210,132,470,471,281,44,212,389,7,189,273,267,188,70,382,279,226,164,240,462,347,206,197,316,0,228,295,353,193,372,58,373,491,271,56,449,45,314,160,41,314,238,456,481,92,320,240,163,135,182,254,16,227,28,253,210,459,332|233,56,226,41,212,63,436,289,143,460,438,306,30,437,244,398,31,62,230,142,289,130,212,201,462,103,373,123,134,341,135,390,306,312,211,115,163,223,131,15,23,217,457,358,365,174,206,405,79,245,291,318,90,200,2,115,292,316,180,264,74,179,315,479,263,215,228,0,264,340,451,269,224,221,206,388,310,83,261,142,496,420,265,407,322,49,219,127,445,31,59,94,252,323,254,442,431,125,182,161|197,185,133,499,274,475,412,266,482,434,399,499,19,389,364,258,49,380,354,374,336,1,13,466,272,53,296,86,429,325,457,25,143,14,445,412,30,95,218,266,94,183,285,225,254,464,448,475,233,361,314,272,174,328,313,136,296,263,341,414,107,478,126,377,406,358,295,264,0,397,444,309,419,201,242,464,329,81,71,34,63,424,201,224,457,31,263,273,0,43,486,132,45,13,245,322,187,382,333,226|44,328,443,412,450,169,452,497,114,219,254,35,149,336,403,214,351,401,18,51,424,333,7,340,101,478,237,332,110,91,65,392,443,354,176,88,112,258,397,380,135,270,446,40,401,486,30,233,136,119,422,401,246,406,179,235,490,406,23,450,217,299,233,152,250,147,353,340,397,0,54,318,281,347,404,425,105,258,31,285,102,365,210,499,297,491,93,85,120,349,364,209,286,367,103,157,240,177,272,191|18,71,480,52,359,109,372,289,1,438,244,86,498,159,344,18,431,187,271,77,109,418,156,408,365,179,111,112,90,38,348,109,201,300,294,167,301,148,241,225,165,355,203,38,19,20,129,41,78,195,219,461,416,481,436,380,239,479,464,171,405,351,443,32,493,483,193,451,444,54,0,298,173,146,11,7,322,310,119,125,498,378,371,278,69,398,431,428,498,338,138,388,283,229,124,0,210,228,405,207|49,383,62,10,65,311,174,293,236,409,406,421,488,459,441,156,322,402,125,68,154,429,56,35,203,232,390,40,414,78,116,321,360,267,427,23,266,89,274,143,400,397,38,96,110,30,26,447,2,343,251,83,158,155,322,302,171,430,29,419,188,266,8,101,310,320,372,269,309,318,298,0,151,188,401,375,326,374,452,347,469,389,96,355,177,290,473,488,178,455,257,241,321,146,493,259,56,189,344,198|236,149,341,193,24,31,383,428,385,403,494,130,426,173,222,396,193,301,468,154,397,147,81,344,442,432,388,153,7,435,176,70,404,32,64,418,205,193,357,128,353,300,341,105,303,493,495,4,81,276,188,103,312,345,397,198,261,105,440,431,378,352,34,243,498,143,58,224,419,281,173,151,0,46,432,123,237,208,15,361,353,132,494,154,471,156,91,240,475,247,410,61,452,437,481,140,248,84,171,470|158,46,118,222,448,277,90,78,114,128,454,177,138,57,275,480,91,138,10,457,376,105,322,314,66,349,87,335,291,370,273,42,305,228,229,291,180,474,110,493,293,217,257,225,293,88,305,376,486,157,217,349,13,348,93,82,286,333,59,478,368,11,467,455,127,278,373,221,201,347,146,188,46,0,378,272,184,453,448,367,98,53,124,481,385,127,275,92,126,204,40,140,474,106,200,160,71,206,274,361|30,409,431,278,231,296,414,203,327,486,455,181,169,469,403,103,177,52,340,306,338,294,270,211,313,213,212,19,435,135,381,2,477,454,248,445,199,488,226,65,313,49,79,216,105,380,23,105,203,384,489,53,372,310,483,220,217,475,322,82,332,458,307,330,158,15,491,206,242,404,11,401,432,378,0,28,490,474,467,486,309,235,317,200,2,437,237,11,54,411,174,335,139,242,442,237,33,355,113,205|355,47,246,252,134,51,188,274,379,55,30,397,458,355,346,397,100,311,151,361,312,346,91,36,233,386,244,450,449,408,149,108,54,403,180,291,161,32,434,266,175,376,339,321,139,443,236,155,434,241,406,126,255,270,458,15,152,268,450,289,269,300,108,77,65,318,271,388,464,425,7,375,123,272,28,0,391,290,240,173,308,322,338,45,196,31,346,255,231,204,29,103,48,86,407,135,254,298,469,0|57,3,397,18,368,406,120,82,490,309,343,110,387,473,441,0,114,387,78,376,422,348,180,123,460,270,446,490,138,113,189,365,29,356,4,322,77,137,184,167,419,39,283,211,77,228,230,169,263,125,474,166,122,101,140,182,432,330,444,474,172,6,106,247,326,256,56,310,329,105,322,326,237,184,490,391,0,104,345,291,208,331,314,389,57,295,390,138,136,411,1,257,316,241,350,388,494,274,303,312|269,121,281,199,298,261,40,233,203,169,178,215,440,213,464,64,158,191,216,61,186,207,341,51,189,77,30,402,254,101,379,288,453,19,162,304,232,70,95,178,195,447,496,389,267,244,210,13,268,447,67,273,227,188,151,208,117,314,263,354,145,114,198,186,328,484,449,83,81,258,310,374,208,453,474,290,104,0,132,10,254,395,250,89,404,309,292,119,173,157,3,69,379,23,241,381,4,180,268,247|360,177,170,409,339,340,382,266,414,274,233,23,205,131,462,340,189,91,201,363,470,465,159,68,350,301,178,358,1,332,225,255,103,44,162,231,127,487,151,56,290,188,23,75,174,496,42,496,53,279,76,252,281,119,397,481,16,297,430,296,361,360,82,282,321,421,45,261,71,31,119,452,15,448,467,240,345,132,0,461,6,31,198,139,283,294,408,33,21,439,73,258,244,247,3,423,299,400,87,357|413,343,270,165,353,465,343,23,101,305,7,321,373,119,352,339,355,488,464,18,131,429,85,200,239,287,15,82,370,173,124,221,219,222,79,385,310,159,360,191,212,348,213,177,138,265,168,138,62,178,343,271,250,80,348,44,280,38,482,64,49,123,366,211,112,311,314,142,34,285,125,347,361,367,486,173,291,10,461,0,465,458,436,96,328,25,390,7,49,408,77,411,408,232,467,311,477,188,156,239|399,477,178,3,381,42,138,247,111,370,137,35,443,178,306,57,62,475,210,96,71,112,281,39,12,405,407,305,368,492,186,219,411,270,216,447,68,53,401,227,277,85,431,290,144,480,372,84,461,23,215,305,126,171,34,340,209,494,387,323,89,499,303,382,99,408,160,496,63,102,498,469,353,98,309,308,208,254,6,465,0,268,149,281,18,193,283,449,390,13,47,229,246,162,269,30,278,486,417,250|165,22,20,216,124,41,239,309,371,342,333,65,33,53,354,132,392,449,48,448,188,424,109,69,13,82,42,134,28,291,477,126,28,296,405,177,236,439,419,336,129,239,488,96,374,65,209,81,382,195,14,48,87,112,355,76,312,469,215,1,136,250,82,198,18,27,41,420,424,365,378,389,132,53,235,322,331,395,31,458,268,0,147,272,25,479,196,235,230,367,58,51,476,50,423,414,397,414,329,408|73,270,394,4,351,107,390,352,50,443,345,423,359,181,91,262,21,60,151,304,215,239,341,377,16,490,489,469,323,411,3,19,231,484,54,55,75,16,303,200,182,70,343,403,92,122,15,419,414,339,83,119,42,465,102,258,18,402,155,185,239,175,259,186,178,313,314,265,201,210,371,96,494,124,317,338,314,250,198,436,149,147,0,34,398,233,31,205,277,248,70,59,317,98,21,54,188,26,362,255|184,296,369,270,62,370,351,461,23,457,491,234,257,125,205,96,57,133,288,463,69,422,100,124,386,486,304,255,44,241,32,61,499,321,140,447,175,179,319,467,235,364,306,267,218,225,446,24,432,107,109,314,8,161,313,115,236,376,93,179,378,66,201,344,23,330,238,407,224,499,278,355,154,481,200,45,389,89,139,96,281,272,34,0,107,230,451,29,0,123,81,434,102,155,442,303,95,451,143,12|363,128,52,363,3,297,298,173,435,140,472,168,31,123,306,348,157,264,251,337,231,115,476,305,208,438,204,474,195,493,328,11,13,5,385,259,437,39,322,213,388,269,245,16,147,473,97,250,404,144,357,120,326,138,71,198,300,447,195,289,365,444,382,282,311,192,456,322,457,297,69,177,471,385,2,196,57,404,283,328,18,25,398,107,0,485,256,332,270,278,170,60,1,432,35,499,210,341,117,144|156,408,364,313,97,82,326,108,426,462,258,182,100,280,48,364,267,283,99,236,355,270,36,36,194,180,468,380,471,421,391,328,80,487,11,379,398,107,449,123,389,269,482,24,476,347,410,134,257,101,340,314,5,383,456,112,417,424,62,309,333,20,317,290,223,388,481,49,31,491,398,290,156,127,437,31,295,309,294,25,193,479,233,230,485,0,282,112,323,329,306,435,19,64,245,248,125,284,460,496|91,77,165,355,166,148,114,205,138,37,29,201,22,176,486,289,21,277,341,64,335,117,138,114,213,471,466,491,177,190,431,301,220,487,394,411,368,126,181,71,2,434,346,153,375,389,87,230,467,28,262,107,26,157,343,394,311,483,103,12,336,298,232,349,39,237,92,219,263,93,431,473,91,275,237,346,390,292,408,390,283,196,31,451,256,282,0,229,475,429,484,139,360,451,329,120,483,347,6,224|388,5,489,385,298,423,14,402,87,40,250,143,80,480,332,410,206,55,275,86,307,416,222,293,369,236,456,197,121,401,215,255,289,87,464,264,177,94,5,246,444,326,288,329,47,135,13,441,488,362,329,460,201,492,24,36,364,48,79,22,33,17,402,320,338,387,320,127,273,85,428,488,240,92,11,255,138,119,33,7,449,235,205,29,332,112,229,0,95,132,256,483,420,69,90,125,57,363,403,65|6,185,393,332,330,86,105,384,181,125,277,188,228,37,3,140,148,183,387,31,243,370,177,268,375,102,144,309,85,189,24,258,443,454,386,363,429,244,134,370,71,364,283,442,254,490,376,122,248,141,404,211,488,352,143,365,44,493,328,16,145,433,184,359,164,332,240,445,0,120,498,178,475,126,54,231,136,173,21,49,390,230,277,0,270,323,475,95,0,218,55,313,3,101,314,275,286,116,84,351|391,435,328,192,434,19,266,499,66,125,225,20,423,98,164,185,52,20,40,493,419,364,169,120,228,197,29,353,29,217,255,371,310,149,275,177,74,480,294,303,172,358,274,115,31,414,287,243,171,7,77,439,132,447,342,339,238,169,325,181,390,349,263,164,65,227,163,31,43,349,338,455,247,204,411,204,411,157,439,408,13,367,248,123,278,329,429,132,218,0,466,251,211,210,163,301,33,497,475,198|237,348,18,380,356,232,428,466,161,176,317,460,461,491,304,234,224,35,306,250,433,133,286,134,264,321,58,168,377,184,489,245,204,47,346,248,490,335,363,418,409,1,42,456,347,368,388,451,346,221,395,256,5,229,123,11,143,33,471,46,244,372,200,38,453,286,135,59,486,364,138,257,410,40,174,29,1,3,73,77,47,58,70,81,170,306,484,256,55,466,0,17,471,405,367,173,421,341,458,466|343,161,261,290,481,101,245,486,95,405,159,245,496,52,255,393,0,25,258,71,13,362,27,299,161,401,112,211,302,341,28,167,189,306,77,344,287,124,77,425,220,475,400,294,324,207,483,431,73,316,449,389,287,326,358,455,306,201,413,54,329,216,83,18,435,295,182,94,132,209,388,241,61,140,335,103,257,69,258,411,229,51,59,434,60,435,139,483,313,251,17,0,486,154,240,58,295,68,436,312|111,148,286,280,228,404,458,48,183,72,126,201,66,22,351,165,380,359,73,5,233,303,18,438,301,350,60,355,232,266,344,175,277,1,78,140,1,140,10,278,364,126,105,325,64,268,300,499,143,377,107,161,137,165,0,212,354,50,98,257,14,6,83,397,337,476,254,252,45,286,283,321,452,474,139,48,316,379,244,408,246,476,317,102,1,19,360,420,3,211,471,486,0,398,124,402,486,248,345,438|200,173,467,3,262,27,342,23,239,174,160,217,38,281,440,292,283,250,443,378,4,144,46,210,438,328,330,87,110,95,217,432,231,128,121,36,266,473,46,269,327,474,409,135,186,323,196,411,71,288,211,317,323,206,254,425,75,287,421,200,63,455,51,313,388,215,16,323,13,367,229,146,437,106,242,86,241,23,247,232,162,50,98,155,432,64,451,69,101,210,405,154,398,0,74,152,423,180,434,417|101,188,35,159,447,239,43,56,165,203,479,317,163,487,256,385,30,95,164,441,443,437,120,251,425,29,203,415,56,91,196,129,96,146,363,361,87,371,392,316,323,197,403,260,433,43,397,466,22,341,73,263,464,311,253,68,477,260,64,389,482,306,28,68,237,18,227,254,245,103,124,493,481,200,442,407,350,241,3,467,269,423,21,442,35,245,329,90,314,163,367,240,124,74,0,498,470,87,291,274|100,82,93,15,33,385,59,208,467,114,306,455,384,382,154,64,185,403,494,333,305,394,184,162,393,22,113,67,430,36,83,66,100,323,133,56,433,305,480,174,30,499,298,154,462,436,262,305,474,179,366,366,434,443,352,186,499,143,479,263,455,490,355,68,431,410,28,442,322,157,0,259,140,160,237,135,388,381,423,311,30,414,54,303,499,248,120,125,275,301,173,58,402,152,498,0,341,18,202,456|85,400,278,99,195,147,281,206,132,445,385,277,283,230,192,139,316,253,407,169,237,89,431,483,485,17,246,194,88,367,317,303,23,440,147,436,339,143,79,157,71,191,430,447,365,287,137,13,317,135,297,197,261,93,349,37,20,293,94,491,465,85,487,243,259,133,253,431,187,240,210,56,248,71,33,254,494,4,299,477,278,397,188,95,210,125,483,57,286,33,421,295,486,423,470,341,0,112,331,112|27,216,35,242,114,478,380,325,118,143,146,214,455,315,44,162,121,281,300,214,402,50,214,216,209,371,63,330,247,189,465,15,468,25,27,348,172,334,483,38,108,258,174,54,330,407,426,403,22,277,115,414,335,207,288,176,216,327,259,180,29,40,392,157,73,118,210,125,382,177,228,189,84,206,355,298,274,180,400,188,486,414,26,451,341,284,347,363,116,497,341,68,248,180,87,18,112,0,225,361|469,105,416,361,330,168,116,170,92,171,123,104,18,241,282,337,394,99,346,100,47,271,96,215,428,444,366,92,125,322,291,76,13,304,452,95,132,303,69,227,11,15,304,387,26,51,271,429,84,403,276,317,38,483,426,260,237,69,124,374,276,207,381,399,122,303,459,182,333,272,405,344,171,274,113,469,303,268,87,156,417,329,362,143,117,460,6,403,84,475,458,436,345,434,291,202,331,225,0,454|54,181,75,397,218,352,347,435,56,142,82,475,394,189,29,55,87,175,492,344,60,108,58,307,368,353,469,240,355,89,332,65,289,296,8,380,182,230,34,283,241,342,406,185,498,456,229,339,477,417,145,19,134,356,316,208,32,384,469,179,448,101,322,181,131,150,332,161,226,191,207,198,470,361,205,0,312,247,357,239,250,408,255,12,144,496,224,65,351,198,466,312,438,417,274,456,112,361,454,0|]; -goldInHouse = [0,0,74,24,6,5,54,91,22,21,31,3,47,60,28,90,78,15,17,17,8,65,8,56,61,2,80,47,15,20,89,92,57,29,7,30,46,43,69,33,84,51,70,57,41,98,52,42,53,95,25,5,12,37,3,12,59,0,47,31,99,51,7,26,98,65,33,97,44,18,49,36,58,30,55,57,69,60,13,99,65,73,84,63,56,91,88,6,91,37,43,11,0,1,0,85,27,69,54,60]; \ No newline at end of file diff --git a/data/instances/competition/racp/j30_13_6_1.25.dzn b/data/instances/competition/racp/j30_13_6_1.25.dzn deleted file mode 100644 index 5f4dd55d..00000000 --- a/data/instances/competition/racp/j30_13_6_1.25.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 44 -% Used factor: 1.250000 -t_max = 55; -n_res = 4; -cost = [4, 10, 4, 1]; -n_tasks = 30; -dur = [7, 10, 7, 9, 2, 3, 8, 2, 3, 6, 8, 9, 2, 3, 8, 6, 9, 8, 1, 2, 7, 10, 1, 1, 5, 7, 6, 3, 5, 1]; -succ = [{4, 8, 14}, {7, 9}, {5, 6, 21}, {15, 17, 25}, {23}, {12, 13, 16}, {10, 24}, {11}, {17}, {18}, {19, 30}, {24}, {14, 18}, {22, 28}, {23}, {28}, {26}, {20, 29}, {23}, {26, 27}, {25}, {29}, {26}, {29}, {27}, {28}, {30}, {}, {}, {}]; -rr = [| 3, 9, 9, 3, 4, 7, 7, 2, 7, 3, 10, 2, 7, 4, 1, 10, 1, 7, 5, 9, 9, 6, 3, 3, 3, 2, 10, 9, 5, 8 - | 8, 9, 4, 1, 9, 4, 1, 6, 10, 9, 6, 10, 5, 8, 6, 5, 8, 6, 7, 1, 1, 6, 8, 8, 6, 4, 5, 1, 7, 3 - | 4, 9, 4, 8, 9, 9, 5, 2, 8, 7, 9, 9, 5, 6, 2, 9, 3, 5, 5, 9, 8, 8, 1, 9, 9, 2, 9, 4, 2, 1 - | 4, 8, 2, 1, 6, 6, 9, 5, 7, 1, 10, 8, 4, 2, 8, 2, 6, 2, 8, 7, 6, 5, 3, 4, 8, 5, 1, 7, 2, 9 - |]; diff --git a/data/instances/competition/racp/j30_14_7_1.25.dzn b/data/instances/competition/racp/j30_14_7_1.25.dzn deleted file mode 100644 index cfc4dc50..00000000 --- a/data/instances/competition/racp/j30_14_7_1.25.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 47 -% Used factor: 1.250000 -t_max = 58; -n_res = 4; -cost = [8, 2, 6, 9]; -n_tasks = 30; -dur = [5, 4, 2, 7, 6, 8, 7, 7, 5, 2, 6, 1, 6, 1, 8, 3, 10, 4, 7, 9, 5, 8, 9, 10, 5, 3, 4, 5, 2, 5]; -succ = [{6, 15, 22}, {5, 8}, {4, 9, 10}, {13, 24}, {22, 27}, {7, 11}, {12, 13, 14}, {15}, {16}, {17}, {29}, {16, 23}, {19, 21}, {28, 29}, {18}, {20, 26}, {18, 21}, {25}, {30}, {21}, {27}, {26}, {25}, {26}, {27}, {29}, {30}, {}, {}, {}]; -rr = [| 4, 1, 4, 6, 7, 8, 9, 1, 4, 1, 3, 4, 9, 9, 6, 5, 6, 7, 4, 6, 7, 4, 7, 9, 8, 7, 6, 6, 7, 10 - | 10, 8, 4, 8, 4, 7, 9, 2, 6, 9, 9, 6, 10, 5, 6, 4, 6, 4, 10, 8, 1, 8, 3, 1, 10, 5, 2, 7, 5, 5 - | 5, 2, 9, 1, 7, 4, 2, 8, 6, 1, 2, 8, 5, 10, 3, 2, 9, 9, 6, 2, 3, 5, 9, 6, 3, 1, 2, 8, 10, 1 - | 9, 1, 8, 10, 5, 5, 2, 9, 9, 1, 6, 6, 6, 9, 6, 3, 8, 3, 8, 10, 2, 8, 5, 7, 8, 2, 10, 4, 9, 8 - |]; diff --git a/data/instances/competition/racp/j30_26_2_1.0.dzn b/data/instances/competition/racp/j30_26_2_1.0.dzn deleted file mode 100644 index 2b3363cb..00000000 --- a/data/instances/competition/racp/j30_26_2_1.0.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 40 -% Used factor: 1.000000 -t_max = 40; -n_res = 4; -cost = [8, 9, 8, 8]; -n_tasks = 30; -dur = [3, 3, 4, 1, 6, 4, 1, 2, 6, 8, 4, 3, 6, 2, 3, 9, 5, 7, 10, 4, 3, 9, 7, 7, 6, 1, 10, 7, 3, 4]; -succ = [{7, 11, 24}, {5, 15, 25}, {4, 12, 14}, {6, 16, 20}, {10, 23}, {24}, {8, 13, 19}, {9, 28}, {12, 14}, {18, 27}, {18}, {17, 27}, {17, 28}, {25}, {18, 21}, {17, 25, 30}, {23}, {22, 26}, {22, 30}, {21, 23, 24}, {22, 27, 29}, {28}, {26}, {26}, {29}, {29}, {30}, {}, {}, {}]; -rr = [| 1, 0, 5, 0, 0, 10, 1, 8, 3, 0, 5, 0, 4, 5, 9, 2, 0, 10, 9, 0, 0, 4, 0, 4, 5, 7, 5, 8, 2, 1 - | 4, 0, 8, 0, 4, 7, 9, 2, 0, 6, 7, 2, 0, 8, 10, 2, 9, 9, 9, 7, 8, 2, 8, 8, 1, 5, 0, 8, 8, 3 - | 5, 0, 5, 10, 3, 10, 0, 7, 0, 4, 3, 3, 4, 0, 10, 9, 7, 0, 7, 0, 2, 2, 3, 8, 0, 3, 5, 0, 7, 2 - | 2, 9, 0, 10, 10, 7, 5, 0, 0, 0, 5, 4, 1, 4, 9, 8, 0, 7, 0, 9, 2, 0, 2, 3, 5, 4, 8, 5, 9, 1 - |]; diff --git a/data/instances/competition/racp/j60_10_6_1.25.dzn b/data/instances/competition/racp/j60_10_6_1.25.dzn deleted file mode 100644 index f88e1f16..00000000 --- a/data/instances/competition/racp/j60_10_6_1.25.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 67 -% Used factor: 1.250000 -t_max = 83; -n_res = 4; -cost = [10, 10, 10, 1]; -n_tasks = 60; -dur = [9, 2, 5, 3, 2, 2, 5, 3, 1, 6, 10, 2, 1, 1, 6, 3, 2, 2, 10, 9, 10, 10, 1, 7, 1, 10, 6, 5, 7, 6, 6, 1, 2, 1, 10, 4, 10, 2, 2, 9, 10, 10, 1, 8, 6, 4, 1, 10, 7, 2, 6, 10, 7, 9, 9, 7, 9, 8, 2, 2]; -succ = [{6, 12, 16}, {4, 9, 11}, {43}, {5}, {8, 13}, {7}, {17, 52}, {10, 23}, {27, 39, 52}, {46}, {32}, {14, 15, 34}, {22, 24, 32}, {20, 25, 26}, {18}, {20}, {19, 28, 36}, {33, 42}, {29, 31}, {21, 59}, {27, 43}, {40}, {41, 45}, {37, 50}, {49}, {44}, {48, 51}, {35}, {30}, {38}, {39}, {49}, {35}, {58}, {45, 56}, {40, 53}, {54}, {55}, {54}, {60}, {44, 51, 52}, {57}, {55}, {47}, {46, 48}, {47}, {57}, {60}, {50, 51}, {57}, {54}, {55}, {60}, {56}, {56}, {58}, {59}, {}, {}, {}]; -rr = [| 3, 4, 0, 5, 6, 0, 5, 5, 0, 8, 10, 5, 5, 6, 8, 2, 8, 1, 0, 0, 9, 4, 8, 3, 6, 5, 8, 4, 2, 9, 1, 10, 0, 3, 1, 10, 0, 0, 0, 10, 4, 9, 0, 3, 0, 4, 4, 5, 0, 8, 7, 10, 4, 7, 8, 8, 0, 1, 10, 3 - | 5, 2, 0, 7, 8, 6, 6, 8, 1, 0, 1, 6, 10, 10, 8, 8, 7, 5, 7, 0, 8, 9, 0, 0, 0, 0, 0, 10, 6, 4, 6, 3, 0, 0, 1, 6, 0, 0, 8, 0, 4, 8, 8, 0, 2, 10, 9, 10, 10, 8, 0, 0, 5, 0, 2, 0, 0, 0, 2, 2 - | 0, 5, 6, 0, 4, 0, 6, 1, 7, 7, 10, 6, 7, 9, 7, 10, 0, 1, 3, 7, 0, 0, 2, 2, 10, 0, 5, 6, 5, 10, 7, 6, 0, 5, 0, 0, 1, 10, 0, 0, 10, 0, 8, 2, 8, 6, 7, 8, 7, 9, 10, 9, 10, 0, 8, 2, 7, 3, 0, 6 - | 0, 2, 10, 4, 10, 6, 3, 0, 6, 2, 9, 6, 0, 2, 9, 8, 8, 10, 10, 3, 5, 6, 5, 9, 8, 3, 6, 7, 0, 6, 3, 9, 3, 0, 6, 10, 0, 2, 3, 4, 8, 4, 0, 1, 1, 8, 5, 0, 2, 5, 0, 0, 6, 4, 3, 3, 2, 0, 9, 3 - |]; diff --git a/data/instances/competition/racp/j60_13_4_1.0.dzn b/data/instances/competition/racp/j60_13_4_1.0.dzn deleted file mode 100644 index 2a4bd930..00000000 --- a/data/instances/competition/racp/j60_13_4_1.0.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 62 -% Used factor: 1.000000 -t_max = 62; -n_res = 4; -cost = [6, 7, 7, 1]; -n_tasks = 60; -dur = [8, 8, 8, 6, 8, 7, 9, 8, 10, 1, 7, 1, 7, 1, 9, 10, 8, 4, 1, 2, 10, 7, 5, 8, 9, 10, 4, 4, 10, 7, 5, 1, 5, 5, 4, 10, 5, 6, 3, 3, 8, 4, 7, 4, 6, 10, 7, 7, 5, 3, 2, 9, 5, 5, 3, 10, 2, 8, 4, 7]; -succ = [{34, 39}, {4, 9, 24}, {5, 8, 11}, {7, 18}, {6, 13, 27}, {40, 48, 60}, {12, 14, 21}, {10, 17, 22}, {23, 30}, {25}, {28}, {20}, {35, 44}, {15, 16, 45}, {38}, {37, 46}, {19, 26, 29}, {51}, {48}, {27}, {49}, {33, 47}, {54, 57}, {37}, {28, 58}, {49}, {31}, {30}, {32}, {59}, {42, 50}, {38, 55}, {36, 43}, {50}, {55}, {56}, {49}, {52, 59}, {40, 53}, {41}, {56}, {57}, {52, 57}, {58}, {48}, {56}, {52}, {51}, {54}, {53}, {54}, {53}, {60}, {55}, {59}, {58}, {60}, {}, {}, {}]; -rr = [| 9, 10, 6, 5, 9, 2, 6, 4, 2, 4, 1, 4, 1, 10, 1, 5, 10, 9, 3, 8, 9, 3, 4, 2, 10, 8, 10, 4, 3, 10, 6, 2, 7, 8, 8, 10, 2, 3, 4, 2, 5, 8, 3, 1, 9, 9, 7, 10, 9, 2, 1, 1, 2, 2, 7, 2, 8, 2, 6, 10 - | 7, 7, 7, 5, 2, 8, 10, 5, 5, 7, 4, 9, 9, 5, 8, 7, 8, 10, 6, 8, 6, 10, 2, 6, 4, 1, 8, 6, 9, 4, 5, 2, 10, 5, 5, 5, 6, 6, 3, 2, 5, 1, 9, 7, 1, 3, 7, 1, 10, 10, 4, 3, 3, 8, 3, 7, 3, 6, 4, 7 - | 7, 4, 6, 9, 9, 10, 7, 4, 8, 2, 1, 7, 6, 7, 4, 2, 10, 3, 1, 6, 7, 4, 5, 6, 9, 10, 8, 4, 7, 9, 1, 9, 6, 6, 2, 10, 2, 7, 8, 9, 6, 6, 7, 7, 4, 3, 4, 6, 1, 2, 5, 5, 10, 3, 3, 5, 1, 6, 4, 7 - | 6, 8, 1, 8, 5, 10, 7, 5, 1, 4, 9, 9, 9, 4, 7, 2, 3, 7, 1, 5, 4, 7, 4, 7, 6, 7, 7, 5, 10, 7, 4, 10, 1, 2, 4, 8, 7, 3, 3, 4, 10, 1, 6, 2, 2, 2, 8, 6, 10, 4, 2, 9, 8, 5, 5, 1, 1, 3, 3, 8 - |]; diff --git a/data/instances/competition/racp/j60_14_7_1.25.dzn b/data/instances/competition/racp/j60_14_7_1.25.dzn deleted file mode 100644 index a120f773..00000000 --- a/data/instances/competition/racp/j60_14_7_1.25.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 69 -% Used factor: 1.250000 -t_max = 86; -n_res = 4; -cost = [9, 9, 9, 8]; -n_tasks = 60; -dur = [5, 4, 4, 7, 10, 3, 7, 10, 6, 5, 2, 7, 5, 2, 6, 10, 10, 7, 1, 1, 6, 1, 6, 1, 4, 2, 4, 3, 5, 1, 9, 7, 5, 4, 6, 10, 6, 4, 3, 7, 2, 10, 4, 10, 2, 9, 5, 3, 5, 10, 3, 7, 1, 8, 4, 2, 10, 3, 2, 9]; -succ = [{4, 5, 26}, {11, 31, 32}, {10, 12, 40}, {6, 42}, {7, 21, 27}, {9, 14}, {8, 17, 19}, {29, 48}, {37}, {22}, {19, 25}, {13, 15, 30}, {16}, {28, 36}, {16}, {24}, {18}, {41, 45}, {20}, {23, 51}, {29, 34, 52}, {39}, {40}, {37}, {40}, {55}, {35}, {33, 48}, {59}, {44}, {58}, {57}, {56}, {49}, {38, 41}, {51}, {45}, {56}, {43, 46, 53}, {47, 60}, {44}, {43}, {58}, {60}, {49, 50, 57}, {51}, {54, 56}, {54}, {55}, {52, 55}, {52}, {54}, {57}, {58}, {60}, {59}, {59}, {}, {}, {}]; -rr = [| 5, 1, 9, 2, 6, 8, 2, 7, 4, 9, 9, 8, 1, 5, 1, 9, 4, 7, 5, 2, 10, 7, 3, 6, 7, 5, 10, 9, 7, 8, 7, 3, 8, 1, 4, 9, 10, 6, 4, 4, 4, 2, 2, 1, 3, 1, 1, 6, 10, 7, 2, 4, 8, 1, 3, 6, 9, 8, 6, 1 - | 2, 2, 1, 8, 1, 1, 7, 3, 6, 4, 1, 10, 5, 3, 4, 4, 6, 3, 10, 10, 3, 10, 4, 4, 10, 6, 4, 3, 4, 2, 1, 3, 1, 6, 10, 7, 4, 7, 4, 1, 5, 1, 4, 4, 7, 4, 7, 9, 2, 2, 6, 1, 6, 10, 4, 3, 1, 9, 4, 9 - | 10, 6, 6, 2, 6, 4, 6, 10, 10, 1, 4, 3, 3, 10, 7, 4, 9, 5, 6, 8, 7, 7, 2, 7, 3, 7, 10, 10, 8, 5, 8, 1, 8, 5, 5, 7, 9, 6, 1, 4, 10, 4, 2, 3, 6, 1, 4, 3, 1, 7, 8, 3, 9, 9, 1, 3, 1, 7, 2, 3 - | 10, 5, 3, 1, 8, 7, 4, 10, 6, 1, 3, 1, 6, 8, 8, 10, 8, 10, 2, 5, 4, 2, 10, 7, 8, 10, 6, 4, 7, 2, 10, 10, 3, 3, 10, 3, 8, 4, 7, 4, 6, 2, 6, 7, 6, 4, 8, 10, 5, 8, 9, 9, 3, 5, 7, 10, 3, 9, 5, 7 - |]; diff --git a/data/instances/competition/racp/j60_29_10_1.0.dzn b/data/instances/competition/racp/j60_29_10_1.0.dzn deleted file mode 100644 index 1f8c2c31..00000000 --- a/data/instances/competition/racp/j60_29_10_1.0.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 70 -% Used factor: 1.000000 -t_max = 70; -n_res = 4; -cost = [10, 9, 10, 3]; -n_tasks = 60; -dur = [5, 1, 10, 5, 10, 8, 3, 8, 2, 7, 8, 2, 2, 10, 5, 5, 7, 10, 6, 4, 9, 4, 9, 1, 10, 7, 3, 6, 4, 3, 5, 2, 7, 2, 3, 10, 8, 6, 9, 4, 9, 7, 4, 7, 5, 5, 8, 3, 7, 5, 7, 10, 7, 3, 9, 6, 9, 6, 1, 4]; -succ = [{4, 7, 52}, {10, 16, 46}, {12, 14, 23}, {5, 6, 8}, {11, 17, 48}, {13, 41, 44}, {25, 39, 55}, {9, 20, 22}, {13, 15, 21}, {27, 34, 35}, {30, 31, 33}, {18, 25}, {43, 48, 55}, {40, 57}, {24, 39}, {51}, {19, 28, 38}, {20, 56}, {35, 46, 49}, {28, 35}, {32}, {26, 36, 45}, {44}, {29, 49}, {27, 33, 37}, {27, 28, 41}, {48}, {53}, {36, 56}, {42}, {32}, {58}, {36, 40}, {52}, {40}, {54}, {57}, {39}, {42, 47}, {59}, {43, 46}, {53, 56}, {59}, {47}, {47}, {50, 53, 55}, {49, 50}, {59}, {51, 54}, {51}, {58}, {54}, {57}, {60}, {60}, {58}, {60}, {}, {}, {}]; -rr = [| 10, 4, 5, 9, 4, 5, 6, 2, 5, 3, 9, 5, 10, 9, 7, 6, 8, 2, 4, 3, 9, 10, 8, 10, 9, 4, 7, 10, 4, 5, 5, 4, 7, 7, 3, 5, 9, 9, 8, 10, 2, 10, 4, 6, 1, 6, 9, 3, 4, 3, 7, 6, 8, 2, 4, 2, 6, 1, 3, 9 - | 3, 1, 5, 9, 2, 3, 9, 2, 7, 6, 8, 8, 5, 5, 8, 7, 6, 3, 5, 6, 3, 7, 2, 10, 3, 6, 4, 2, 6, 10, 6, 7, 10, 10, 10, 8, 1, 4, 2, 4, 2, 1, 2, 3, 8, 2, 5, 1, 4, 1, 3, 9, 9, 2, 1, 8, 2, 3, 8, 3 - | 2, 9, 1, 1, 7, 1, 6, 1, 5, 3, 10, 1, 9, 9, 1, 10, 4, 8, 2, 1, 1, 9, 9, 3, 6, 10, 8, 1, 5, 9, 1, 2, 6, 8, 2, 2, 4, 7, 5, 10, 5, 3, 9, 1, 10, 1, 10, 2, 8, 9, 10, 1, 8, 5, 6, 7, 5, 7, 9, 3 - | 6, 6, 9, 8, 4, 10, 6, 5, 1, 6, 9, 7, 1, 5, 9, 3, 8, 9, 4, 9, 6, 2, 8, 2, 6, 3, 3, 8, 10, 2, 10, 6, 3, 10, 1, 3, 8, 6, 6, 10, 9, 7, 1, 6, 10, 7, 1, 5, 6, 10, 10, 10, 8, 7, 7, 8, 10, 9, 7, 2 - |]; diff --git a/data/instances/competition/racp/j60_48_9_1.0.dzn b/data/instances/competition/racp/j60_48_9_1.0.dzn deleted file mode 100644 index e272bf48..00000000 --- a/data/instances/competition/racp/j60_48_9_1.0.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 82 -% Used factor: 1.000000 -t_max = 82; -n_res = 4; -cost = [6, 7, 8, 7]; -n_tasks = 60; -dur = [7, 2, 4, 2, 4, 2, 1, 2, 7, 9, 1, 3, 6, 8, 9, 7, 9, 1, 4, 4, 6, 1, 9, 1, 6, 3, 10, 5, 8, 3, 7, 5, 7, 2, 10, 6, 3, 10, 8, 2, 7, 4, 10, 2, 1, 4, 6, 3, 2, 8, 2, 7, 7, 6, 9, 7, 8, 7, 5, 8]; -succ = [{5, 13, 24}, {4, 6, 7}, {12, 19, 21}, {8, 16, 37}, {8, 40, 50}, {20, 29, 58}, {9, 10, 15}, {26, 47, 53}, {11, 14, 18}, {31}, {17, 48}, {25, 27, 42}, {18, 23, 25}, {31, 43, 52}, {23, 28, 32}, {18, 21, 41}, {22, 23, 31}, {32, 36, 44}, {27}, {26, 33, 41}, {42, 59}, {24, 29, 34}, {33, 39, 43}, {26, 33, 36}, {29, 48, 57}, {39, 45, 55}, {30, 32, 46}, {38, 40, 48}, {54}, {35, 45, 47}, {37, 51, 53}, {43, 47, 49}, {38, 42}, {37, 41, 44}, {36, 50, 52}, {39, 58}, {38, 40}, {46}, {59}, {56}, {51}, {46, 54}, {45}, {49, 57}, {60}, {55}, {51, 52, 55}, {49}, {50}, {53}, {54, 59}, {56}, {58}, {60}, {56}, {57}, {60}, {}, {}, {}]; -rr = [| 1, 9, 2, 9, 7, 3, 6, 2, 7, 3, 8, 9, 10, 10, 1, 9, 6, 2, 5, 4, 5, 2, 8, 7, 9, 4, 4, 6, 5, 4, 4, 2, 5, 4, 8, 4, 3, 1, 2, 5, 1, 10, 9, 1, 10, 10, 10, 8, 2, 1, 7, 8, 2, 10, 9, 1, 2, 3, 6, 7 - | 1, 8, 8, 2, 6, 8, 4, 4, 2, 5, 4, 7, 9, 7, 4, 2, 2, 2, 7, 1, 8, 10, 1, 10, 9, 4, 3, 9, 9, 8, 2, 5, 8, 5, 10, 1, 10, 7, 5, 7, 7, 1, 7, 2, 10, 4, 3, 8, 2, 9, 5, 9, 5, 2, 3, 7, 3, 8, 7, 3 - | 3, 10, 8, 9, 7, 7, 3, 4, 5, 3, 8, 3, 4, 10, 1, 4, 8, 6, 4, 2, 7, 8, 3, 3, 5, 8, 8, 10, 4, 3, 5, 3, 5, 2, 2, 1, 8, 7, 8, 6, 6, 5, 1, 5, 5, 5, 3, 2, 3, 3, 1, 5, 6, 7, 9, 3, 3, 7, 3, 4 - | 2, 7, 10, 4, 1, 5, 1, 10, 1, 2, 3, 6, 1, 1, 3, 10, 10, 6, 3, 8, 3, 5, 2, 2, 9, 1, 7, 2, 9, 10, 5, 5, 9, 4, 7, 3, 6, 5, 6, 9, 5, 4, 5, 7, 6, 1, 3, 3, 5, 1, 4, 5, 3, 7, 10, 10, 8, 8, 8, 4 - |]; diff --git a/data/instances/competition/racp/j60_9_9_1.25.dzn b/data/instances/competition/racp/j60_9_9_1.25.dzn deleted file mode 100644 index 7632fad3..00000000 --- a/data/instances/competition/racp/j60_9_9_1.25.dzn +++ /dev/null @@ -1,13 +0,0 @@ -% Earliest project completion wrt. precedence relations: 80 -% Used factor: 1.250000 -t_max = 100; -n_res = 4; -cost = [4, 10, 6, 5]; -n_tasks = 60; -dur = [9, 2, 6, 6, 7, 5, 5, 8, 2, 3, 3, 9, 8, 3, 8, 10, 5, 5, 10, 9, 1, 5, 6, 6, 8, 9, 6, 10, 6, 8, 1, 7, 9, 7, 6, 5, 4, 4, 10, 1, 4, 7, 2, 7, 6, 8, 2, 6, 5, 10, 6, 4, 6, 4, 2, 2, 8, 8, 7, 9]; -succ = [{10, 13, 15}, {4}, {6, 8, 11}, {5, 21, 29}, {7, 32, 37}, {9, 14, 44}, {12, 47}, {28, 45}, {16, 19}, {33, 43}, {31, 42, 53}, {20, 30}, {59}, {23}, {17, 36, 38}, {26, 27, 41}, {18}, {22, 48}, {23}, {22}, {25, 57}, {24}, {39}, {34}, {40}, {28}, {35}, {51, 60}, {34, 49}, {51}, {59}, {46}, {34}, {39, 54, 55}, {40}, {48}, {39}, {56}, {52}, {52}, {55}, {54}, {56}, {52}, {46, 55}, {57}, {51}, {58}, {50, 60}, {53}, {53}, {56}, {54}, {57, 59}, {60}, {58}, {58}, {}, {}, {}]; -rr = [| 0, 0, 5, 9, 0, 0, 3, 2, 1, 9, 5, 0, 1, 2, 1, 3, 0, 9, 0, 9, 0, 3, 9, 6, 9, 8, 7, 9, 0, 2, 5, 0, 5, 7, 4, 4, 5, 9, 0, 1, 2, 2, 9, 0, 2, 4, 5, 7, 6, 9, 8, 0, 8, 6, 2, 5, 8, 10, 7, 2 - | 8, 7, 7, 8, 0, 9, 4, 1, 0, 0, 4, 4, 7, 4, 10, 4, 8, 1, 3, 6, 0, 4, 8, 10, 6, 7, 2, 3, 2, 0, 5, 0, 5, 0, 9, 0, 1, 5, 2, 0, 0, 5, 2, 8, 7, 0, 10, 1, 5, 7, 4, 5, 8, 0, 0, 8, 3, 9, 1, 5 - | 0, 2, 9, 7, 4, 1, 8, 7, 0, 1, 0, 8, 0, 2, 2, 1, 7, 10, 4, 1, 2, 0, 6, 8, 7, 5, 0, 8, 0, 8, 0, 7, 2, 6, 0, 2, 6, 0, 6, 2, 2, 8, 3, 0, 9, 1, 2, 3, 0, 0, 1, 7, 0, 9, 10, 7, 5, 5, 0, 7 - | 0, 5, 6, 5, 3, 6, 0, 0, 1, 3, 0, 9, 0, 6, 1, 7, 8, 0, 5, 1, 10, 6, 9, 0, 0, 8, 7, 0, 7, 1, 2, 0, 5, 10, 0, 0, 0, 4, 5, 4, 8, 7, 4, 0, 9, 10, 0, 2, 3, 7, 0, 1, 5, 0, 4, 0, 8, 4, 3, 9 - |]; diff --git a/data/instances/discriminating.zip b/data/instances/discriminating.zip deleted file mode 100644 index ea5ca45f..00000000 Binary files a/data/instances/discriminating.zip and /dev/null differ diff --git a/data/instances/graded.zip b/data/instances/graded.zip deleted file mode 100644 index b8418f58..00000000 Binary files a/data/instances/graded.zip and /dev/null differ diff --git a/data/models/carpet-cutting/generator.essence b/data/models/carpet-cutting/generator.essence deleted file mode 100644 index 77f4e9f4..00000000 --- a/data/models/carpet-cutting/generator.essence +++ /dev/null @@ -1,243 +0,0 @@ -$ carpet-cutting -$ A generator model for the Carpet Cutting problem -$ Written by: Ian Miguel (ijm@st-andrews.ac.uk) - -$$$$ Let the tuner decide the following: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - -$ Roll width and maximum roll length -given tuner_roll_wid: int(1..1000) -given tuner_max_roll_len: int(1..20000) - -$ Number of room carpets -given tuner_n_rm: int(1..50) -letting Rooms be domain int(1..tuner_n_rm) - -$ Number of rectangles of room carpets -given tuner_n_rm_rec: int(1..50) -letting RmRecs be domain int(1..tuner_n_rm_rec) - -$ Number of stair carpets -given tuner_n_st: int(0..5) -letting Stairs be domain int(1..tuner_n_st) - -$ Orientation identifiers: 1 - 0, 2 - 90, 3 - 180, and 4 - 270 -$ Rotation is anti-clockwise. -letting Ori be domain int(1..4) - -$ Replicate given parameters with find statements so they appear in the output. -find roll_wid: int(1..tuner_roll_wid) -find max_roll_len: int(1..tuner_max_roll_len) -find n_rm: int(1..tuner_n_rm) -find n_rm_rec: int(1..tuner_n_rm_rec) -find n_st: int(0..tuner_n_st) - -$$$$ Fill in the details of the required carpets. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - -$ Composition of each room carpet: this is a partition. -find rm_rec_ids: matrix indexed by[Rooms] of set of RmRecs -$ Allowed rotation for each room carpet. Depending on carpet pile, not all of -$ these may be allowable, but we don't allow the empty set. -find rm_ori: matrix indexed by[Rooms] of set (minSize 1) of Ori -$ Maximal length in orientation 1 (0 degree) -find rm_max_len: matrix indexed by[Rooms] of int(1..tuner_max_roll_len) -$ Maximal width in orientation 1 (0 degree) -find rm_max_wid: matrix indexed by[Rooms] of int(1..tuner_roll_wid) - -$ These are the constituent rectangles of each carpet. -find rm_rec_len: matrix indexed by[RmRecs] of int(1..tuner_max_roll_len) -find rm_rec_wid: matrix indexed by[RmRecs] of int(1..tuner_roll_wid) -find rm_rec_os_x: matrix indexed by[RmRecs,Ori] of int(-1..tuner_max_roll_len) -find rm_rec_os_y: matrix indexed by[RmRecs,Ori] of int(-1..tuner_roll_wid) - -$ This is an auxiliary function for this generator to map from rectangles back -$ to carpets. Insisting that it is a surjection makes sure each room has at -$ least one rectangle. -find AuxRmRecToCarpet: function (total, surjective) RmRecs --> Rooms - -$ Stair carpets -find st_len: matrix indexed by[Stairs] of int(1..tuner_max_roll_len) -find st_wid: matrix indexed by[Stairs] of int(1..tuner_roll_wid) -find st_no_steps: matrix indexed by[Stairs] of int(1..10) -find st_min_steps: matrix indexed by[Stairs] of int(1..10) -find st_max_breaks: matrix indexed by[Stairs] of int(1..10) - -$$$$ Constrain the generator problem variables to take sensible values $$$$$$$$$ - -such that - -$ Make sure the tuner parameters are reflected in the output. -roll_wid = tuner_roll_wid, -max_roll_len = tuner_max_roll_len, -n_rm = tuner_n_rm, -n_rm_rec = tuner_n_rm_rec, -n_st = tuner_n_st, - -$ rm_rec_ids is really a partition. -forAll room1, room2 : Rooms, room1 < room2 . - (rm_rec_ids[room1] intersect rm_rec_ids[room2]) = {}, - -$ From the description in the paper, the sensible sets of allowed orientations -$ appear to be 1 (0 degrees); 1, 2 (0 and 90); and 1, 2, 3, 4 -forAll room : Rooms . - rm_ori[room] = {1} \/ - rm_ori[room] = {1, 2} \/ - rm_ori[room] = {1, 2, 3, 4}, - -$ The unused orientations for rm_rec_os are expected to be -1. -$ Allowed orientations are associated with carpets rather than rectangles, so -$ we need to know of which carpet each rectangle is a constituent. This is what -$ the auxiliary rmRecToCarpet function gives us. We connect this to rm_rec_ids -forAll rec : RmRecs . - rec in rm_rec_ids[AuxRmRecToCarpet(rec)], - -$ Now we can force the unused orientation offsets to be -1. -forAll rec : RmRecs . - forAll o : Ori . - (rm_rec_os_x[rec,o] = -1) - = - !(o in rm_ori[AuxRmRecToCarpet(rec)]), -forAll rec : RmRecs . - forAll o : Ori . - (rm_rec_os_y[rec,o] = -1) - = - !(o in rm_ori[AuxRmRecToCarpet(rec)]), - -$ According to the paper: -$ The origin of a room carpet is the bottom left corner of the smallest -$ rectangle that encloses all its rectangles in each orientation. -$ Each rectangle has a width and a length which are given for the 0o orientation. - -$ So, for each room carpet we're going to need to generate a collection of -$ rectangles that touch but don't overlap, and use them to populate -$ rm_rec_len/wid, rm_os_x/y. -$ A simple approach would be to produce a y-sorted collection of rectangles -$ where the sum of the lengths of the previous rectangles determine the y -$ offset of the current rectangle (in 0 degree) and the x offset is free. -$ This would preclude shapes such as: X_X -$ XXX -$ I suppose could mitigate this by allowing parallel rectangles of the same -$ height, but being careful of the x offsets. -$ NB I'm taking length to be in the x axis, width in the y axis. -$ This seems to correspond to what is going on in the example below. - -forAll rec : RmRecs . - (AuxRmRecToCarpet(rec) = AuxRmRecToCarpet(rec-1)) -> - (rm_rec_os_y[rec,1] = rm_rec_os_y[rec-1,1] + rm_rec_wid[rec-1]), - -$ This leaves os_x and length free. - -$ max_len is simply the maximum (length+offset) over the rectangles. -forAll room : Rooms . - rm_max_len[room] = - max([rm_rec_len[rec] + rm_rec_os_x[rec,1] | - rec : RmRecs, AuxRmRecToCarpet(rec) = room]), -$ Similarly for max_wid -forAll room : Rooms . - rm_max_wid[room] = - max([rm_rec_wid[rec] + rm_rec_os_y[rec,1] | - rec : RmRecs, AuxRmRecToCarpet(rec) = room]), - -$ All of the following are expressed in terms of orientation 1, which we can -$ rely upon. -$ Compute orientation 2, if used: -forAll rec : RmRecs . - (2 in rm_ori[AuxRmRecToCarpet(rec)]) - -> - ((rm_rec_os_x[rec,2] = rm_max_wid[AuxRmRecToCarpet(rec)] - - (rm_rec_os_y[rec,1]+rm_rec_wid[rec])) - /\ - (rm_rec_os_y[rec,2] = rm_rec_os_x[rec,1])), - -$ Compute orientation 3, if used: -forAll rec : RmRecs . - (3 in rm_ori[AuxRmRecToCarpet(rec)]) - -> - ((rm_rec_os_x[rec,3] = rm_max_len[AuxRmRecToCarpet(rec)] - - (rm_rec_os_x[rec,1]+rm_rec_len[rec])) - /\ - (rm_rec_os_y[rec,3] = rm_max_wid[AuxRmRecToCarpet(rec)] - - (rm_rec_os_y[rec,1]+rm_rec_wid[rec]))), - -$ Compute orientation 4, if used: -forAll rec : RmRecs . - (4 in rm_ori[AuxRmRecToCarpet(rec)]) - -> - ((rm_rec_os_x[rec,4] = rm_rec_os_y[rec,1]) - /\ - (rm_rec_os_y[rec,4] = rm_max_len[AuxRmRecToCarpet(rec)] - - (rm_rec_os_x[rec,1]+rm_rec_len[rec]))), - -$ Stairs: min_steps must be leq no_steps -forAll stair : Stairs . - st_min_steps[stair] <= st_no_steps[stair], - -$ Stairs: No point allowing too many breaks. -forAll stair : Stairs . - st_no_steps[stair] / st_max_breaks[stair] >= st_min_steps[stair], - -$ Trying to avoid trivially unsat instances. -sum(rm_max_len) <= tuner_max_roll_len, -sum(st_len) <= tuner_max_roll_len, - -true - -$$$$ Worked example, explains how orientation cts above derived $$$$$$$$$$$$$$$$ - -$ Example: -$ https://github.com/MiniZinc/minizinc-benchmarks/blob/master/carpet-cutting/mzn_rnd_test.01.dzn - -$ In this example the room recs are given x-sorted. E.g. Room 3 is composed of -$ rectangles 3, 4, 5. -$ rec 3: len = 74, wid = 147. -$ x-offset is 0, y-offset is 57 -$ rec 4: len = 197, wid = 204. -$ x-offset is 74 (i.e. len of rec 3), y-offset is 0 -$ rec 5: len = 72, wid = 138. -$ x-offset is 271 (i.e. x-offset 4 + len 4), y-offset is 66 -$ This gives a picture, crudely, if we assume +y is up: -$ 3445 NB Tops of these are all exactly aligned at 204. -$ 44 -$ If +y is down, we get: -$ 44 -$ 3445 -$ -$ We know our origin is always bottom-left. -$ Now look at offsets for 2nd orientation, which is 90 degrees anti-clockwise: -$ rec 3: x-offset is 0, y-offset is 0 (i.e. this is bottom-left corner now) -$ rec 4: x-offset 0, y-offset 74 -$ rec 5: x-0ffset 0, y-offset 271 -$ giving: -$ 5 -$ 44 -$ 44 -$ 3 -$ and therefore showing that +y *is* up -$ so, for orientation 2: -$ x offset is maxwid-(orientation 1 y offset+rec width) -$ y offset is orientation 1 x-offset. -$ -$ Now look at offsets for 3rd orientation, which is 180 degrees. -$ rec 3: x-offset is 269, y-offset is 0 -$ rec 4: x-offset 72, y-offset 0 -$ rec 5: x-0ffset 0, y-offset 0 -$ giving: -$ 44 -$ 5443 -$ x offset is reflection of orientation 1 x offset wrt max len: -$ x offset is maxlen-(orientation 1 x-offset+rec len) -$ y offset is reflection of orientation 1 y offset wrt max width: -$ y offset is maxwid-(orientation 1 y-offset+rec width) -$ = orientation 2 y-offset [if not -1] -$ -$ 4th orientation (270 degrees): -$ rec 3: x-offset is 57, y-offset is 269 -$ rec 4: x-offset 0, y-offset 72 -$ rec 5: x-0ffset 66, y-offset 0 -$ giving: -$ 3 -$ 44 -$ 44 -$ 5 -$ x offset is orientation 1 y offset -$ y offset is orientation 3 x offset is: -$ maxlen-(orientation 1 x-offset+rec len) diff --git a/data/models/carpet-cutting/problem.mzn b/data/models/carpet-cutting/problem.mzn deleted file mode 100755 index 2a4d5145..00000000 --- a/data/models/carpet-cutting/problem.mzn +++ /dev/null @@ -1,324 +0,0 @@ -%-----------------------------------------------------------------------------% -% vim: ts=4 sw=4 et wm=0 tw=0 -%-----------------------------------------------------------------------------% -% -% This file contains a model for a carpet cutting problem in which carpet -% shapes must be cut from a carpet roll minimising the wastage, i.e., the -% needed length of the carpet roll. -% _____________________ -% | (_) -% | | | -% | | | -% Width | | | -% | | | -% | | | -% |___________________(_) -% -% Length -% -% The carpet cutting problem is a two-dimensional cutting and packing problem -% in which carpet shapes are cut from a rectangular carpet roll with fixed roll -% width and a sufficiently long roll length. The goal is to find a non-overlap- -% ping placement of all carpet shapes on the carpet roll, so that the waste is -% minimised while meeting all additional constraints. Here, the objective is to -% minimise the carpet roll length. -% -% Here, we distinguise between carpet shapes covering rooms and stairs: -% -% Room carpets: -% They are rectilinear polygons that are made up of non-overlapping rectangles -% A rotation may be allowed by 90, 180, or 270 degree before they are placed -% on the roll. -% -% Stair carpets: -% They are rectangles covering a certain number of steps. In contrast to room -% carpets, they are allowed to be cut in several pieces provided that the par- -% tition of these carpets satisfy additional constraints. The joint of these -% carpets introduced by the cut between two adjacent pieces, can be hidden bet- -% ween the tread and the riser of the stairs once they are laid. -% -%-----------------------------------------------------------------------------% -% Including files - -include "globals.mzn"; % Global constraints - -%------------------------------------------------------------------------------% -% Parameters - - % Carpet roll -int: roll_wid; % Roll width -int: max_roll_len; % Maximal roll length - - % Orientations: 1 - 0, 2 - 90, 3 - 180, and 4 - 270 -set of int: Ori = 1..4; - - % Room carpets -int: n_rm; % Number of room carpets -set of int: Rooms = 1..n_rm; % Identifiers of room carpets -array [Rooms] of set of int: rm_rec_ids; % Identifiers of rectangles belonging to each room carpet -array [Rooms] of set of Ori: rm_ori; % Allowed rotation for each room carpet -array [Rooms] of int: rm_max_len; % Maximal length in orientation 1 (0 degree) -array [Rooms] of int: rm_max_wid; % Maximal width in orientation 1 (0 degree) - - % Rectangles of the room carpets -int: n_rm_rec; % Number of rectangles of room carpets -set of int: RmRecs = 1..n_rm_rec; % Identifiers of these rectangles -array [RmRecs] of int: rm_rec_len; % Length in orientation 1 (0 degree) -array [RmRecs] of int: rm_rec_wid; % Length in orientation 1 (0 degree) -array [RmRecs, Ori] of int: rm_rec_os_x; % Offset of the x-origin of the rectangles to their room carpet for each orientation -array [RmRecs, Ori] of int: rm_rec_os_y; % Offset of the y-origin of the rectangles to their room carpet for each orientation - -array [Rooms] of int: rm_area = - [ sum(j in rm_rec_ids[i])(rm_rec_len[j] * rm_rec_wid[j]) | i in Rooms ]; -array [Rooms] of int: rm_sort = - [ 1 + sum(j in Rooms where j != i /\ rm_area[j] > rm_area[i])(1) - + sum(j in Rooms where j < i /\ rm_area[j] = rm_area[i])(1) - | i in Rooms ]; - - % Stair carpets - % -int: n_st; % Number of stair carpets -set of int: Stairs = 1..n_st; % Identifier of stair carpets -array [Stairs] of int: st_len; % Length of the stair carpets -array [Stairs] of int: st_wid; % Width of the stair carpets -array [Stairs] of int: st_no_steps; % Number of steps that each stair carpet covers -array [Stairs] of int: st_min_steps; % Minimal number of steps in each part of a partition of stair carpet -array [Stairs] of int: st_max_breaks; % Maximal number of cuts for each stair carpet -array [Stairs] of int: st_rec_id_offset = - [ sum(j in Stairs where j < i)(st_no_steps[j]) | i in Stairs ]; -array [Stairs] of set of int: st_rec_ids = - [(st_rec_id_offset[i] + 1)..(st_rec_id_offset[i] + st_no_steps[i]) - | i in Stairs ]; - - - % Rectangles of the stair carpets - % -int: n_st_rec = sum(i in Stairs)(st_no_steps[i]); -set of int: StRecs = 1..n_st_rec; -array [StRecs] of int: st_rec_len = - [ st_len[i] div st_no_steps[i] | i in Stairs, j in st_rec_ids[i] ]; -array [StRecs] of int: st_rec_wid = - [ st_wid[i] | i in Stairs, j in st_rec_ids[i] ]; - - - % Derived parameters for the carpet roll - % -int: TotalArea = sum(i in RmRecs)( rm_rec_len[i] * rm_rec_wid[i] ) - + sum(i in Stairs)( st_len[i] * st_wid[i] ); -int: MinRollLen = (TotalArea div roll_wid) - + if TotalArea mod roll_wid > 0 then 1 else 0 endif; -int: TotalLen = sum(i in Rooms)(max(rm_max_len[i], rm_max_wid[i])) - + sum(i in Stairs)(st_len[i]); -int: MaxRollLen = min(max_roll_len, TotalLen); - - % Domains for the origin of carpets -set of int: DomX = 0..MaxRollLen; -set of int: DomY = 0..roll_wid; - - % Derived parameters for rectangles of room carpets -int: MinRmRecSize = min(i in RmRecs)(min(rm_rec_len[i], rm_rec_wid[i])); -int: MaxRmRecSize = max(i in RmRecs)(max(rm_rec_len[i], rm_rec_wid[i])); - -%------------------------------------------------------------------------------% -% Variables - - % Roll length -var MinRollLen..MaxRollLen: objective; - - % Room carpets -array [Rooms] of var DomX: rm_x; -array [Rooms] of var DomY: rm_y; -array [Rooms] of var Ori: rm_vori; -array [Rooms] of var bool: rm_ori_0_or_180; -array [Rooms] of var bool: rm_ori_0_or_90; - - % Rectangles of the room carpets -array [RmRecs] of var DomX: rm_rec_x; -array [RmRecs] of var DomY: rm_rec_y; -array [RmRecs] of var MinRmRecSize..MaxRmRecSize: rm_rec_vlen = - [ rm_rec_wid[i] + (rm_rec_len[i] - rm_rec_wid[i]) * bool2int(rm_ori_0_or_180[j]) - | i in RmRecs, j in Rooms where i in rm_rec_ids[j] ]; -array [RmRecs] of var MinRmRecSize..MaxRmRecSize: rm_rec_vwid = - [ rm_rec_len[i] + (rm_rec_wid[i] - rm_rec_len[i]) * bool2int(rm_ori_0_or_180[j]) - | i in RmRecs, j in Rooms where i in rm_rec_ids[j] ]; - - % Rectangles of the stair carpets -array [StRecs] of var DomX: st_rec_x; -array [StRecs] of var DomY: st_rec_y; - - -%------------------------------------------------------------------------------% -% Constraints for room carpets - - % Carpet roll -constraint - forall(i in Rooms)( - rm_x[i] + rm_max_wid[i] + - (rm_max_len[i] - rm_max_wid[i]) * bool2int(rm_ori_0_or_180[i]) - <= objective - /\ rm_y[i] + rm_max_len[i] + - (rm_max_wid[i] - rm_max_len[i]) * bool2int(rm_ori_0_or_180[i]) - <= roll_wid - /\ forall(j in rm_rec_ids[i])( - rm_rec_x[j] + rm_rec_vlen[j] <= objective - /\ rm_rec_y[j] + rm_rec_vwid[j] <= roll_wid - ) - ); - - % Orientations -constraint - forall(i in Rooms)( - rm_vori[i] in rm_ori[i] - /\ (rm_ori_0_or_90[i] <-> (rm_vori[i] in {1, 2})) - /\ (rm_ori_0_or_180[i] <-> (rm_vori[i] in {1, 3})) - ); - - % Origin offsets -constraint - forall(i in Rooms, j in rm_rec_ids[i])( - (rm_rec_x[j] = rm_x[i] + rm_rec_os_x[j, rm_vori[i]]) - /\ (rm_rec_y[j] = rm_y[i] + rm_rec_os_y[j, rm_vori[i]]) - ); - -%------------------------------------------------------------------------------% -% Constraints for stair carpets - - % Carpet roll -constraint - forall(i in Stairs, j in st_rec_ids[i])( - st_rec_x[j] + st_rec_len[j] <= objective - /\ st_rec_y[j] + st_rec_wid[j] <= roll_wid - ); - - % Symmetry breaking constraints between steps of a stair carpet -constraint symmetry_breaking_constraint( - forall(i in Stairs, j1 in st_rec_ids[i] where (j1 + 1) in st_rec_ids[i])( - let { - int: j2 = j1 + 1 - } in ( - st_rec_y[j1] <= st_rec_y[j2] - /\ ( st_rec_y[j1] >= st_rec_y[j2] - -> st_rec_x[j1] + st_rec_len[j1] <= st_rec_x[j2] - ) - ) - ) -); - - % Minimal steps and maximal breaks constraints -constraint - forall(i in Stairs)( - let { - int: os = st_rec_id_offset[i], - set of int: J = 1..st_no_steps[i], - array [J] of var bool: last_part - } in ( - % Memorising the last step in each part of the partition of the - % stair carpet - last_part[st_no_steps[i]] = true - /\ forall(j in J where j != st_no_steps[i])( - last_part[j] <-> ( - st_rec_y[j + os] < st_rec_y[j + os + 1] - \/ st_rec_x[j + os] + st_rec_len[j] < st_rec_x[j + os + 1] - ) - ) - % If one step is placed near to the right border of the carpet roll, - % so that no space is left for another step then this step must be - % the last one in a part. - /\ forall(j in J)( - (st_rec_x[j + os] + 2 * st_rec_len[j + os] > objective) -> last_part[j] - ) - % Maximal breaks constraints - % - /\ sum(j in J)(bool2int(last_part[j])) <= st_max_breaks[i] + 1 - % Minimal steps constraints - % - /\ if st_min_steps[i] > 1 then - forall(j in 1..(st_min_steps[i]-1))( - last_part[j] = false - ) - /\ forall(j in J where j >= st_min_steps[i])( - forall(k in (j - st_min_steps[i] + 1)..(j - 1))( - last_part[j] -> not(last_part[k]) - ) - ) - else - true - endif - ) - ); - - -%------------------------------------------------------------------------------% -% Cumulative constraints for each dimension - - % Roll length -constraint - cumulative( - rm_rec_x ++ st_rec_x, - rm_rec_vlen ++ st_rec_len, - rm_rec_vwid ++ st_rec_wid, - roll_wid - ); - - % Roll width -constraint - cumulative( - rm_rec_y ++ st_rec_y, - rm_rec_vwid ++ st_rec_wid, - rm_rec_vlen ++ st_rec_len, - objective - ); - - -%-------------------------------------------------------------------------------% -% Non-overlapping constraint - -constraint - diffn( - rm_rec_x ++ st_rec_x, - rm_rec_y ++ st_rec_y, - rm_rec_vlen ++ st_rec_len, - rm_rec_vwid ++ st_rec_wid - ); - -%------------------------------------------------------------------------------% -% Solve item - -solve - :: search1 - minimize objective; - - -%------------------------------------------------------------------------------% -% Search annotations - -ann: fix_ori_0_or_180 = - bool_search(rm_ori_0_or_180, input_order, indomain_max, complete); - -ann: fix_ori_0_or_90 = - bool_search(rm_ori_0_or_90, input_order, indomain_max, complete); - -ann: fix_yx = int_search( - [ [rm_y[rm_sort[i]], rm_x[rm_sort[i]]][p] | i in Rooms, p in 1..2] - ++ [ [st_rec_x[i], st_rec_y[i]][p] | i in StRecs, p in 1..2], - input_order, indomain_min, complete ); - -ann: fix_rl = int_search([objective], input_order, indomain_min, complete); - -ann: search1 = seq_search([ - fix_ori_0_or_180, - fix_ori_0_or_90, - fix_yx, - fix_rl - ]); - -output [ - "rm_vori = ", show(rm_vori), ";\n", - "rm_x = ", show(rm_x), ";\n", - "rm_y = ", show(rm_y), ";\n", - "rm_rec_x = ", show(rm_rec_x), ";\n", - "rm_rec_y = ", show(rm_rec_y), ";\n", - "st_rec_x = ", show(st_rec_x), ";\n", - "st_rec_y = ", show(st_rec_y), ";\n", - "objective = ", show(objective), ";\n" -]; diff --git a/data/models/lot-sizing/generator.essence b/data/models/lot-sizing/generator.essence deleted file mode 100644 index 616e39f4..00000000 --- a/data/models/lot-sizing/generator.essence +++ /dev/null @@ -1,88 +0,0 @@ -$lot-sizing -$ written by: Ian Miguel (ijm@st-andrews.ac.uk) -$$$$ CSPLib 58: https://www.csplib.org/Problems/prob058/ -$$$$ Let the tuner decide the following: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - -$ Different item types to produce (upper bounds derived by looking at competition data). -given tuner_nb_item_types: int(1..20) -letting Items be domain int(1..tuner_nb_item_types) -letting Items0 be domain int(0..tuner_nb_item_types) - -$ Total number of orders -given tuner_nb_orders_delta: int(0..10) -letting tuner_nb_orders be tuner_nb_item_types + tuner_nb_orders_delta -letting Orders be domain int(1..tuner_nb_orders) -letting Orders0 be domain int(0..tuner_nb_orders) - -$ Time periods available. Upper bound derived by looking at competition data. -given tuner_nb_periods: int(1..30) -letting Periods be domain int(1..tuner_nb_periods) - -$ cost for inventory for one period of time. Upper bound from competition data -given tuner_inventory_cost: int(1..10) - -$ Replicate given parameters with find statements so they appear in the output. -find nb_orders: int(1..tuner_nb_orders) -find nb_item_types: int(1..tuner_nb_orders) -find nb_periods: int(1..tuner_nb_periods) -find inventory_cost: int(1..tuner_inventory_cost) - -$$$$ Fill in the details of orders, costs, etc $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - -$ The due date of each order. -find due_period: matrix indexed by[Orders] of Periods - -$ the cost of changing from item i to item j -$ UB from example data -find change_cost: matrix indexed by[Orders0, Orders0] of int(0..200) - -$ the number of orders for the item type -$ NB Insisting on at least one instance of each type. -find nb_of_orders: matrix indexed by[Items] of int(1..tuner_nb_orders) - -$ maps each order to its item type -find item_type: matrix indexed by[Orders0] of Items0 - -$$$$ Constrain the generator problem variables to take sensible values $$$$$$$$$ - -such that - -$ Bind the tuner parameters to the fake decision variables for the output. -nb_orders = tuner_nb_orders, -nb_item_types = tuner_nb_item_types, -nb_periods = tuner_nb_periods, -inventory_cost = tuner_inventory_cost, - -$ The sum of nb_of_orders, which records no of orders per item type = nb_orders -sum(nb_of_orders) = tuner_nb_orders, - -$ In the data, the orders are ordered by item type. -$ So we force item_type to be non-decreasing with the right no of occurrences. -forAll i: Orders . - item_type[i] >= item_type[i-1], -$ 0th entry of item_type is always 0 -item_type[0] = 0, -$ Number of occurrences of other values governed by nb_of_orders -forAll i: Items . - (sum j : int(1..tuner_nb_orders) . toInt(item_type[j] = i)) - = - nb_of_orders[i], - -$ sequence-dependent changeover costs, respect the triangle inequality -forAll i: Orders . - forAll j: Orders . - forAll k: Orders . - ((i != j) /\ (j != k) /\ (i != k)) -> - (change_cost[i, j] + change_cost[j, k]) >= change_cost[i, k], - -$ leading diagonal of change cost obviously 0 -forAll i: Orders0 . - change_cost[i,i] = 0, - -$ First row and first col of change cost also 0 -forAll i: Orders0 . - change_cost[i,0] = 0, -forAll i: Orders0 . - change_cost[0,i] = 0, - -true diff --git a/data/models/lot-sizing/problem.mzn b/data/models/lot-sizing/problem.mzn deleted file mode 100644 index d4a7ba42..00000000 --- a/data/models/lot-sizing/problem.mzn +++ /dev/null @@ -1,187 +0,0 @@ -% =============================================================================== -% Discrete Lot Sizing problem, CP MODEL -% -% CSPlib Problem 58: http://www.csplib.org/Problems/prob058/ -% MIT License -% -% Copyright (c) 2019 Andrea Rendl-Pitrey, Satalia -% -% Permission is hereby granted, free of charge, to any person obtaining a copy -% of this software and associated documentation files (the "Software"), to deal -% in the Software without restriction, including without limitation the rights -% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -% copies of the Software, and to permit persons to whom the Software is -% furnished to do so, subject to the following conditions: -% -% The above copyright notice and this permission notice shall be included in all -% copies or substantial portions of the Software. -% -% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -% SOFTWARE. -% -% Andrea Rendl, July 2019 -% =============================================================================== - -include "global_cardinality.mzn"; -include "alldifferent.mzn"; % for redundant constraint-1 -include "at_least.mzn"; % for redundant constraint-2 -include "at_most.mzn"; % for redundant constraint-2 - -int: nb_item_types; % different item types to produce -int: nb_orders; % the total number of orders -constraint - assert(nb_item_types <= nb_orders, - "The number of item types must be greater or equal to the number of total orders.", true); -int: nb_periods; % time periods available - -% cost for inventory for one period of time -int: inventory_cost; - -set of int: Orders = 1..nb_orders; -set of int: Orders0 = 0..nb_orders; -set of int: Periods = 1..nb_periods; -set of int: Items = 1..nb_item_types; -set of int: Items0 = 0..nb_item_types; - -% the due date of each order -array[Orders] of Periods: due_period; -% the cost of changing from item i to item j -array[Orders0, Orders0] of int: change_cost; -% the number of orders for the item type -array[Items] of int: nb_of_orders; -% maps each order to its item type -array[Orders0] of Items0: item_type; - -% =============== VARIABLES ===================================================== - -% The sequence of orders that are produced -array[Periods] of var Orders0: production_by_order; -% For each order, the time period in which it is produced -array[Orders] of var Periods: production_period; -% the inventory periods that are required for the production plan -% (i.e. the number of periods the order is completed before the due date) -array[Orders] of var 0..max(due_period): inventory_periods; -% the change cost for changing the machine setup from period p to p+1 -array[1..nb_periods-1] of var 0..max(change_cost): change_cost_for_period; -% the order in which orders are produced -array[Periods] of var Orders0: production_order; - -% =============== CONSTRAINTS =================================================== - -% sets the number of times each order has to appear in the production plan -% each order has to be produced exactly once. -constraint - global_cardinality(production_by_order, - [ value | value in Orders0], - [ - if order == 0 - then nb_periods - nb_orders - else - 1 - endif - | order in Orders0]); - -% Don't produce the order AFTER its due date -constraint - forall (order in Orders) ( - forall (period in Periods where due_period[order] < period) ( - production_by_order[period] != order - ) - ); - - -% Linking the production_period variables with the main order variables -constraint - forall (order in Orders) ( - production_by_order[production_period[order]] = order - ); -% redundant constraint-1 -constraint redundant_constraint(alldifferent(production_period)); - - -% sets the number of periods that inventory is necessary for each order -constraint - forall(order in Orders) ( - inventory_periods[order] = due_period[order] - production_period[order] - ); - - -% set "production_order" to the order in which items are produced. We will use this variables -% to impose the change_cost constraints -constraint - production_order[1] = production_by_order[1]; -constraint - forall (p in 2..nb_periods) ( - if production_by_order[p] == 0 then - production_order[p] = production_order[p-1] - else - production_order[p] = production_by_order[p] - endif - ) -; -% redundant constraints-2 (sometimes they improve performance, sometimes not) -constraint - forall(o in Orders) ( - redundant_constraint(at_least(1, production_order, o)) /\ - redundant_constraint(at_most(1 + (nb_periods - nb_orders), production_order, o)) - ); - - -% the change cost is applied when changing from one item type to another -constraint - forall (p in 1..nb_periods-1) ( - change_cost_for_period[p] = change_cost[production_order[p], production_order[p+1]] - ); - - -% breaking symmetry: complete orders of same type in a fixed order (the ones first are produced first) -constraint - forall(item_typ in Items) ( - symmetry_breaking_constraint( - if nb_of_orders[item_typ] > 1 then - forall(k in 1..(nb_of_orders[item_typ]-1)) ( - production_period[order_number(item_typ, k)] < production_period[order_number(item_typ, k+1)] - ) - else true - endif - ) - ); - - -% returns the order number of the k-th order of item_type -function int: order_number(Items: item_type, int: k) = - if item_type == 1 - then k - else - sum( [ nb_of_orders[item] | item in 1..item_type-1 ]) + k - endif; - - -% =============== OBJECTIVE ===================================================== - -int: upper_bound = max(change_cost)*nb_orders + inventory_cost*(nb_orders*nb_periods); -var 0..upper_bound: objective; - -% the objective is the sum of the total change costs and the total inventory costs -constraint - objective = sum(p in 1..nb_periods-1) (change_cost_for_period[p]) - + sum(o in Orders) (inventory_periods[o]) * inventory_cost; - -solve :: seq_search( - [int_search(production_by_order, first_fail, indomain_median, complete), - int_search(inventory_periods, first_fail, indomain_min, complete)]) - minimize objective; - -% Output - -output [ - "production_by_order = \(production_by_order);\n", - "inventory_periods = \(inventory_periods);\n", - "objective = \(objective);\n" -]; - diff --git a/data/models/macc/generator-small.essence b/data/models/macc/generator-small.essence deleted file mode 100644 index 84aead60..00000000 --- a/data/models/macc/generator-small.essence +++ /dev/null @@ -1,47 +0,0 @@ -$macc -$ A generator model for the MACC problem -$ Written by: Nguyen Dang (nttd@st-andrews.ac.uk) -$ This is a copy of the original generator (generator.essence), but with smaller domains for the generator parameters, used for doing small AutoIG experiments (for demonstration purposes). - -given Ag: int(1..3) $ number of agents -given Tg: int(1..20) $ time horizon -given Xg: int(3..10) $ width & depth of the map, cells at borders are not used for the building's structure so Xg and Xg must be >2 -given Zg: int(2..3) $ height of the map - -find A, T, X, Y, Z: int(1..200) -such that - A=Ag, T=Tg, X=Xg, Y=Xg, Z=Zg - -$ percentage of the construct's ground coverage, the larger this value is, the more likely the instance is hard due to possible collisions between agents -given ground_coverage: int(1..100) -$ the number of blocks on the ground (we want to have at least one block) -letting n_ground_blocks be max({1, ground_coverage * (Xg-2) * (Xg-2) / 100}) $ maximum number of ground blocks is (Xg-2)*(Xg-2) because borders must be empty (for agents to enter the map) - -$ normalised average height of the structure (ground layer is ignored) -$ avg_height_ratio = 0: all cells of the structure has a height of 1 (all blocks are on the ground layer) -$ avg_height_ratio = 1: all cells of the structure has the maximum height (Zg-1) -given avg_height_ratio: int(0..100) - -$ we can now calculate the total number of blocks of the structure based on previous parameters -$ letting n_blocks be n_ground_blocks + avg_height_ratio * n_ground_blocks * (Zg-2) / 100 - -$ the structure is defined as a matrix, where each element represents the number of blocks located that cell -letting rows be domain int(0..Xg-1) -letting cols be domain int(0..Xg-1) -find building : matrix indexed by [rows, cols] of int(0..Zg-1) $ maximum height of the structure is Zg-1 as specified in the mzn model - -such that - - $ no blocks are located on the border cells - and([building[row,0]=0 | row: rows]), - and([building[row,Xg-1]=0 | row: rows]), - and([building[0,col]=0 | col: cols]), - and([building[Xg-1,col]=0 | col: cols]), - - $ constraint on the number of blocks on the ground layer - sum([toInt(building[row, col]>0) | row: rows, col: cols]) = n_ground_blocks, - - $ constraint on the total number of blocks - $sum([building[row, col] | row: rows, col: cols]) = n_blocks $ bug in conjure, use the next one instead - sum([building[row, col] | row: rows, col: cols]) = n_ground_blocks + avg_height_ratio * n_ground_blocks * (Zg-2) / - 100 diff --git a/data/models/macc/generator.essence b/data/models/macc/generator.essence deleted file mode 100644 index 40e0aaf9..00000000 --- a/data/models/macc/generator.essence +++ /dev/null @@ -1,44 +0,0 @@ -$macc -$ A generator model for the MACC problem -$ Written by: Nguyen Dang (nttd@st-andrews.ac.uk) - -given Ag: int(1..10) $ number of agents -given Tg: int(1..200) $ time horizon -given Xg: int(3..50) $ width & depth of the map, cells at borders are not used for the building's structure so Xg and Xg must be >2 -given Zg: int(2..10) $ height of the map - -find A, T, X, Y, Z: int(1..200) -such that - A=Ag, T=Tg, X=Xg, Y=Xg, Z=Zg - -$ percentage of the construct's ground coverage, the larger this value is, the more likely the instance is hard due to possible collisions between agents -given ground_coverage: int(1..100) -$ the number of blocks on the ground (we want to have at least one block) -letting n_ground_blocks be max({1, ground_coverage * (Xg-2) * (Xg-2) / 100}) $ maximum number of ground blocks is (Xg-2)*(Xg-2) because borders must be empty (for agents to enter the map) - -$ normalised average height of the structure (ground layer is ignored) -$ avg_height_ratio = 0: all cells of the structure has a height of 1 (all blocks are on the ground layer) -$ avg_height_ratio = 1: all cells of the structure has the maximum height (Zg-1) -given avg_height_ratio: int(0..100) - -$ we can now calculate the total number of blocks of the structure based on previous parameters -letting n_blocks be n_ground_blocks + avg_height_ratio * n_ground_blocks * (Zg-2) / 100 - -$ the structure is defined as a matrix, where each element represents the number of blocks located that cell -letting rows be domain int(0..Xg-1) -letting cols be domain int(0..Xg-1) -find building : matrix indexed by [rows, cols] of int(0..Zg-1) $ maximum height of the structure is Zg-1 as specified in the mzn model - -such that - - $ no blocks are located on the border cells - and([building[row,0]=0 | row: rows]), - and([building[row,Xg-1]=0 | row: rows]), - and([building[0,col]=0 | col: cols]), - and([building[Xg-1,col]=0 | col: cols]), - - $ constraint on the number of blocks on the ground layer - sum([toInt(building[row, col]>0) | row: rows, col: cols]) = n_ground_blocks, - - $ constraint on the total number of blocks - sum([building[row, col] | row: rows, col: cols]) = n_blocks diff --git a/data/models/macc/problem.mzn b/data/models/macc/problem.mzn deleted file mode 100644 index 1d82c045..00000000 --- a/data/models/macc/problem.mzn +++ /dev/null @@ -1,330 +0,0 @@ -% Multi-agent Collective Construction (MACC) -% -% The multi-agent collective construction problem tasks agents to construct any -% given three-dimensional structure on a grid by repositioning blocks. Agents -% are required to also use the blocks to build ramps in order to access the -% higher levels necessary to construct the building, and then remove the ramps -% upon completion of the building. -% -% Further details on the problem can be found in: -% Lam, E., Stuckey, P., Koenig, S., & Kumar, T. K. S. Exact Approaches -% to the Multi-Agent Collective Construction Problem. CP2020. -% https://ed-lam.com/papers/macc2020.pdf -% -% Edward Lam - -% -------- -% Instance -% -------- - -int: A; % Number of agents -int: T; % Time horizon -int: X; % Width -int: Y; % Depth -int: Z; % Height -array[YY,XX] of ZZ: building; % Structure to construct - -% ----------- -% Environment -% ----------- - -set of int: TT = 0..T-1; -set of int: TTT = 0..T-2; -set of int: GRID = 0..X*Y-1; -set of int: XX = 0..X-1; -set of int: YY = 0..Y-1; -set of int: ZZ = 0..Z-1; - -array[XX,YY] of GRID: id = array2d(XX, YY, [x*Y + y | y in YY, x in XX]); -set of GRID: BORDER = {id[x,0] | x in XX} union - {id[x,Y-1] | x in XX} union - {id[0,y] | y in YY} union - {id[X-1,y] | y in YY}; -set of GRID: INTERIOR = GRID diff BORDER; - -set of int: OFFGRID = -2..-1; -set of int: WORLD = GRID union OFFGRID; -array[GRID] of set of OFFGRID: off_grid_neighbour = array1d(GRID, - [(if x == 0 then {-1,-2} else {} endif) union - (if x == X-1 then {-1,-2} else {} endif) union - (if y == 0 /\ 0 < x /\ x < X-1 then {-1,-2} else {} endif) union - (if y == Y-1 /\ 0 < x /\ x < X-1 then {-1,-2} else {} endif) - | y in YY, x in XX] -); - -array[GRID] of set of GRID: neighbours = array1d(GRID, - [(if x > 0 then {id[x-1,y]} else {} endif) union - (if x < X-1 then {id[x+1,y]} else {} endif) union - (if y > 0 then {id[x,y-1]} else {} endif) union - (if y < Y-1 then {id[x,y+1]} else {} endif) - | y in YY, x in XX] -); -array[GRID] of set of GRID: neighbours_and_self = array1d(GRID, [neighbours[i] union {i} | i in GRID]); -array[GRID] of set of WORLD: world_neighbours_and_self = array1d(GRID, [neighbours_and_self[i] union off_grid_neighbour[i] | i in GRID]); - -array[WORLD] of min(WORLD)..max(XX): x_of_pos = array1d(WORLD, [i | i in OFFGRID] ++ [x | y in YY, x in XX]); -array[WORLD] of min(WORLD)..max(YY): y_of_pos = array1d(WORLD, [i | i in OFFGRID] ++ [y | y in YY, x in XX]); - -enum ACTION = { - UNUSED, - MOVE, - BLOCK -}; - -% ----------------------- -% Environment constraints -% ----------------------- - -% Height of the positions at each time step -array[TT,WORLD] of var ZZ: pos_height; - -% Height is 0 outside the map -constraint forall(t in TT, i in OFFGRID) ( - pos_height[t,i] == 0 -); - -% Height is 0 at the border -constraint forall(t in TT, i in BORDER) ( - pos_height[t,i] == 0 -); - -% Height is 0 at the first two time steps -constraint forall(t in min(TT)..min(TT)+1, i in GRID) ( - pos_height[t,i] == 0 -); - -% Height is equal to the building at the last two time steps -constraint forall(t in max(TT)-1..max(TT), i in GRID) ( - pos_height[t,i] == building[y_of_pos[i],x_of_pos[i]] -); - -% Change in height -constraint forall(t in TTT, i in GRID) ( - pos_height[t,i] - 1 <= pos_height[t+1,i] -); -constraint forall(t in TTT, i in GRID) ( - pos_height[t+1,i] <= pos_height[t,i] + 1 -); - -% ----------------- -% Agent constraints -% ----------------- - -% Action of the agents at each position and time step -array[TT,WORLD] of var ACTION: agent_action; -array[TT,WORLD] of var WORLD: agent_next_position; -array[TT,GRID] of var GRID: agent_block_position; -array[TT,WORLD] of var bool: agent_carrying; - -array[TTT,GRID] of var bool: agent_pickup; -array[TTT,GRID] of var bool: agent_delivery; - -% Fix actions at dummy positions off the map. -constraint forall(t in TT, i in OFFGRID) ( - agent_action[t,i] == MOVE -); - -% Fix next positions at dummy positions off the map. -constraint forall(t in TT, i in OFFGRID) ( - agent_next_position[t,i] == i -); - -% Fix carrying state at dummy positions off the map. -constraint forall(t in TT) (let {int: i = -1} in - agent_carrying[t,i] == true -); -constraint forall(t in TT) (let {int: i = -2} in - agent_carrying[t,i] == false -); - -% All agents must be off the grid at the start -constraint forall(i in GRID) (let {int: t = min(TT)} in - agent_action[t,i] == UNUSED -); - -% All agents must be off the grid at the end -constraint forall(i in GRID) (let {int: t = max(TT)} in - agent_action[t,i] == UNUSED -); - -% Agents must move to a neighbouring position or the same position -constraint forall(t in TT, i in GRID) ( - agent_next_position[t,i] in world_neighbours_and_self[i] -); - -% Agents stay at the same position when doing a pickup or delivery. -constraint forall(t in TT, i in GRID) ( - agent_action[t,i] == BLOCK - -> - agent_next_position[t,i] == i -); - -% Agents cannot pickup or deliver at the same position -constraint forall(t in TT, i in GRID) ( - agent_block_position[t,i] in neighbours[i] -); - -% Carrying status -constraint forall(t in TTT, i in GRID) ( - agent_action[t,i] == MOVE - -> - agent_carrying[t+1,agent_next_position[t,i]] == agent_carrying[t,i] -); -constraint forall(t in TTT, i in GRID) ( - agent_action[t,i] == BLOCK - -> - agent_carrying[t+1,i] == not agent_carrying[t,i] -); - -% Carrying status - pickup -constraint forall(t in TTT, i in GRID) ( - agent_pickup[t,i] - <-> - agent_action[t,i] == BLOCK /\ agent_carrying[t+1,i] /\ not agent_carrying[t,i] -); - -% Carrying status - delivery -constraint forall(t in TTT, i in GRID) ( - agent_delivery[t,i] - <-> - agent_action[t,i] == BLOCK /\ not agent_carrying[t+1,i] /\ agent_carrying[t,i] -); - -% Flow out -constraint forall(t in TTT, i in GRID) ( - (agent_action[t,i] == UNUSED) - \/ - (agent_action[t+1,agent_next_position[t,i]] != UNUSED) -); - -% Flow in -constraint forall(t in TTT, i in INTERIOR) ( - agent_action[t+1,i] != UNUSED - -> - exists (j in neighbours_and_self[i]) (agent_action[t,j] != UNUSED /\ agent_next_position[t,j] == i) -); - -% Vertex collision - limit flows into (t+1,i) -constraint forall(t in min(TT)+1..max(TT)-1, i in GRID) ( - sum(j in neighbours_and_self[i]) (bool2int(agent_action[t,j] == MOVE /\ agent_next_position[t,j] == i)) + - bool2int(agent_action[t,i] == BLOCK) + - sum(j in neighbours[i]) (bool2int(agent_action[t+1,j] == BLOCK /\ agent_block_position[t+1,j] == i)) - <= 1 -); - -% Edge collision -constraint forall(t in min(TT)+1..max(TT)-1, i in GRID) ( - agent_action[t,i] == MOVE /\ agent_next_position[t,i] != i /\ agent_action[t,agent_next_position[t,i]] == MOVE - -> - agent_next_position[t,agent_next_position[t,i]] != i -); - -% Maximum number of agents -constraint forall(t in min(TT)+1..max(TT)) ( - sum(i in GRID) (bool2int(agent_action[t,i] != UNUSED)) - + - sum(i in BORDER) (bool2int(agent_action[t-1,i] == MOVE /\ agent_next_position[t-1,i] < 0)) - <= A -); - -% --------------------------- -% Interdependence constraints -% --------------------------- - -% Height of move -constraint forall(t in TTT, i in GRID) (let {var int: next_pos = agent_next_position[t,i]} in - agent_action[t,i] == MOVE - -> - pos_height[t,i] - 1 <= pos_height[t+1,next_pos] -); -constraint forall(t in TTT, i in GRID) (let {var int: next_pos = agent_next_position[t,i]} in - agent_action[t,i] == MOVE - -> - pos_height[t+1,next_pos] <= pos_height[t,i] + 1 -); - -% Height of wait -constraint forall(t in TTT, i in GRID) (let {var int: next_pos = agent_next_position[t,i]} in - agent_action[t,i] == MOVE /\ next_pos == i - -> - pos_height[t+1,i] == pos_height[t,i] -); - -% Height of pickup -constraint forall(t in TTT, i in GRID) (let {var int: block_pos = agent_block_position[t,i]} in - agent_pickup[t,i] - -> - pos_height[t,block_pos] == pos_height[t,i] + 1 -); -constraint forall(t in TTT, i in GRID) (let {var int: block_pos = agent_block_position[t,i]} in - agent_pickup[t,i] - -> - pos_height[t+1,block_pos] == pos_height[t,block_pos] - 1 -); - -% Height of delivery -constraint forall(t in TTT, i in GRID) (let {var int: block_pos = agent_block_position[t,i]} in - agent_delivery[t,i] - -> - pos_height[t,block_pos] == pos_height[t,i] -); -constraint forall(t in TTT, i in GRID) (let {var int: block_pos = agent_block_position[t,i]} in - agent_delivery[t,i] - -> - pos_height[t+1,block_pos] == pos_height[t,block_pos] + 1 -); - -% Height change -constraint forall(t in TTT, i in GRID) ( - pos_height[t+1,i] == pos_height[t,i] - - sum(j in neighbours[i]) (bool2int(agent_pickup[t,j] /\ agent_block_position[t,j] == i)) - + sum(j in neighbours[i]) (bool2int(agent_delivery[t,j] /\ agent_block_position[t,j] == i)) -); - -% ------------------------------------------- -% Symmetry-breaking and redundant constraints -% ------------------------------------------- - -% Start at the first time step -constraint symmetry_breaking_constraint(exists(i in BORDER) ( - agent_action[min(TT)+1,i] != UNUSED -)); - -% Height decrease - pickup -constraint forall(t in TTT, i in GRID) (redundant_constraint( - pos_height[t+1,i] == pos_height[t,i] - 1 - -> - exists(j in neighbours[i]) (agent_pickup[t,j] /\ agent_block_position[t,j] == i) -)); - -% Height increase - delivery -constraint forall(t in TTT, i in GRID) (redundant_constraint( - pos_height[t+1,i] == pos_height[t,i] + 1 - -> - exists(j in neighbours[i]) (agent_delivery[t,j] /\ agent_block_position[t,j] == i) -)); - -% ------------------ -% Objective function -% ------------------ - -var int: objective = sum(t in TT, i in GRID) (bool2int(agent_action[t,i] != UNUSED)); - -solve :: seq_search([ - int_search(agent_action, first_fail, indomain_min, complete), - int_search(agent_next_position, first_fail, indomain_min, complete), - int_search(agent_block_position, first_fail, indomain_min, complete), - int_search(agent_carrying, first_fail, indomain_min, complete), - int_search(pos_height, first_fail, indomain_min, complete), -]) minimize objective; - -output [ - "objective = \(objective);\n", - "pos_height = array2d(\(TT), \(WORLD), \(pos_height));\n", - "agent_action = array2d(\(TT), \(WORLD), \(agent_action));\n", - "agent_next_position = array2d(\(TT), \(WORLD), \(agent_next_position));\n", - "agent_block_position = array2d(\(TT), \(GRID), \(agent_block_position));\n", - "agent_carrying = array2d(\(TT), \(WORLD), \(agent_carrying));\n", - "agent_pickup = array2d(\(TTT), \(GRID), \(agent_pickup));\n", - "agent_delivery = array2d(\(TTT), \(GRID), \(agent_delivery));\n", -]; diff --git a/data/models/mario/generator.essence b/data/models/mario/generator.essence deleted file mode 100644 index 79eb8179..00000000 --- a/data/models/mario/generator.essence +++ /dev/null @@ -1,72 +0,0 @@ -$mario -$ A generator model for the Mario problem -$ Written by: Joan Espasa Arxer - -$ Mario is a routing problem about the famous italian plumber. -$ His objective is to find gold in the plumbing of all the houses in the neighborhood. -$ Mario moves using his kart, which has a specific amount of fuel. -$ Mario's day always starts in his house and ends in Luigi's house. -$ The problem aims to find the best path in order to earn the more money with the amount of fuel of his kart. -$ -$ From a more general point of view, the problem is to find a path in a graph such that: -$ - Path endpoints are given (from Mario's to Luigi's) -$ - The sum of weights associated to arcs in the path is restricted (fuel consumption) -$ - The sum of weights associated to nodes in the path has to be maximized (gold coins) -$ -$ original authors of the minizinc model: Amaury Ollagnier, Jean-Guillaume Fages - -$ Parameters in the minizinc model: -$ int: nbHouses; % number of houses -$ int: MarioHouse; % index of mario's house (start) -$ int: LuigiHouse; % index of luigi's house (end) -$ int: fuelMax; % quantity of fuel Mario's kart starts with -$ int: goldTotalAmount; % upper bound on the maximisation function -$ % fuel consumption between two houses -$ array[1..nbHouses,1..nbHouses] of int: conso; -$ % gold coins Mario can get in each house (marios and luigis house always 0) -$ array[1..nbHouses] of int: goldInHouse; - - -$ TODO: does the ratio between fuel and number of houses affect how hard an instance is? - -$ parameters given to us by irace -given num_houses : int(15..100) -given total_fuel : int(2000..20000) -given max_distance: int(1..500) -given max_gold : int(1..100) - -letting houses be domain int(1..num_houses) - -find nbHouses : int(num_houses..num_houses) $ passthrough variable -find fuelMax : int(total_fuel..total_fuel) $ passthrough variable -find MarioHouse : houses -find LuigiHouse : houses -find goldTotalAmount : int(1..max_gold) - -find conso : matrix indexed by[houses, houses] of int(0..max_distance) -find goldInHouse: matrix indexed by[houses] of int(0..max_gold) - -such that - -$ make sure at least we can reach Luigi's house ... -conso[MarioHouse, LuigiHouse] <= total_fuel, - -$ total gold is just the sum of all houses -goldTotalAmount = sum(goldInHouse), - -$ start and end does not have gold in them -goldInHouse[MarioHouse] = 0, -goldInHouse[LuigiHouse] = 0, -$ and they are different, of course -MarioHouse != LuigiHouse, - -$ distances are euclidean -forAll house1 : houses . - forAll house2 : houses . - conso[house1,house2] = conso[house2,house1], - -$ diagonal is 0 -forAll house : houses . - conso[house,house] = 0, - -true diff --git a/data/models/mario/problem.mzn b/data/models/mario/problem.mzn deleted file mode 100644 index 9d8129d9..00000000 --- a/data/models/mario/problem.mzn +++ /dev/null @@ -1,72 +0,0 @@ -% This models a routing problem based on a little example of Mario's day. -% Mario is an Italian Plumber and his work is mainly to find gold in the plumbing of all the houses of the neighborhood. -% Mario is moving in the city using his kart that has a specified amount of fuel. Mario starts his day of work from his house -% and always ends to his friend Luigi's house to have the supper. The problem here is to plan the best path for -% Mario in order to earn the more money with the amount of fuel of his kart ! -% -% From a more general point of view, the problem is to find a path in a graph: -% - Path endpoints are given (from Mario's to Luigi's) -% - The sum of weights associated to arcs in the path is restricted (fuel consumption) -% - The sum of weights associated to nodes in the path has to be maximized (gold coins) -% -% authors: Amaury Ollagnier, Jean-Guillaume Fages -include "subcircuit.mzn"; - - %%%%%%%%%%%%%%% - % PARAMETERS % - %%%%%%%%%%%%%%% - -int: nbHouses; -int: MarioHouse; -int: LuigiHouse; -int: fuelMax; -int: goldTotalAmount; -% fuel consumption between two houses -array[1..nbHouses,1..nbHouses] of int: conso; -% gold coins Mario can get in each house -array[1..nbHouses] of int: goldInHouse; - - %%%%%%%%%%%%%%% - % VARIABLES % - %%%%%%%%%%%%%%% - -% successor variables -array[1..nbHouses] of var 1..nbHouses: succ; -% fuel that is consumed -var 0..fuelMax: fuel; -% earned gold coins -var 0..goldTotalAmount: objective; - - %%%%%%%%%%%%%%% - % CONSTRAINTS % - %%%%%%%%%%%%%%% - -% Controls the amount of fuel that is consumed -constraint fuel = sum(i in 1..nbHouses) (conso[i,succ[i]]); - -% Controls the amount of gold coins that is earned -constraint objective = sum(i in 1..nbHouses) (bool2int(succ[i]!=i)*goldInHouse[i]); - -% The solution must form a path from Mario's house to Luigi's -constraint subcircuit(succ); -constraint succ[LuigiHouse] = MarioHouse; - - %%%%%%%%%%%%%%% - % SEARCH AND % - % OUTPUT % - %%%%%%%%%%%%%%% - -solve - :: seq_search([ - int_search(succ, first_fail, indomain_min, complete), - int_search([objective], input_order, indomain_max, complete) - ]) - maximize objective; - -output [ - "%% Mario earned " ++ show(objective) ++ " gold coins with " ++ show(fuel) ++ "L of fuel\n" -] ++ [ - "succ = ", show(succ), ";\n", - "objective = ", show(objective), ";\n" -]; - diff --git a/data/models/racp/generator.essence b/data/models/racp/generator.essence deleted file mode 100644 index 1dcd71be..00000000 --- a/data/models/racp/generator.essence +++ /dev/null @@ -1,95 +0,0 @@ -$racp -$ written by: Peter Nightingale -language ESSENCE 1.3 - -$$$$ Let the tuner decide the following: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - -given nResources: int(2..5) $ Number of resources. -given nTasks: int(1..60) $ Number of tasks. 1 and nTasks are dummy starting and ending ones. - - -given cost_bound1, cost_bound2 : int(1..10) $ entries in cost matrix lie between these two values. - -given dur_bound1, dur_bound2 : int(1..10) $ entries in dur matrix lie between these two values. - -given res_zeros: int(0..100) $ percentage of resource requirement entries that are zero. -given res_bound1, res_bound2 : int(1..10) $ For non-zero resource requirements, lie between these values. - -$ Precedence graph. -given prec_layers : int(4..7) -given prec_density : int(1..3) $ average number of edges per task in succ - -given tMax : int(20..100) - -letting Res be domain int(1..nResources) -letting Tasks be domain int(1..nTasks) - -$$$$ Fill in the details of the required resources, task precedences etc. $$$$$$$$$$$$$$$ - -$ Pass through these values into the solution. -find n_res : int(nResources) -find n_tasks : int(nTasks) -find t_max : int(tMax) - -$ Unit cost of resources -find cost: matrix indexed by [Res] of int(min([cost_bound1, cost_bound2])..max([cost_bound1, cost_bound2])) - -$ Duration of tasks -find dur: matrix indexed by [Tasks] of int(min([dur_bound1, dur_bound2])..max([dur_bound1, dur_bound2])) - -$ Resource requirements of tasks - -find succ_rel: matrix indexed by [Tasks] of set of int(2..nTasks) $ The successor relation. Task 1 cannot be successor of any other. - -find succ_levels : matrix indexed by [Tasks] of int(1..prec_layers) $ map each vertex to a layer to ensure acyclicity in succ. - -letting rr_entries be nTasks*nResources - -find rr: matrix indexed by [Res, Tasks] of int(0, min([res_bound1, res_bound2])..max([res_bound1, res_bound2])) $ O or within the interval -find rr_zero_entries : int(0..rr_entries) - -$ Make sure that all tasks have an earliest start time within range, so the mzn model does not crash. -$ find est : matrix indexed by [Tasks] of int(0..tMax) - -such that - -$ Percentage of rr that is 0. -sum([ toInt(rr[i,j]=0) | i : Res, j : Tasks])=rr_zero_entries, - -$ Percentage given by tuner lies within an interval (interval may be one value, depending on size of matrix). -res_zeros >= (rr_zero_entries*100)/rr_entries, -res_zeros <= ( (rr_zero_entries+1)*100)/rr_entries, - -$ Make the succ relation acyclic. - -and([ succ_levels[t]0, - -$ Every task except the first has at least one predecessor -forAll t : int(2..nTasks). exists t2 : Tasks. t in succ_rel[t2], - -$ Set the layers of the first and last task. -succ_levels[1]=1, -succ_levels[nTasks]=prec_layers, - -$ dominance: successors of 1 must be in layer 2. Makes little difference to Minion -prec_layers>2 -> - and([t!=nTasks -> succ_levels[t]=2 | t <- succ_rel[1]]), - -$ Tasks 1 and nTasks have no resource requirements - -forAll t : int(1,nTasks). forAll r : Res. rr[r,t]=0, - -$ Average density of the succ relation. -sum([ |succ_rel[t]| | t : Tasks])/n_tasks = prec_density, - -$ Make sure all tasks have an est within range. Should no longer be needed. -$est[1]=0, -$forAll t : Tasks . and([ est[t]+dur[t]<=est[tsucc] | tsucc <- succ_rel[t]]), - -true diff --git a/data/models/racp/problem.mzn b/data/models/racp/problem.mzn deleted file mode 100644 index af475f23..00000000 --- a/data/models/racp/problem.mzn +++ /dev/null @@ -1,257 +0,0 @@ -%-----------------------------------------------------------------------------% -% Resource Availability Cost Problem (also known as Resource Investment Problem) -% -% The problem consists of a set of tasks having some precedence relations -% between them and requiring some resource from scarce renewable resource -% having a different availability cost per unit. The goal is to complete all -% tasks in the given planning horizon, so that the resource availability -% cost is minimised. Note that cost per unit does not depend on its -% utilisation! -% -% This simple model was derived from the model presented in this publication: -% -% Stefan Kreter, Andreas Schutt, Peter J. Stuckey, Jürgen Zimmermann (2018): -% Mixed-integer Linear Programming and Constraint Programming Formulations -% for Solving Resource Availability Cost Problems. European Journal of -% Operational Research, Volume 266, Issue 2, pages 472-486. 2018. -% https://doi.org/10.1016/j.ejor.2017.10.014 -% -% Submitter: Andreas Schutt -% -%-----------------------------------------------------------------------------% -% MiniZinc Version Requirement - - % Note that at least version 2.1.7 is required due to a bug in the - % evaluation of recursive functions in previous versions. -mzn_min_version_required = 21007; - -%-----------------------------------------------------------------------------% -% Includes - -include "cumulative.mzn"; - -%-----------------------------------------------------------------------------% -% Parameters - - % Resources - % -int: n_res; % The number of resources -set of int: Res = 1..n_res; % The set of resources -array [Res] of int: cost; % The unit cost of resources -array [Res] of int: lb_usage = % Trivial lower bound on the resource demand - [ max(i in Tasks)(rr[r, i]) | r in Res ]; -array [Res] of int: ub_usage = % Trivial upper bound on the resource demand - [ sum(i in Tasks)(rr[r, i]) | r in Res ]; -array [Res] of int: lb_cost = % Trivial lower bound on the resource cost - [ cost[r] * lb_usage[r] | r in Res ]; -array [Res] of int: ub_cost = % Trivial upper bound on the resource cost - [ cost[r] * ub_usage[r] | r in Res ]; - - % Tasks - % -int: n_tasks; % The number of tasks -set of int: Tasks = 1..n_tasks; % The set of tasks -array [Tasks] of int: dur; % The duration of tasks -array [Res, Tasks] of int: rr; % The resource requirement of tasks -array [Tasks] of set of Tasks: succ; % The (immediate) successors of tasks - - - % Planning Horizon - % -int: t_max; % End of the planning horizon -set of int: Times = 0..t_max; % The planning horizon - - -%-----------------------------------------------------------------------------% -% Derived parameters and schedule - - % Tasks - % -array [Tasks] of set of Tasks: prec = % The (immediate) predecessors of tasks - [ {j | j in Tasks diff all_succ[i] where i in succ[j]} | i in Tasks ]; -array [Tasks] of set of Tasks: all_succ = % All successors of tasks - [ all_succs(i) | i in Tasks ]; -array [Tasks] of set of Tasks: all_prec = % All predecessors of tasks - [ {j | j in Tasks diff all_succ[i] where i in all_succ[j]} | i in Tasks ]; -array [Tasks] of set of Tasks: unrelated = % All unrelated tasks of tasks (no successor and no predecessor) - [ Tasks diff all_succ[i] diff all_prec[i] diff {i} | i in Tasks ]; - - % The earliest start time schedule - % -array [Tasks] of largeTimes: es = [ est(i) | i in Tasks ]; - - % The maximal resource consumption for the earliest start time schedule - % -array [Res] of int: rusage_es = - [ max(i in Tasks)( - rr[r, i] + sum(j in unrelated[i] where overlap(es[i], dur[i], es[j], dur[j]))(rr[r, j]) - ) - | r in Res ]; - - % The latest completion time schedule - % -array [Tasks] of largeTimes: ls = [ lct(i) | i in Tasks ]; - - % The maximal resource consumption for the latest completion time schedule - % -array [Res] of int: rusage_ls = - [ max(i in Tasks)( - rr[r, i] + sum(j in unrelated[i] where overlap(ls[i] - dur[i], dur[i], ls[j] - dur[j], dur[j]))(rr[r, j]) - ) - | r in Res ]; - -%-----------------------------------------------------------------------------% -% Variables. - - % The start times of tasks - % -array [Tasks] of var Times: s; - - % The resource capacity/usage - % -array [Res] of var min(lb_usage)..max(ub_usage): rcap; - - % The objective - % -var sum(lb_cost)..sum(ub_cost): objective; - -%-----------------------------------------------------------------------------% -% Auxiliary functions and tests - - % Computing all successors of a task - % (Note that this is not an efficient computation of all successors for a - % task and may take a long time for a large number of tasks.) - % -function set of Tasks: all_succs(Tasks: i) = ( - let { - array[int] of set of Tasks: all_succs_js = - [ all_succs(j) | j in succ[i] ]; - } in array_union(all_succs_js) union succ[i] -); - - % Test whether the executions of two tasks are overlapping - % -test overlap(int: si, int: di, int: sj, int: dj) = ( - si < sj + dj /\ sj < si + di -); - - % Computation of the earliest start time of a task in the earliest - % start time schedule - % (Note that this is not an efficient computation of the earliest - % start time and may take a long time for a large number of tasks.) - % -set of int: largeTimes = -10000000..10000000; - -function largeTimes: est(Tasks: i) = ( - let { - array[int] of largeTimes: all_prec_ect = [0] ++ [ est(j) + dur[j] | j in prec[i] ]; - } in - max(all_prec_ect) -); - - % Computation of the latest completion time of a task in the latest - % completion time schedule - % (Note that this is not an efficient computation of the latest - % completion time and may take a long time for a large number of - % tasks.) - % -function largeTimes: lct(Tasks: i) = ( - let { - array[int] of largeTimes: all_succ_lst = [t_max] ++ [ lct(j) - dur[j] | j in succ[i] ]; - } in - min(all_succ_lst) -); - -%-----------------------------------------------------------------------------% -% Constraints. - - % Restricting the bounds on the resource capacity - % -constraint forall(r in Res)( - lb_usage[r] <= rcap[r] /\ rcap[r] <= ub_usage[r] -); - -constraint forall(i in Tasks)( - s[i] + dur[i] <= t_max -); - - % Precedence constraints - % -constraint forall(i in Tasks, j in succ[i])( - s[i] + dur[i] <= s[j] -); - - - % Cumulative resource constraints - % Note that this constraint will not bind the resource capacity variable! -constraint forall(r in Res)( - cumulative(s, dur, [ rr[r, i] | i in Tasks ], rcap[r]) -); - - % Redundant non-overlapping constraints - % Seems to be not worhtwhile at least for Chuffed -constraint redundant_constraint( - forall(i in Tasks, j in unrelated[i])( - forall(r in Res where rr[r, i] + rr[r, j] > lb_usage[r])( - (rr[r, i] + rr[r, j] > rcap[r]) -> ( - (s[i] + dur[i] <= s[j]) \/ (s[j] + dur[j] <= s[i]) - ) - ) - ) -); - - % Redundant constraint on the lower bound of the resource capacity - % modelling the task-decomposition of a cumulative constraint -%constraint redundant_constraint( -%/\ forall(i in Tasks, r in Res where rr[r, i] > 0)( -% rcap[r] >= rr[r, i] + sum(j in unrelated[i] where rr[r, j] > 0)( -% rr[r, j] * not( -% (s[j] + dur[j] <= s[i]) \/ (s[j] > s[i]) -% ) -% ) -% ) -%); - - % Resource availability constraint - % -constraint objective = sum(r in Res)( cost[r] * rcap[r] ); - - % Upper bound on the resource availability cost wrt. to the - % earliest start time schedule -constraint objective <= sum(r in Res)( cost[r] * rusage_es[r] ); - - % Upper bound on the resource availability cost wrt. to the - % latest completion time schedule -constraint objective <= sum(r in Res)( cost[r] * rusage_ls[r] ); - - - -%-----------------------------------------------------------------------------% -% Search. - -ann: search1 = seq_search([ - int_search(rcap, first_fail, indomain_min, complete), - int_search(s, smallest, indomain_min, complete) -]); - -array [Res] of Res: sort_idx_cost_desc = reverse(arg_sort(cost)); -ann: search2 = seq_search([ - int_search([rcap[sort_idx_cost_desc[r]] | r in Res], input_order, indomain_min, complete), - int_search(s, smallest, indomain_min, complete) -]); - -solve - :: search1 - minimize objective; - -%-----------------------------------------------------------------------------% -% Output. - -output [ - "s = \(s);\n", - "rcap = \(rcap);\n", - "objective = \(objective);\n" -]; - -%-----------------------------------------------------------------------------% - diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf1..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/compile.sh b/docs/compile.sh deleted file mode 100755 index e1b888af..00000000 --- a/docs/compile.sh +++ /dev/null @@ -1,2 +0,0 @@ -make clean html -make html diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 747ffb7b..00000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/source/_static/autoig.png b/docs/source/_static/autoig.png deleted file mode 100644 index 9c01bfa5..00000000 Binary files a/docs/source/_static/autoig.png and /dev/null differ diff --git a/docs/source/_static/macc-example-instances.png b/docs/source/_static/macc-example-instances.png deleted file mode 100644 index 55e29610..00000000 Binary files a/docs/source/_static/macc-example-instances.png and /dev/null differ diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 2005d17a..00000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,59 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- Project information ----------------------------------------------------- - -project = 'AutoIG' -copyright = '2022, Nguyen Dang' -author = 'Nguyen Dang' - -# The full version, including alpha/beta/rc tags -release = '1.0' - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -import sphinx_rtd_theme - -html_theme = 'sphinx_rtd_theme' - -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file diff --git a/docs/source/create-an-instance-generator.rst b/docs/source/create-an-instance-generator.rst deleted file mode 100644 index 500f47e3..00000000 --- a/docs/source/create-an-instance-generator.rst +++ /dev/null @@ -1,113 +0,0 @@ -Create an instance generator -===================================================================================== - -Imagine that we want to create new instances for a given problem, a typical approach would be to: - - (1) write a generator program that receives some parameters and outputs a number of random solutions according to the values of those parameters. For example, to create new instances for the bin packing problem, we can write a generator that receives as input the number of items, the range of bin's capacity, the ratio of items with certain ranges of sizes (small/medium/large), etc, and make sure that the generator will output instances that satisfy those inputs. - (2) fine tune the parameters of the generator if we want to tailor the generation towards instances with certain properties that we are interested in, such as instances that are non-trivial to solve by a particular solver. - -AutoIG takes an alternative approach to (1) and let users describe the instance generator *declaratively* as a constraint model, leaving the task of creating the instances themselves to a constraint solver. More specificially, given a parameter setting of the generator model, i.e., a *generator instance*, new instances are generated via solving the generator model using the constraint solver `minion`_. An additional advantage of this approach is that in certain scenarios, users may only be interested in some particular types instances with certain structures. Such information can be injected into the generator model as constraints (we call them **validity constraints**), and AutoIG will only accept instances that satisfy such constraints. - -.. _`minion`: https://constraintmodelling.org/minion/ - -We provide a number of `example generator models`_ (written in Essence_) for five problems taken from the `MiniZinc competitions`_. More details about those generators can be found in our `paper`_ (section 4). - -.. _`example generator models`: https://github.com/stacs-cp/AutoIG/tree/main/data/models -.. _Essence: https://conjure.readthedocs.io/en/latest/essence.html -.. _`MiniZinc competitions`: https://www.minizinc.org/challenge.html -.. _`paper`: https://arxiv.org/abs/2205.14753 - -**A generator model include three parts:** - - - *Generator parameters*: parameters of the generator. Those parameters will be tuned by irace to find the instance subspaces that contains instances with desirable properties (link). - - *Decision variables*: those correspond to the parameters of the original problem description model (i.e., problem instance parameters). Their names must match the names in the original problem model. - - *Constraints*: those are validity constraints among instance parameters of the original problem. AutoIG will only generate instances that satisfy those constraints. - - - -Below is an example generator model for the Multi-Agent Collaborative Construction (MACC) problem [LSKK20]_. This is a planning problem that involves constructing a building by placing blocks in a 3D map using multiple identical agents (i.e., robots). Ramps must be built to access the higher levels of the building. The objectives are to to minimise the makespan (primary objective) and the total cost (secondary objective). A MiniZinc model of the problem can be downloaded from the MiniZinc challenge website (link). A copied of the same model is also available at: ``data/models/macc/problem.mzn``. - -An MACC instance (in MiniZinc format) consists of the following information: - -.. code-block:: rst - - int: A; % Number of agents - int: T; % Time horizon - int: X; % Width - int: Y; % Depth - int: Z; % Height - array[YY,XX] of ZZ: building; % Structure to construct - -An instance generator model can simply parameterise the number of agents (A), time horizon (T), map sizes (X, Y, Z) as its input and let AutoIG pick the right values for those parameters. The only bit left is the `building`. We could just let the generator model create a random 3D array without any constraints on it. But that may not be very useful. For example, considering the following two `building` structures: - -.. figure:: _static/macc-example-instances.png - :scale: 50% - :alt: MACC example instances - :align: center - - Two example MACC instances of the same map size of 7x7x3. - -The `building` structure on the left only has 4 blocks located in the middle of the map, and it is likely easier to build compared to the one on the right. In general, having less blocks on the ground makes it more flexible for the multiple robots to move around without bumping into each other, while having taller building makes it more difficult to build since the robots have to make ramps to climb up. To guide the the instance generation process, we can add two parameters to the generator model for the `building` structure to reflect those factors: the percentage of blocks of the building being placed on the ground level (`ground_coverage`), and the average height across all columns of the building (`avg_height_ratio`). - -The full generator model for MACC, written in `Essence`_, will then be: - -.. code-block:: rst - - $ Modelling language: Essence - - given Ag: int(1..10) $ number of agents - given Tg: int(1..200) $ time horizon - given Xg: int(3..50) $ width & depth of the map, cells at borders are not used for the building's structure so Xg and Xg must be >2 - given Zg: int(2..10) $ height of the map - - $ decision variables of the generator model ~ instance parameters - $ must match the names of instance parameters in the original problem description model - find A, T, X, Y, Z: int(1..200) - such that - A=Ag, T=Tg, X=Xg, Y=Xg, Z=Zg - - $ percentage of the construct's ground coverage, the larger this value is, the more likely the instance is hard due to possible collisions between agents - given ground_coverage: int(1..100) - $ the number of blocks on the ground (we want to have at least one block) - letting n_ground_blocks be max({1, ground_coverage * (Xg-2) * (Xg-2) / 100}) $ maximum number of ground blocks is (Xg-2)*(Xg-2) because borders must be empty (for agents to enter the map) - - $ normalised average height of the structure (ground layer is ignored) - $ avg_height_ratio = 0: all cells of the structure has a height of 1 (all blocks are on the ground layer) - $ avg_height_ratio = 1: all cells of the structure has the maximum height (Zg-1) - given avg_height_ratio: int(0..100) - - $ we can now calculate the total number of blocks of the structure based on previous parameters - letting n_blocks be n_ground_blocks + avg_height_ratio * n_ground_blocks * (Zg-2) / 100 - - $ the structure is defined as a matrix, where each element represents the number of blocks located that cell - letting rows be domain int(0..Xg-1) - letting cols be domain int(0..Xg-1) - find building : matrix indexed by [rows, cols] of int(0..Zg-1) $ maximum height of the structure is Zg-1 as specified in the MiniZinc problem description model - - such that - - $ no blocks are located on the border cells - and([building[row,0]=0 | row: rows]), - and([building[row,Xg-1]=0 | row: rows]), - and([building[0,col]=0 | col: cols]), - and([building[Xg-1,col]=0 | col: cols]), - - $ constraint on the number of blocks on the ground layer - sum([toInt(building[row, col]>0) | row: rows, col: cols]) = n_ground_blocks, - - $ constraint on the total number of blocks - sum([building[row, col] | row: rows, col: cols]) = n_blocks - -**Notes:** - - The names of the decision variables in the generator model (`A`, `I`, `X`, `Y`, `Z`, `building`) must match the name of instance parameters in the original problem model (link). - - **Auxilary varilables in generator model**: In some cases, it may be useful to have *auxilary variables* in the generator model (to make the model easier to write/read). Those variables are *not* instance parameters and *should not be included* in the generated instances. To let AutoIG knows that a decision variable in the generator is an auxilary one, please add a prefix ``Aux`` into the variable name. See the `generator model of the Carpet Cutting problem`_ for an example. - - **Domains of generator parmeters**: Those are *integers only*. The lower/upper bounds specified in the generator model will be passed onto irace for the tuning process. - -.. _`generator model of the Carpet Cutting problem`: https://github.com/stacs-cp/AutoIG/blob/main/data/models/carpet-cutting/generator.essence - - - -**References** - -.. [LSKK20] Lam, E., Stuckey, P.J., Koenig, S. and Kumar, T.K., 2020, September. Exact approaches to the multi-agent collective construction problem. In *Proceedings of the 26th International Conference on Principles and Practice of Constraint Programming* (CP2020) - diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index ad40add5..00000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. AutoIG documentation master file, created by - sphinx-quickstart on Fri Jul 8 16:34:03 2022. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -AutoIG -======================= - -Welcome to AutoIG's documentation! - -.. toctree:: - :maxdepth: 3 - - introduction - installation - quick-examples - create-an-instance-generator - setup-the-experiment - start-the-tuning - - - - - - diff --git a/docs/source/installation.rst b/docs/source/installation.rst deleted file mode 100644 index 788945bb..00000000 --- a/docs/source/installation.rst +++ /dev/null @@ -1,42 +0,0 @@ -Installation -------------------- - -AutoIG makes use of several softwares, including: - - - The `Essence pipeline`_: a constraint modelling toolchain developed by our Constraint Programming group at University of St Andrews and University of York. The pipeline supports modelling a combinatorial optimisation problem as a constraint model. Starting with an abstract specification of a constraint problem (written in Essence_), the pipeline can perform the modelling and solving phases efficiently and automatically via the constraint modelling and reformulation tools `Conjure`_ [AFGJ22]_ and `Savile Row`_ [NAGJ17]_. - - - The automated algorithm configurator `irace`_ [LDCB16]_: irace is a general-purpose automated tool for configuring parameters of algorithms. - - - The `MiniZinc`_ [NSBB07]_ toolchain: a constraint modelling toolchain developed at Monash University, in collaboration with Data61 Decision Sciences and the University of Melbourne. MiniZinc supports `several solvers`__ via their FlatZinc interfaces. AutoIG uses MiniZinc to access those solvers and generate benchmarking instances for them. - - - `runsolver`_ [Rous11]_: a tool for controlling solver execution (to ensure that memory and time limit are respected). - -.. _`Essence pipeline`: https://constraintmodelling.org/ -.. _Essence: https://conjure.readthedocs.io/en/latest/essence.html -.. _`Conjure`: https://github.com/conjure-cp/conjure -.. _`Savile Row`: https://savilerow.cs.st-andrews.ac.uk/ -.. _`irace`: https://iridia.ulb.ac.be/irace/ -.. _`MiniZinc`: https://www.minizinc.org/ -.. __: https://www.minizinc.org/software.html -.. _`runsolver`: https://content.iospress.com/articles/journal-on-satisfiability-boolean-modeling-and-computation/sat190083 - -To install all softwares, a bash script is provided in ``bin/install-all.sh``. The script will download and install all softwares into ``bin/``. - -After installation, please set the environment variables accordingly by running the following line at the beginning of each bash session: - -.. code-block:: rst - - . bin/set-path.sh - - -**References** - -.. [AFGJ22] Akgün, Ö., Frisch, A.M., Gent, I.P., Jefferson, C., Miguel, I. and Nightingale, P., 2022. Conjure: Automatic Generation of Constraint Models from Problem Specifications. Artificial Intelligence, p.103751. - -.. [NAGJ17] Nightingale, P., Akgün, Ö., Gent, I.P., Jefferson, C., Miguel, I. and Spracklen, P., 2017. Automatically improving constraint models in Savile Row. *Artificial Intelligence*, **251**, pp.35-61. - -.. [LDCB16] López-Ibáñez, M., Dubois-Lacoste, J., Cáceres, L.P., Birattari, M. and Stützle, T., 2016. The irace package: Iterated racing for automatic algorithm configuration. *Operations Research Perspectives*, **3**, *pp.43-58*. - -.. [NSBB07] Nethercote, N., Stuckey, P.J., Becket, R., Brand, S., Duck, G.J. and Tack, G., 2007, September. MiniZinc: Towards a standard CP modelling language. *In International Conference on Principles and Practice of Constraint Programming (pp. 529-543)*. Springer, Berlin, Heidelberg. - -.. [Rous11] Roussel, O., 2011. Controlling a solver execution with the runsolver tool. Journal on Satisfiability, *Boolean Modeling and Computation*, **7(4)**, *pp.139-144*. \ No newline at end of file diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst deleted file mode 100644 index 229f1b23..00000000 --- a/docs/source/introduction.rst +++ /dev/null @@ -1,41 +0,0 @@ -Introduction -============================================== - -Welcome to AutoIG's documentation! -`[Github repo]`_ - -.. _`[Github repo]`: https://github.com/stacs-cp/AutoIG - - -AutoIG is a tool that supports generating new instances for benchmarking solvers via the use of constraint modelling and automated algorithm configuration. The tool currently focuses on generating instances for constraint problems written in either MiniZinc_ or Essence__. - -.. __: https://conjure.readthedocs.io/en/latest/essence.html -.. _MiniZinc: https://www.minizinc.org/ - -AutoIG receives as input a description of a constraint problem, an instance generator (written as a constraint model), and the solver(s) (must be accessible via either the MiniZinc_ or the Essence_ toolchains) that we want to benchmark. The tool makes use of the constraint modelling pipepline Essence_ and the automated algorithm configurator irace_ to search in the parameter space of the instance generator and create valid instances with certain desirable properties: graded (for a single solver, solvable within a certain range of time by that solver); or discriminating (for a pair of solvers, easy to solve by one solver and difficult to solve by the other). - -.. _Essence: https://constraintmodelling.org/ -.. _irace: https://iridia.ulb.ac.be/irace/ - -.. image:: _static/autoig.png - :height: 300px - :alt: AutoIG - :align: center - - -For more information about AutoIG and a case study demonstrating it usefulness in benchmarking solvers in a competition context, please see our paper here__ - -.. __: https://arxiv.org/abs/2205.14753 - -Citation ------------------------------------- -If you use AutoIG, please cite us: - -.. code-block:: rst - - @inproceedings{dang2022framework, - title={A Framework for Generating Informative Benchmark Instances}, - author={Dang, Nguyen and Akg{\"u}n, {\"O}zg{\"u}r and Espasa, Joan and Miguel, Ian and Nightingale, Peter}, - booktitle={International Conference on Principles and Practice of Constraint Programming}, - year={2022} - } \ No newline at end of file diff --git a/docs/source/quick-examples.rst b/docs/source/quick-examples.rst deleted file mode 100644 index 4b619d8f..00000000 --- a/docs/source/quick-examples.rst +++ /dev/null @@ -1,75 +0,0 @@ -Quick examples ----------------------------------------- - -AutoIG supports generating two types of instances: - - graded instances (for a single solver only): instances "solvable" by a given solver within [a, b] seconds, where ``a`` and ``b`` are specified by users. - - discriminating instances (for a pair of solvers): instances that are easier to solve by one solver (the **favoured solver**) compared to the other (the **based solver**). - -Below are two quick examples on how to setup and run AutoIG. For detailed explanation of the full process, please see the next sections of this documentation. - -**Generating graded instances** - -The following commands setup a graded instance generation experiment for the MACC problem. The solver we are interested in is `Chuffed`_. We will generate instances that can be solved by Chuffed within 2 seconds. An extra flag ``-f`` is passed to Chuffed to let it choose its own search strategy. We allow a maximum time limit of 5 seconds for minion during each generator instance's solving process. The total budget of the instance generation process is 180 evaluations. We will use a slightly modified version of the MACC generator (``data/models/macc/generator-small.essence``, where the domains for generator parameters are reduced so irace can find some graded instances within the tiny budget given. - -.. code-block:: console - - cd $AUTOIG/ - mkdir -p experiments/macc-graded/ - cd experiments/macc-graded/ - python $AUTOIG/scripts/setup.py --generatorModel $AUTOIG/data/models/macc/generator-small.essence --problemModel $AUTOIG/data/models/macc/problem.mzn --instanceSetting graded --minSolverTime 0 --maxSolverTime 5 --solver chuffed --solverFlags="-f" --maxEvaluations 180 --genSolverTimeLimit 5 - -The setup command above will generate a number of files in ``experiments/macc-graded``, which will be used by AutoIG during the instance generation process. Users only to need to pay attention to one file: ``run.sh``. This is the script for starting the instance generation process and for collecting results afterwards. Also all outputs of the instance generation process will be in located in ``detailed-output/`` folder. - -After setting up the experiment, to start the instance generation process, run: - -.. code-block:: console - - bash run.sh - -This script will start irace and when the instance generation process is finished, it will also extract the list of graded/discriminating instances from the raw outputs and their detailed results. A summary of results will be printed out to the screen: - -.. code-block:: rst - - Total #runs: 171 - Total #instances generated: 104 - - #graded instances: 54 (/114 runs) - #too difficult instances: 50 (/50 runs) - -In the example above, 171 evaluations have been used during the instance generation process. There are 104 (unique) candidate instances generated, among them there are 54 graded instances and 50 instances where Chuffed cannot solve within the given (tiny) time limit. Different generator configurations may produce the same candidate instances. The number of runs shown in the brackets indicate the total number of candidate instances including duplicated ones (114 for graded instances and 50 for difficult instances). - -**Generating discriminating instances** - -The following commands setup a discriminating instance generation experiment for the MACC problem. The solvers we are interested in are `Chuffed`_ and `Google OR-Tools`_. We will generate instances that favour OR-Tools (by maximising the ratio of performance between OR-Tools and Chuffed). To avoid cases where performance difference is simply due to fluctuation in time measurement, e.g., both solvers solve the instance very quickly but the ratio indicates large difference, e.g, 0.002 seconds vs 0.02 seconds (10 times difference in solving time), we can impose a minimum solving time on the base solver Chuffed. In this example AutoIG only accepts candidate instances that require at least 1 second to be solved by Chuffed. A solving time limit of 3 seconds are used for each solver. An extra flag ``-f`` is passed to both solvers. We allow a maximum time limit of 5 seconds for minion during each generator instance's solving process. The total budget of the instance generation process is 180 evaluations. - - -.. code-block:: console - - cd $AUTOIG/ - mkdir -p experiments/macc-discriminating/ - cd experiments/macc-discriminating/ - python $AUTOIG/scripts/setup.py --generatorModel $AUTOIG/data/models/macc/generator-small.essence --problemModel $AUTOIG/data/models/macc/problem.mzn --instanceSetting discriminating --minSolverTime 1 --maxSolverTime 3 --baseSolver chuffed --solverFlags="-f" --favouredSolver ortools --favouredSolverFlags="-f" --maxEvaluations 180 --genSolverTimeLimit 5 - -After setting up the experiment, to start the instance generation process, run: - -.. code-block:: console - - bash run.sh - -A summary of results will be printed out to the screen: - -.. code-block:: rst - - Total #runs: 175 - Total #instances generated: 91 - - #instances where the base solver wins: 8 (/62 runs) - #too easy instances for the base solver: 6 (/25 runs) - #instances where the favoured solver wins: 1 (/1 runs) - #too difficult instances for the favoured solver: 76 (/77 runs) - -.. note:: - The list of graded/discriminating instances and their detailed results are available at ``graded-instances-info.csv`` and ``discriminating-instances-info.csv``, located in the same folder of the experiments. For detailed results of all evaluations during the whole instance generation process, please checkout ``detailed-output.json``, where each line coressponds to a generator configuration evaluation. - -.. _`Chuffed`: https://github.com/chuffed/chuffed -.. _`Google OR-Tools`: https://developers.google.com/optimization \ No newline at end of file diff --git a/docs/source/setup-the-experiment.rst b/docs/source/setup-the-experiment.rst deleted file mode 100644 index a951095c..00000000 --- a/docs/source/setup-the-experiment.rst +++ /dev/null @@ -1,150 +0,0 @@ -Setup the experiment -===================================================================================== - -After preparing an instance generator model, we can start setting up an instance generation experiment for AutoIG. The setup scrip is located at ``scripts/setup.py``. - -A full list of all setup arguments can be found `here`_. Below is a list of the essential ones: - - - ``--problemModel``: path to a description of the problem we want to generate instances for, written as a constraint model in either `Essence`_ or `MiniZinc`_. Note that the model file name should be ended with either ``.essence`` or ``.mzn``. - - ``--generatorModel``: path to a parameterised instance generator of the given problem, written as a constraint model in `Essence`_ (see: :doc:`create-an-instance-generator` for more details). - - ``--instanceSetting``: the type of instances being generated. Must be either ``graded`` or ``discriminating`` (see: `graded/discriminating instance`_ for more details). - - ``--minSolverTime``: (in seconds) instances solved within less than this lower bound will be considered too trivial and will be discarded. For discriminating instance generation, this requirement is only applied to the base solver. Default value: 0 (no lower bound). - - ``--maxSolverTime``: (in seconds) the time limit for each solver call when solving a candidate instance. - - ``--solver``: (graded experiments only) the solver we want to generate instances for. - - ``--favouredSolver``: (discriminating experiments only) the favoured solver, i.e., we want to generate instances that are relatively easy for this solver. - - ``--baseSolver``: (discriminating experiments only) the base solver, i.e., we want to generate instances that are relatively difficult for this solver. - -.. _`examples for setting up an experiment`: - -Examples ---------------------------- - -**Generating graded instances** - -The following commands setup a graded instance generation experiment for the MACC problem. The solver we are interested in is `Chuffed`_. We will generate instances that can be solved by Chuffed within 2 seconds. An extra flag ``-f`` is passed to Chuffed to let it choose its own search strategy. We allow a maximum time limit of 5 seconds for minion during each generator instance's solving process. The total budget of the instance generation process is 180 evaluations. We will use a slightly modified version of the MACC generator (``data/models/macc/generator-small.essence``, where the domains for generator parameters are reduced so irace can find some graded instances within the tiny budget given. - -.. code-block:: console - - cd $AUTOIG/ - mkdir -p experiments/macc-graded/ - cd experiments/macc-graded/ - python $AUTOIG/scripts/setup.py --generatorModel $AUTOIG/data/models/macc/generator-small.essence --problemModel $AUTOIG/data/models/macc/problem.mzn --instanceSetting graded --minSolverTime 0 --maxSolverTime 5 --solver chuffed --solverFlags="-f" --maxEvaluations 180 --genSolverTimeLimit 5 - -The setup command above will generate a number of files in ``experiments/macc-graded``, which will be used by AutoIG during the instance generation process. Users only to need to pay attention to one file: ``run.sh``. This is the script for starting the instance generation process and for collecting results afterwards. Also all outputs of the instance generation process will be in located in ``detailed-output/`` folder. - -After setting up the experiment, to start the instance generation process, run: - -.. code-block:: console - - bash run.sh - -A full list of generated files (and folder) by the setup script is listed below: - - - ``problem.mzn`` or ``problem.essence``: a copy of the original problem specification model. - - ``generator.essence``: a copy of the original instance generator model. - - ``params.irace``, ``instances``, ``run-irace.sh``: files needed to call irace. - - ``generator.eprime``: the instance generator model translated into Essence Prime language, used by the Essence pipeline when solving generator instances. - - ``config.json``: a ``.json`` file containing all settings of the experiments. - - ``detailed-output``: a folder containing all temporary files created during the instance generation process. See LINK for more details. - - -**Generating discriminating instances** - -The following commands setup a discriminating instance generation experiment for the MACC problem. The solvers we are interested in are `Chuffed`_ and `Google OR-Tools`_. We will generate instances that favour OR-Tools (by maximising the ratio of performance between OR-Tools and Chuffed). To avoid cases where performance difference is simply due to fluctuation in time measurement, e.g., both solvers solve the instance very quickly but the ratio indicates large difference, e.g, 0.002 seconds vs 0.02 seconds (10 times difference in solving time), we can impose a minimum solving time on the base solver Chuffed. In this example AutoIG only accepts candidate instances that require at least 1 second to be solved by Chuffed. A solving time limit of 3 seconds are used for each solver. An extra flag ``-f`` is passed to both solvers. We allow a maximum time limit of 5 seconds for minion during each generator instance's solving process. The total budget of the instance generation process is 180 evaluations. - - -.. code-block:: console - - cd $AUTOIG/ - mkdir -p experiments/macc-discriminating/ - cd experiments/macc-discriminating/ - python $AUTOIG/scripts/setup.py --generatorModel $AUTOIG/data/models/macc/generator-small.essence --problemModel $AUTOIG/data/models/macc/problem.mzn --instanceSetting discriminating --minSolverTime 1 --maxSolverTime 3 --baseSolver chuffed --solverFlags="-f" --favouredSolver ortools --favouredSolverFlags="-f" --maxEvaluations 180 --genSolverTimeLimit 5 - -After setting up the experiment, to start the instance generation process, run: - -.. code-block:: console - - bash run.sh - -The list of files (and folder) generated by the setup script is similar to the graded experiment described above. - -.. _`graded/discriminating instance`: - -Graded/Discriminating instances ------------------------------------------------------------------------------------------------- - -AutoIG currently supports generating two types of instances: - - - **graded instances** (for a single solver only): instances "solvable" by a given solver within [a, b] seconds, where ``a`` and ``b`` are specified by users. The lower bound ``a`` is to make sure that trivially solved instances are not included (default value: 0 seconds, i.e., no lower bound), as they are normally not very interesting for the developers of the solver. The definition of "solvable" is as follows: - - - For complete solvers: the solver returns a feasible solution or a claim of unsatisfiablity (for decision problem), or returns the optimial solution and a claim of optimality (for optimisation problems). - - For incomplete solvers (e.g., yuck_ `[BMFP15]`_): the solver returns a feasible solution (for decision problem). In case of optimisation problems, since a proof of optimality cannot be achieved for optimisation problems, we use an external complete solver (called the *oracle*) to solve the instance to optimality (with a time limit of 1 hour) and use the obtained optimal solution as a reference. If the given solver can find a solution with the same optimal objective value, the instance is marked as "solvable" and the solving time is the first time such solution is found. To minimise the overhead of running the oracle external solver, we use `Google OR-Tools`_ as the oracle, as this is a very strong solver (indicated by its several `gold medals`_ at the MiniZinc Challenges). - - - **discriminating instances** (for a pair of solvers): instances that are easier to solve by one solver (the **favoured solver**) compared to the other (the **based solver**). AutoIG will try to search for instances that maximise the ratio between performance of the **favoured solver** and the **base solver**. - - - The performance of the two solvers are measured using the `MiniZinc complete scoring method`_, which takes into account both solution quality and running time. The total scores of both solver on an instance always add up to 1. The higher the score, the better a solver performs compared to the other. - - The ratio ``score(favouredSolver)/score(baseSolver)`` is called the **discriminating power** of the instance. AutoIG will return instances where this ratio is larger than 1. - -.. _`here`: - -All setup arguments ------------------------------------------------------------------------------------------------- - -**General settings:** - - - ``--runDir``: directory where the experiment will be run. All data prepared by the setup script will be put in this folder. Default: ``./`` (current folder) - - ``--problemModel``: path to a description of the problem we want to generate instances for, written as a constraint model in either `Essence`_ or `MiniZinc`_. Note that the model file name should be ended with either ``.essence`` or ``.mzn``. - - ``--generatorModel``: path to a parameterised instance generator of the given problem, written as a constraint model in `Essence`_ (see: :doc:`create-an-instance-generator` for more details). - - ``--seed``: random seed for the experiment (used by irace). Default: 42 - - ``--maxEvaluations``: AutoIG running budget, i.e., the total number of evaluations being used by irace during the tuning process. Each evaluation correspond to solving a generator instance, getting an instance out of it (if possible), evaluating the quality of that instance, and returning a score back to irace. Default: 2000 - - ``--nCores``: the number of parallel proccesses irace can use during the tuning. If you have parallel resources available, utilising this option can generally speed up the total running time (walltime) a lot. Default: 1 - -**Generator instance settings:** - -Each generator instance is solved using the Essence pipeline, which consists of three steps: (i) translating the generator instance (in Essence) to a lower-level modelling language called Essence Prime with `Conjure`_; (ii) reformulating and translating the generator instance in Essence Prime to the input accepted by the constraint solver `minion`_ with `Savile Row`_; (iii) solving the generator instance with `minion`_ and getting a candidate problem instance out of it (if possible). The settings listed here are for the solving process of each generator instance. - - - ``--genSRTimeLimit``: (in seconds) Savile Row time limit. Default: 300 - - ``--genSRFlags``: Savile Row flags. Default: ``-S0 -no-bound-vars`` - - ``--genSolver``: the solver being used for solving each generator instance. Currently only minion is supported. - - ``--genSolverTimeLimit``: (in seconds) solving time limit for minion. Default: 300 - - ``--genSolverFlags``: minion flags. Default: ``-varorder domoverwdeg -valorder random`` - -.. note:: - We suggest keeping all generator settings as their default values, although the time limits for Savile Row and minion can be increased/decreased depending on applications. - -**Candidate instance settings** - -*(for both graded and discriminating experiments)* - - - ``--instanceSetting``: the type of instances being generated. Must be either ``graded`` or ``discriminating`` (see: `graded/discriminating instance`_ for more details). - - ``--instanceValidTypes``: if you are only interested in SAT instances (or UNSAT instances), please set this argument to ``sat`` (or ``unsat``). Default: ``all`` (both SAT and UNSAT instances are accepted by AutoIG). - - ``--minSolverTime``: (in seconds) instances solved within less than this lower bound will be considered too trivial and will be discarded. For discriminating instance generation, this requirement is only applied to the base solver. Default value: 0 (no lower bound). - - ``--maxSolverTime``: (in seconds) the time limit for each solver call when solving a candidate instance. - - ``--nRunsPerInstance``: number of runs a solver is being evaluated per candidate instance. To evaluate the quality of a candidate instance, results will be aggregated across all runs: for graded experiment the median of the results will be used, while for discriminating experiment the MiniZinc complete scores are calculated per run and all scores are summed up before calculating the discriminating power. Default: 1 - -*(for graded experiments only)* - - - ``--solver``: the solver we want to generate instances for. - - ``--solverFlags``: extra flags for the solver. - -*(for discriminating experiments only)* - - -- ``--favouredSolver``: the favoured solver, i.e., we want to generate instances that are relatively easy for this solver. - -- ``--baseSolver``: the base solver, i.e., we want to generate instances that are relatively difficult for this solver. - -- ``--favouredSolverFlags``: extra flags for the favoured solver. - -- ``--baseSolverFlags``: extra flags for the base solver. - - -.. _yuck: https://github.com/informarte/yuck -.. _`[BMFP15]`: G. Björdal, J.-N. Monette, P. Flener, and J. Pearson. A Constraint-Based Local Search Backend for MiniZinc. *Constraints*, *20(3):325-345*, 2015. -.. _`Google OR-Tools`: https://developers.google.com/optimization -.. _`gold medals`: https://www.minizinc.org/challenge.html -.. _`MiniZinc complete scoring method`: https://www.minizinc.org/challenge2021/rules2021.html\#assessment -.. _`Essence`: https://conjure.readthedocs.io/en/latest/essence.html -.. _`MiniZinc`: https://www.minizinc.org/doc-2.6.4/en/index.html -.. _`minion`: https://constraintmodelling.org/minion/ -.. _`Essence pipeline`: https://constraintmodelling.org/ -.. _`Conjure`: https://github.com/conjure-cp/conjure -.. _`Savile Row`: https://savilerow.cs.st-andrews.ac.uk/ -.. _`irace`: https://iridia.ulb.ac.be/irace/ -.. _`Chuffed`: https://github.com/chuffed/chuffed diff --git a/docs/source/start-the-tuning.rst b/docs/source/start-the-tuning.rst deleted file mode 100644 index 77a9ccc3..00000000 --- a/docs/source/start-the-tuning.rst +++ /dev/null @@ -1,43 +0,0 @@ -Start the tuning -===================================================================================== - -After setting up a graded or discriminating experiment using the script ``scripts/setup.py``, we can start the instance generation process with irace by simply running the ``run.sh`` script in the experiment folder: - -.. code-block:: console - - bash run.sh - -This script will start irace and when the instance generation process is finished, it will extract the list of graded/discriminating instances from the raw outputs and their detailed results. A summary of results will be printed out to the screen. - -Below is an example summary for the MACC graded experiment: - -.. code-block:: rst - - Total #runs: 171 - Total #instances generated: 104 - - #graded instances: 54 (/114 runs) - #too difficult instances: 50 (/50 runs) - -In the example above, 171 evaluations have been used during the instance generation process. There are 104 (unique) candidate instances generated, among them there are 54 graded instances and 50 instances where Chuffed cannot solve within the given (tiny) time limit. Different generator configurations may produce the same candidate instances. The number of runs shown in the brackets indicate the total number of candidate instances including duplicated ones (114 for graded instances and 50 for difficult instances). - -And an example summary for the MACC discriminating experiment: - -.. code-block:: rst - - Total #runs: 175 - Total #instances generated: 91 - - #instances where the base solver wins: 8 (/62 runs) - #too easy instances for the base solver: 6 (/25 runs) - #instances where the favoured solver wins: 1 (/1 runs) - #too difficult instances for the favoured solver: 76 (/77 runs) - -The list of graded/discriminating instances and their detailed results are available at ``graded-instances-info.csv`` and ``discriminating-instances-info.csv``, located in the same folder of the experiments. For detailed results of all evaluations during the whole instance generation process, please checkout ``detailed-output.json``, where each line coressponds to a generator configuration evaluation. - -.. note:: - The ``detailed-output`` folder contains all outputs and temporary files created during the instance generation process. This folder can get heavy pretty soon, therefore, after the instance generation process is finished and you have extracted all graded/discriminating instances out of it, this folder can be safely removed. The reason why we do not remove this folder automatically is because sometime the tuning can crash after running for a while due to some bugs/issues with the solvers themselves, or simply because we are out of computational resources (e.g., a job run on a cluster computer is killed due to hitting the time limit allowed). In such cases, we want to resume the experiments from where it was before the termination instead of having to re-run from the start. If the ``detailed-output`` folder is available, AutoIG will automatically read results in that folder and resume the experiment when users call ``run.sh`` again. - -.. - ``out--``: irace creates a number of generator configurations (generator instances). We get a candidate instance from solving a generator instance with a particular random seed. Those ``out-*-*`` files record all commands, outputs and results of each generator instance solving. The last line is the most important one showing the results of the run, including information such as the total running time, results of the generator instance solving, the evaluation of the candidate instance obtained (if one is generated). If the tuning crashes, those ``out-*-*`` are the place to look into to see what the issues are. - - ``gen-inst-.param``: \ No newline at end of file diff --git a/scripts/collect_results.py b/scripts/collect_results.py index 42877a1d..8ef7c806 100644 --- a/scripts/collect_results.py +++ b/scripts/collect_results.py @@ -10,6 +10,7 @@ scriptDir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(scriptDir) +# this is for mnz from minizinc_utils import calculate_minizinc_borda_scores, get_minizinc_problem_type pd.options.mode.chained_assignment = None @@ -38,13 +39,31 @@ def read_data(runDir): config = read_config(configFile) + # Read in the file + with open(detailedResultsFile, 'r') as file: + filedata = file.read() + +# Replace the target string + filedata = filedata.replace('insttance', 'instance') + +# Write the file out again + with open(detailedResultsFile, 'w') as file: + file.write(filedata) + + # read detailed-results.json with open(detailedResultsFile, "rt") as f: #lsLines = [s[:-1] for s in f.readlines() if s.startswith('{"totalTime"')] lsLines = [s.replace("\n","") for s in f.readlines() if "totalTime" in s] + # lsLines = [s.replace("insttance","instance") for s in f.readlines()] r = [ast.literal_eval(s) for s in lsLines] + + tRs = pd.DataFrame(r) + tRs["score"] = tRs["score"].astype(float) + + # move generator instance names into a separate column tRs.loc[:,"genInstance"] = [s["instance"] for s in tRs.genResults] diff --git a/scripts/conf.py b/scripts/conf.py deleted file mode 100644 index c9b1e4a3..00000000 --- a/scripts/conf.py +++ /dev/null @@ -1 +0,0 @@ -problemType = None diff --git a/scripts/convert.py b/scripts/convert.py deleted file mode 100644 index ea8dce41..00000000 --- a/scripts/convert.py +++ /dev/null @@ -1,43 +0,0 @@ -import os -import json -import argparse - -import sys - -scriptDir = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(scriptDir) - -import utils - -def convert_essence_instance_to_mzn( - generatorFile, essenceParamFile, outputMznFile="default" -): - """ - convert an instance in Essence format to MiniZinc format - inputs: - - generatorFile (str): the generator model (in Essence), we need to read this file to recognise the type of each instance param - - essenceParamFile (str): the instance file written in Essence - output: - outputMznFile (str): the converted instance file in MiniZinc format - """ - - if outputMznFile == "default": - outputMznFile = essenceParamFile.replace(".param", ".dzn") - - # remove auxiliary variables in the Essence instance file - auxParamFile = essenceParamFile.replace(".param", ".auxRemoved.param") - cmd = f"conjure autoig --remove-aux {essenceParamFile} {auxParamFile}" - print(cmd) - utils.run_cmd_with_assertion(cmd) - - # convert Essence instance file to MiniZinc format - cmd = f"conjure pretty {auxParamFile} --output-format=minizinc" - print(cmd) - output = utils.run_cmd_with_assertion(cmd) - output = output.replace("Parsing as a parameter file","") # remove conjure's comment - with open(outputMznFile, "wt") as f: - f.write(output) - print(f"{outputMznFile} generated") - - # remove temporary file - os.remove(auxParamFile) \ No newline at end of file diff --git a/scripts/essence_pipeline_utils.py b/scripts/essence_pipeline_utils.py deleted file mode 100644 index 9b0f2248..00000000 --- a/scripts/essence_pipeline_utils.py +++ /dev/null @@ -1,541 +0,0 @@ -import os -import sys -import time -import glob - -scriptDir = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(scriptDir) - -from utils import log, read_file, search_string, run_cmd, delete_file - -solverInfo = {} -solverInfo["cplex"] = { - "timelimitUnit": "ms", - "timelimitPrefix": "--time-limit ", - "randomSeedPrefix": "via text file", -} -solverInfo["chuffed"] = { - "timelimitUnit": "ms", - "timelimitPrefix": "-t ", - "randomSeedPrefix": "--rnd-seed ", -} -solverInfo["minion"] = { - "timelimitUnit": "s", - "timelimitPrefix": "-timelimit ", - "randomSeedPrefix": "-randomseed ", -} -solverInfo["gecode"] = { - "timelimitUnit": "ms", - "timelimitPrefix": "-time ", - "randomSeedPrefix": "-r ", -} -solverInfo["glucose"] = { - "timelimitUnit": "s", - "timelimitPrefix": "-cpu-lim=", - "randomSeedPrefix": "-rnd-seed=", -} -solverInfo["glucose-syrup"] = { - "timelimitUnit": "s", - "timelimitPrefix": "-cpu-lim=", - "randomSeedPrefix": "-rnd-seed=", -} -solverInfo["lingeling"] = { - "timelimitUnit": "s", - "timelimitPrefix": "-T ", - "randomSeedPrefix": "--seed ", -} -solverInfo["cadical"] = { - "timelimitUnit": "s", - "timelimitPrefix": "-t ", - "randomSeedPrefix": "--seed=", -} -solverInfo["open-wbo"] = { - "timelimitUnit": "s", - "timelimitPrefix": "-cpu-lim=", - "randomSeedPrefix": "-rnd-seed=", -} -solverInfo["boolector"] = { - "timelimitUnit": "s", - "timelimitPrefix": "--time=", - "randomSeedPrefix": "--seed=", -} -solverInfo["kissat"] = { - "timelimitUnit": "s", - "timelimitPrefix": "--time=", - "randomSeedPrefix": "--seed=", -} - - -def conjure_translate_parameter(eprimeModelFile, paramFile, eprimeParamFile): - cmd = ( - "conjure translate-parameter " - + "--eprime=" - + eprimeModelFile - + " --essence-param=" - + paramFile - + " --eprime-param=" - + eprimeParamFile - ) - log(cmd) - cmdOutput, returnCode = run_cmd(cmd) - - if returnCode != 0: - raise Exception(cmdOutput) - - -def savilerow_translate( - auxFile, eprimeModelFile, eprimeParamFile, minionFile, timelimit, flags -): - cmd = ( - "savilerow " - + eprimeModelFile - + " " - + eprimeParamFile - + " -out-aux " - + auxFile - + " -out-minion " - + minionFile - + " -save-symbols " - + "-timelimit " - + str(timelimit) - + " " - + flags - ) - log(cmd) - - start = time.time() - cmdOutput, returnCode = run_cmd(cmd) - SRTime = time.time() - start - - status = "SRok" - # if returnCode !=0, check if it is because SR is out of memory or timeout - if ( - ("GC overhead limit exceeded" in cmdOutput) - or ("OutOfMemoryError" in cmdOutput) - or ("insufficient memory" in cmdOutput) - ): - status = "SRMemOut" - elif "Savile Row timed out" in cmdOutput: - status = "SRTimeOut" - # if returnCode != 0 and its not due to a timeout or memory issue raise exception to highlight issue - elif returnCode != 0: - raise Exception(cmdOutput) - - return status, SRTime - - -def savilerow_parse_solution(eprimeModelFile, minionSolFile, auxFile, eprimeSolFile): - # command syntax: savilerow generator.eprime -mode ReadSolution -out-aux output.aux -out-solution sol.test -minion-sol-file test.txt - cmd = ( - "savilerow " - + eprimeModelFile - + " -mode ReadSolution -out-aux " - + auxFile - + " -out-solution " - + eprimeSolFile - + " -minion-sol-file " - + minionSolFile - ) - cmdOutput, returnCode = run_cmd(cmd) - - log(cmd) - if returnCode != 0: - raise Exception(cmdOutput) - - -def conjure_translate_solution( - eprimeModelFile, paramFile, eprimeSolFile, essenceSolFile -): - cmd = ( - "conjure translate-solution --eprime=" - + eprimeModelFile - + " --essence-param=" - + paramFile - + " --eprime-solution=" - + eprimeSolFile - + " --essence-solution " - + essenceSolFile - ) - log(cmd) - - cmdOutput, returnCode = run_cmd(cmd) - - if returnCode != 0: - raise Exception(cmdOutput) - - -def run_minion(minionFile, minionSolFile, seed, timelimit, flags): - cmd = ( - "minion " - + minionFile - + " -solsout " - + minionSolFile - + " -randomseed " - + str(seed) - + " -timelimit " - + str(timelimit) - + " " - + flags - ) - log(cmd) - - start = time.time() - cmdOutput, returnCode = run_cmd(cmd) - runTime = time.time() - start - - # check if minion is timeout or memout - status = None - if "Time out." in cmdOutput: - status = "solverTimeOut" - elif ( - ("Error: maximum memory exceeded" in cmdOutput) - or ("Out of memory" in cmdOutput) - or ("Memory exhausted!" in cmdOutput) - ): - status = "solverMemOut" - elif returnCode != 0: - raise Exception(cmdOutput) - else: - if "Solutions Found: 0" in cmdOutput: - status = "unsat" - else: - status = "sat" - - return status, runTime - - -def read_minion_variables(minionFileSections): - search_section = minionFileSections["SEARCH"] - for line in search_section: - if "PRINT" in line: - variables = line.split("PRINT")[1] - variables = variables.replace("[", "").replace("]", "") - return variables - - raise Exception("Cant find minion ordered variables section") - - -def parse_minion_file(minionFile): - minionFileSections = {} - lines = [] - file = open(minionFile, "r") - current_section = None - for line in file: - if "**" in line: - if current_section is not None: - if ( - line.strip()[0] != "*" - ): # in case the section header is on the same line with the last line of the previous section's content - s = line[: line.find("*")] - lines.append(s) - if current_section in minionFileSections: - minionFileSections[current_section].extend(lines) - else: - minionFileSections[current_section] = lines - current_section = line.replace("*", "").strip() - lines = [] - continue - - lines.append(line) - - file.close() - return minionFileSections - - -def parse_minion_solution(minionSolFile): - with open(minionSolFile) as solFile: - return solFile.read().strip() - - -def write_out_modified_minion_file(minionFile, minionFileSections): - file = open(minionFile, "w") - minionSectionKeys = ["VARIABLES", "SEARCH", "TUPLELIST", "CONSTRAINTS"] - file.write("MINION 3\n") - for key in minionSectionKeys: - file.write("**{0}**".format(key) + "\n") - for value in minionFileSections[key]: - file.write(value.strip() + "\n") - - file.write("**EOF**") - file.close() - - -def encode_negative_table(minionFile, minionSolString): - minionFileSections = parse_minion_file(minionFile) - - variables = read_minion_variables(minionFileSections) - - # Grab the tuple list from the parsed minion section if it exists - tuple_list = minionFileSections.get("TUPLELIST", []) - - # If the tuple_list is empty this must be the first time running this minion file. Add the negativetable constraint - if len(tuple_list) == 0: - minionFileSections["CONSTRAINTS"].append( - "negativetable([" + variables + "],negativeSol)" - ) - # otherwise, remove the first line (negativeSol ...) - else: - tuple_list = tuple_list[1:] - - # only update minionFile if minion finds a solution, i.e., a new instance is generated - if minionSolString != "": - tuple_list.append(minionSolString) - tuple_list = list( - set(tuple_list) - ) # remove duplicate solutions (shouldn't happen, but sometime it does because of crashed runs or resume) - minionFileSections["TUPLELIST"] = [ - "negativeSol {0} {1}".format(len(tuple_list), len(variables.split(","))) - ] - minionFileSections["TUPLELIST"].extend(tuple_list) - write_out_modified_minion_file(minionFile, minionFileSections) - - -def make_conjure_solve_command( - essenceModelFile, - eprimeModelFile, - instFile, - solver, - SRTimeLimit=0, - SRFlags="", - solverTimeLimit=0, - solverFlags="", - seed=None, -): - # temporary files that will be removed - lsTempFiles = [] - - # SROptions string - SROptionsStr = "" - if SRTimeLimit > 0: - SROptionsStr += "-timelimit " + str(int(SRTimeLimit)) - SROptionsStr += " " + SRFlags - - # solverInfo string - solverOptionStr = "" - - # solver timelimit - if not solver in solverInfo: - raise Exception("Sorry, solver " + solver + " is not yet supported.") - opts = solverInfo[solver] - if solverTimeLimit > 0: - if opts["timelimitUnit"] == "s": - solverTimeLimit = int(solverTimeLimit) - elif opts["timelimitUnit"] == "ms": - solverTimeLimit = int(solverTimeLimit * 1000) - else: - raise Exception( - "ERROR: solver " - + solver - + ": timelimitUnit " - + opts["timelimitUnit"] - + " not supported" - ) - solverOptionStr += opts["timelimitPrefix"] + str(solverTimeLimit) - - # solver random seed (only when the solver supports passing a random seed, i.e., solverInfo['randomSeedPrefix'] != None - if (seed != None) and (opts["randomSeedPrefix"] != None): - if ( - solver == "cplex" - ): # cplex case is special: we need to create a temporary text file to pass the random seed to cplex - rndSeedCplexFile = instFile + ".cplexseed" - with open(rndSeedCplexFile, "wt") as f: - f.write("CPXPARAM_RandomSeed " + str(seed)) - lsTempFiles.append(rndSeedCplexFile) - solverOptionStr += " --readParam " + rndSeedCplexFile - else: - solverOptionStr += " " + opts["randomSeedPrefix"] + str(seed) - - # solver flags - solverOptionStr += " " + solverFlags - - # conjure solve command - outDir = os.path.dirname(eprimeModelFile) - eprimeModelFile = os.path.basename(eprimeModelFile) - conjureCmd = ( - "conjure solve " - + essenceModelFile - + " " - + instFile - + " -o " - + outDir - + " --use-existing-models=" - + eprimeModelFile - + ' --savilerow-options "' - + SROptionsStr - + '"' - + ' --solver-options "' - + solverOptionStr - + '"' - + " --solver=" - + solver - ) - - return conjureCmd, lsTempFiles - - -def call_conjure_solve(essenceModelFile, eprimeModelFile, instFile, setting, seed): - if "name" in setting: - solver = setting["name"] - elif "solver" in setting: - solver = setting["solver"] - lsTempFiles = [] - - # make conjure solve command line - conjureCmd, tempFiles = make_conjure_solve_command( - essenceModelFile, - eprimeModelFile, - instFile, - solver, - setting["SRTimeLimit"], - setting["SRFlags"], - setting["solverTimeLimit"], - setting["solverFlags"], - seed, - ) - lsTempFiles.extend(tempFiles) - - # call conjure - print("\nCalling conjure") - log(conjureCmd) - cmdOutput, returnCode = run_cmd(conjureCmd) - log(cmdOutput) - - status = None - if ( - ("GC overhead limit exceeded" in cmdOutput) - or ("OutOfMemoryError" in cmdOutput) - or ("insufficient memory" in cmdOutput) - ): - status = "SRMemOut" - elif "Savile Row timed out" in cmdOutput: - status = "SRTimeOut" - elif "increase MAX_VARS" in cmdOutput: # what are we checking here??? - status = "SRMemOut" - elif ( - ("Error: maximum memory exceeded" in cmdOutput) - or ("Out of memory" in cmdOutput) - or ("Memory exhausted!" in cmdOutput) - ): - status = "solverMemOut" - elif ("Sub-process exited with error code:139" in cmdOutput) and ( - setting["abortIfSolverCrash"] is False - ): - status = "solverCrash" - elif returnCode != 0: - raise Exception(cmdOutput) - - baseFile = ( - eprimeModelFile.replace(".eprime", "") - + "-" - + os.path.basename(instFile).replace(".param", "") - ) - infoFile = baseFile + ".eprime-info" - inforFile = baseFile + ".eprime-infor" - minionFile = baseFile + ".eprime-minion" - dimacsFile = baseFile + ".eprime-dimacs" - fznFile = baseFile + ".eprime-param.fzn" - mznFile = baseFile + ".eprime.mzn" - eprimeParamFile = baseFile + ".eprime-param" - eprimeSolutionFile = glob.glob(baseFile + "*.eprime-solution") - solutionFile = glob.glob(baseFile + "*.solution") - solutionFile.extend( - glob.glob(os.path.basename(baseFile) + ".solution") - ) # in case conjure doesn't generate essence solution file within the folder of eprime model - lsTempFiles.extend( - [ - inforFile, - minionFile, - dimacsFile, - mznFile, - fznFile, - eprimeParamFile, - eprimeSolutionFile, - solutionFile, - ] - ) - - print("Waiting for " + infoFile) - - # Wait a maximum of 60s for SR-info file to appear - if status != "SRMemOut": - max_wait = 60 - while True: - if os.path.isfile(infoFile): - break - elif max_wait <= 0: - os.stat(infoFile) - raise Exception( - "Waited max time for SR-info file to appear {0}".format(infoFile) - ) - else: - time.sleep(1) - max_wait -= 1 - - if os.path.isfile(infoFile): - # rename infoFile so that it includes random seed and solver name - newInfoFile = baseFile + "-seed_" + str(seed) + "-" + solver + ".eprime-info" - print("Renaming SR info file: " + infoFile + " -> " + newInfoFile) - if os.path.isfile(infoFile): - os.rename(infoFile, newInfoFile) - infoFile = newInfoFile - - # parse SR info file - infoStatus, SRTime, solverTime = parse_SR_info_file( - infoFile, timelimit=setting["solverTimeLimit"] - ) - if status != "solverCrash": - status = infoStatus - - delete_file(lsTempFiles) - return status, SRTime, solverTime - - -def parse_SR_info_file(fn, knownSolverMemOut=False, timelimit=0): - lsLines = read_file(fn) - - def get_val(field): - ls = search_string(field, lsLines) - if len(ls) > 0: - return ls[0].split(":")[1].strip() - else: - return None - - # initial assumptions - SRTime = 0 - solverTime = 0 - status = None - - # SR status - if get_val("SavileRowTimeOut") == "1" or get_val("SavileRowClauseOut") == 1: - status = "SRTimeOut" - - # SR time and solver time - if get_val("SavileRowTotalTime") != None: - SRTime = float(get_val("SavileRowTotalTime")) - if get_val("SolverTotalTime") != None: - solverTime = float(get_val("SolverTotalTime")) - - # solver status - if status != "SRTimeOut": - - # if solver is out of memory because of runsolver, SR will write an info file with solverTimeOut=1. We'll fix it and return. - if knownSolverMemOut: - status = "solverMemOut" - return status, SRTime, solverTime - - if get_val("SolverMemOut") == "1": - status = "solverMemOut" - elif get_val("SolverTimeOut") == "1": - status = "solverTimeOut" - elif get_val("SolverNodeOut") == "1": - status = "solverNodeOut" - else: - if ( - timelimit > 0 and solverTime > timelimit - ): # for the case when solver timeout but SR reports SolverTimeOut=0 (happens with minizinc atm) - status = "solverTimeOut" - elif get_val("SolverSatisfiable") == "1": - status = "sat" - else: - status = "unsat" - return status, SRTime, solverTime diff --git a/scripts/extract-md5sum.sh b/scripts/extract-md5sum.sh deleted file mode 100755 index 4029e010..00000000 --- a/scripts/extract-md5sum.sh +++ /dev/null @@ -1,16 +0,0 @@ -outFile="instance-md5sum.csv" -echo "instance,hashValue">$outFile - -for fn in $(ls inst-*.dzn) -do - if [ "$(uname)" == "Darwin" ]; then - val=$(md5 $fn| cut -d"=" -f2 |xargs) - elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - val=$(md5sum $fn | cut -d' ' -f1) - else - echo "Sorry, we only support Linux and MacOS at the moment" - exit 1 - fi - bfn=$(basename $fn) - echo "$bfn,$val" >>$outFile -done diff --git a/scripts/generator.py b/scripts/generator.py deleted file mode 100644 index df315180..00000000 --- a/scripts/generator.py +++ /dev/null @@ -1,123 +0,0 @@ -import os - -import sys - -scriptDir = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(scriptDir) - -from essence_pipeline_utils import ( - conjure_translate_parameter, - savilerow_translate, - run_minion, - parse_minion_solution, - savilerow_parse_solution, - conjure_translate_solution, -) - -from utils import delete_file, log - - -def solve_generator(configurationId, paramDict, setting, seed, detailedOutputDir): - ### create a new instance by solving a generator instance ### - # we need to make sure that we don't create an instance more than once from the same generator instance - # this is done by generating the minion instance file only once, and everytime a new solution is created, it'll be added to a negative table in the minion file - # NOTE 1: we save the generated minion file because we want to save SR time next time the same configuration is run by irace. However, this increases the storage memory used during the tuning, as those minion files can be huge! - # NOTE 2: the generated solution will only be added to the minion file at the end of a wrapper run (when the corresponding problem instance is successfully taken by the considered target solvers) by calling function save_generator_solution. This is to make sure that if a run is unsuccessful and terminated, the same instance will be generated when the tuning is resumed. - - # write generator instance to an essence instance file - paramFile = detailedOutputDir + "/gen-inst-" + str(configurationId) + ".param" - print("\n") - log("Creating generator instance: " + paramFile) - lsLines = ["letting " + key + " be " + str(val) for key, val in paramDict.items()] - with open(paramFile, "wt") as f: - f.write("\n".join(lsLines)) - - # files used/generated during the solving process - eprimeModelFile = detailedOutputDir + "/generator.eprime" - baseFileName = paramFile.replace(".param", "") - minionFile = ( - baseFileName + ".minion" - ) # minion input file, including a negative table saving previously generated solutions of the same generator instance - minionSolFile = ( - baseFileName + ".solution" - ) # solution file generated by minion, will be removed afterwards - auxFile = ( - baseFileName + ".aux" - ) # aux file generated by SR, will be kept so we don't have to re-generate it next time solving the same generator instance - eprimeSolFile = ( - baseFileName + ".solution.eprime-param" - ) # eprime solution file created by SR, will be removed afterwards - essenceSolFile = ( - baseFileName + ".solution.param" - ) # essence solution file created by conjure, will be returned as a problem instance - minionSolString = "" # content of minion solution file, to be added to minion negative table in minionFile - - # status of the solving - genStatus = None # SRTimeOut/SRMemOut/solverTimeOut/solverMemOut/sat/unsat - - # if the generator instance is solved for the first time - if (not os.path.exists(minionFile)) or (os.stat(minionFile).st_size == 0): - eprimeParamFile = baseFileName + ".eprime-param" - conjure_translate_parameter( - eprimeModelFile, paramFile, eprimeParamFile - ) # translate generator instance from Essence to Essence Prime - genStatus, genSRTime = savilerow_translate( - auxFile, - eprimeModelFile, - eprimeParamFile, - minionFile, - setting["genSRTimeLimit"], - setting["genSRFlags"], - ) # translate generator instance from Essence Prime to minion input format - os.remove(eprimeParamFile) - else: - genStatus = "SRok" - genSRTime = 0 - - # start solving it - if genStatus == "SRok": - genStatus, genSolverTime = run_minion( - minionFile, - minionSolFile, - seed, - setting["genSolverTimeLimit"], - setting["genSolverFlags"], - ) - if genStatus == "sat": - minionSolString = parse_minion_solution(minionSolFile) - savilerow_parse_solution( - eprimeModelFile, minionSolFile, auxFile, eprimeSolFile - ) # parse solution from minion to Essence Prime - conjure_translate_solution( - eprimeModelFile, paramFile, eprimeSolFile, essenceSolFile - ) # parse solution from Essence Prime to Essence - delete_file( - [minionSolFile, eprimeSolFile] - ) # delete minionSolFile after used, otherwise the negativetable will have duplicated items. eprimeSolFile is removed to make sure that in the next runs, if no solution is found by minion, no Essence solution file is created - else: - genSolverTime = 0 - - # print out results of the generator solving process - localVars = locals() - print("\n") - log( - "\nGenerator results: genInstance=" - + os.path.basename(paramFile).replace(".param", "") - + ", " - + ", ".join( - [ - name + "=" + str(localVars[name]) - for name in ["genStatus", "genSRTime", "genSolverTime"] - ] - ) - ) - - results = { - "instance": os.path.basename(paramFile), - "status": genStatus, - "seed": seed, - "SRTime": genSRTime, - "solverTime": genSolverTime, - } - - return genStatus, essenceSolFile, minionFile, minionSolString, results diff --git a/scripts/instances b/scripts/instances deleted file mode 100755 index 421376db..00000000 --- a/scripts/instances +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/scripts/minizinc_utils.py b/scripts/minizinc_utils.py deleted file mode 100644 index 0c22d5f5..00000000 --- a/scripts/minizinc_utils.py +++ /dev/null @@ -1,594 +0,0 @@ -import os -import sys -import time -import shutil -import subprocess -import tempfile - -scriptDir = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(scriptDir) - -import conf -from utils import delete_file - - - - -def get_minizinc_problem_type(modelFile: str): - # TODO: this function should definitely be improved - """ - Read a MiniZinc model and return its type (MIN/MAX/SAT) - """ - with open(modelFile, "rt") as f: - lines = f.readlines() - - # remove comment lines - lines = [l for l in lines if len(l.strip()) > 0 and (l.strip()[0] != "%")] - - def find_str(s): - return len(list(filter(lambda x: s in x, lines))) > 0 - - if find_str("minimize"): - return "MIN" - if find_str("maximize"): - return "MAX" - if find_str("satisfy"): - return "SAT" - print("ERROR: cannot determine problem type of " + modelFile) - sys.exit(1) - return None - - -def is_optimisation(modelFile: str): - """ - Check whether a minizinc model is an optimisation problem - """ - problemType = get_minizinc_problem_type(modelFile) - assert problemType in ["MIN", "MAX", "SAT"] - if problemType == "SAT": - return False - return True - - -def check_solution_consensus( - modelFile: str, instFile: str, lastSol: str, solvers: list, verbose: bool = False -): - """ - Given a problem and instace solved by a specific solver, test if there is consensus on - the validity of the solution given by the original solver. - - * modelFile: original model file - * InstFile: original instance file - * lastSol: map of the last solution found that has to be checked - * solvers: list of solvers to check the solution with, represented as strings to pass to minizinc - """ - - # the procedure will be the following: - # 1 - turn the assignments from the solution to constraints - # 2 - add them as constraints to the original model in a newly created file - # 3 - "instantly" solve the new problem - # 4 - .. profit! - valid = False # we start assuming it's invalid ... - - # slurp all the original model. - with open(modelFile, "rt") as f: - lines = f.readlines() - - # get a temporary file, avoiding collisions between runs/threads. - base, filename = os.path.split(instFile) - tf = tempfile.NamedTemporaryFile( - prefix=filename + ".solutioncheck.", - mode="w", - delete=False, - suffix=".mzn", - dir=base, - ) - - # inject the solution into the model. - if verbose: - print(f"creating and solving temporary model in {tf.name}") - for line in lines: - # we strip the line to detect if the line is not a comment with spaces before - if "solve" in line and not line.strip().startswith("%"): - # paste here - for key, val in lastSol.items(): - tf.write(f"constraint {key} = {val}") - tf.write(line) # now paste the solve line ... - else: - tf.write(line) - tf.close() - - # for each solver, run and get the resulting status - checked = False - for solver in solvers: - status, totalTime, extra = minizinc_solve( - tf.name, instFile, solver, verbose=False, solvers_to_check=None - ) - # Note that we don't care about optimisation problems. As we are only checking if a single - # solution makes sense, we don't know (and don't want to know) if its optimal here. So - # effectively we are turning optimisation problems into satisfiability problems. - if status not in ["S", "C"]: - if verbose: - print( - f"checked with solver: {solver} cannot seem to find a solution for whatever reason." - ) - else: - checked = True - assert extra["instanceType"] in ["sat", "unsat"] - if extra["instanceType"] == "sat": - valid = True - if verbose: - print(f"checked with solver: {solver} agreed.") - else: - if verbose: - print(f"checked with solver: {solver} disagreed") - assert ( - checked - ), "ERROR: none of the checking solvers ({solvers_to_check}) can confirm results of this run ({modelFile}, {instFile})." - os.remove(tf.name) - return valid - - -def minizinc_solve( - modelFile: str, - instFile: str, - solver: str, - flags: str = "-f", - seed: int = None, - timeLimit: float = 3600.0, - memLimit: int = 8192, - solvers_to_check: list = None, - verbose=True, -): - """ - Solve an instance of an optimisation problem via MiniZinc, using the runsolver binary to make it behave. - - Parameters: - * modelFile and instFile: model and instance file paths. - * timeLimit: WallClock time limit, in seconds (default 1h) - * memLimit: memory limit, in MB. (default 8GB) - * solver: minizinc solver, to be passed as a parameter to minizinc - * flags: extra flags for minizinc - * seed: random seed, as an integer - * solvers_to_check: list of strings, where each string is a solver recognized by minizinc. If this - list is not none, it will try to check the found solutions by the main call using the mentioned - solvers. - * verbose: makes the function print things to stdout. True by default. - - Returns: - status (str): S/C/ERR/UNK (following MiniZinc challenge output codes (see e.g., https://www.minizinc.org/challenge2021/results2021.html) - - S: a solution was found - - C: the search was complete - - ERR: incorrect solution / solver aborted / flattening aborted (out-of-time or out-of-memory) - - UNK: no answer was returned within the time limit - Note: See https://www.minizinc.org/doc-2.5.5/en/command_line.html?highlight=unknown#solution-output-options for details on how to parse minizinc output results - totalTime (float): running time of the solver (in seconds). - extra (dict): extra infos of the solving process, including: - - objs (list): (optimisation problem only) each element is a pair of (time,objective), which represents the time (in seconds) and the objective value found at that point. - - flattenStatus (str): status of the flattening process (ok/failed) - - flattenTime (float): flattening time (in seconds) - - instanceType (str): sat/unsat/unknown - """ - # Bool flag to determine if we can use runsolver - use_runsolver = sys.platform.startswith("linux") - if solver == "yuck": - use_runsolver = False - # use_runsolver = False - runsolver_tmp_file = instFile + "." + solver + ".runsolver" - - # delay between SIGTERM and SIGKILL when timeout in runsolver - runsolver_delay = 2 - - # get problem type - isOptimisation = is_optimisation(modelFile) - - # random seed - seedStr = "" - if seed is not None: - seedStr = f"-r {seed}" - - # we store in a map the last solution. - lastSol = {} - - # make minizinc command - if isOptimisation: - cmd = f"minizinc --time-limit {timeLimit * 1000} --solver {solver} -i {seedStr} {flags} {modelFile} {instFile} --output-mode dzn --output-objective -s" - else: - cmd = f"minizinc --time-limit {timeLimit * 1000} --solver {solver} {seedStr} {flags} {modelFile} {instFile} --output-mode dzn -s" - - # now prepend the call to runsolver if available - if use_runsolver: - cmd = ( - f"runsolver -w {runsolver_tmp_file} -d {runsolver_delay} --wall-clock-limit {timeLimit} --vsize-limit {memLimit} " - + cmd - ) - - # initialise returned values - status = None - extra = { - "objs": [], - "flattenStatus": "failed", - "flattenTime": -1, - "instanceType": "unknown", - "answerStatus": "unknown", - } - - # start minizinc and process the output - startTime = time.time() - flattenAborted = True - output = [] - if verbose: - print(cmd) - with subprocess.Popen( - cmd, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - bufsize=1, - universal_newlines=True, - shell=True, - ) as p: - for line in p.stdout: - output.append(line) - # recover the objective value. Minizinc outputs this _objective - # regardless of the naming on the optimization function - if "_objective" in line: - curTime = time.time() - startTime - obj = float(line.split("=")[1].strip()[:-1]) - if verbose: - print(f"{curTime:.2f}: {obj:.1f}") - extra["objs"].append((curTime, obj)) - elif "flatTime=" in line: # recover flattening time - flattenAborted = False - extra["flattenTime"] = float(line.split("=")[1]) - extra["flattenStatus"] = "ok" - elif "=====UNKNOWN=====" in line: # what happened? - status = "ERR" - elif "=====ERROR=====" in line: # minizinc had an ERROR - status = "ERR" - elif "=====UNSATISFIABLE=====" in line: # instance is UNSAT - status = "C" - extra["instanceType"] = "unsat" - elif "==========" in line: # ended the search space - status = "C" - elif "mzn-stat: nSolutions=" in line: # check the number of solutions - nSols = int(line.split("=")[1].strip()) - if nSols > 0 and status is None: - status = "S" - elif ( - not line.startswith("%") and (" = " in line) and (line.endswith(";")) - ): # recover solution - lhs, rhs = line.split(" = ") - lastSol[lhs] = rhs - sys.stdout.flush() - totalTime = time.time() - startTime - - # gather solver output - output = "\n".join([line for line in output]) - - # now lets check runsolver output. We only need to care if there is no solution - # already captured. This is the case for example in a optimisation problem where - # we have intermediate solutions. The instance should be marked as "S" and give - # the non-optimal solution. We also need to capture the return value for minizinc - returncode = p.returncode - if use_runsolver: - with open(runsolver_tmp_file) as f: - for index, line in enumerate(f): - # we check for timeouts and memouts - if ( - "Maximum wall clock time exceeded" in line - or "Maximum VSize exceeded" in line - ): - # if runsolver kills the subprocess, no return code is reported. - returncode = 0 # killed - if len(extra["objs"]) == 0: - status = "UNK" - elif status == None: - status = "S" - break - elif "Child status" in line: - returncode = int(line.split(":")[1].strip()) - - # now we set the status right in case we have a funny case ... - if (returncode != 0) and (status != "ERR"): - if ( - ("OutOfMemoryError" in output) - or ("std::bad_alloc" in output) - or ("MiniZinc: internal error: out of memory" in output) - ): - status = "ERR" - else: - if verbose: - print(f'ERROR: fail to run "{cmd}".') - print(f"Return code: {returncode}.") - print(f"Output is: {output}.\n") - sys.exit(1) - - if status == "ERR" and (flattenAborted is False) and returncode == 0: - status = "UNK" - - # TODO: check incorrect solution and update status accordingly - if status in ["S", "C"] and extra["instanceType"] == "unknown": - extra["instanceType"] = "sat" - - assert status, "ERROR: no value assigned to status" - - # Finally, do we want to check the validity of the solution given? - if (solvers_to_check is not None) and (len(solvers_to_check) > 0): - if extra["instanceType"] == "sat": - consensus = check_solution_consensus( - modelFile, instFile, lastSol, solvers_to_check, verbose=verbose - ) - if consensus is False: - if verbose: - print("There is no consensus on the solution correctness") - status = "ERR" - extra["answerStatus"] = "invalid" - else: - extra["answerStatus"] = "valid" - elif extra["instanceType"] == "unsat": - if verbose: - print( - "There is no solution because its unsat, so won't solve that ... too expensive." - ) - elif extra["instanceType"] == "unknown": - if verbose: - print("Status is unknown, so we can't check the solution, sorry.") - - # remove tmp runsolver file - delete_file(runsolver_tmp_file) - - if verbose: - print(status, totalTime, extra) - return status, totalTime, extra - - -def has_better_objective(o1, o2, problemType): - assert problemType in ["MIN", "MAX"] - if problemType == "MIN": - return o1 < o2 - return o1 > o2 - - -def calculate_minizinc_borda_scores( - status1: str, - status2: str, - time1: float, - time2: float, - problemType: str, - objs1: list = [], - objs2: list = [], - zeroScoreWhenBothFail: bool = False, -): - """ - Compute MiniZinc competition's Borda scores between two runs of two solvers. - There are two scoring methods in this category: complete/incomplete. See Assessment section in https://www.minizinc.org/challenge2021/rules2021.html for more details. - Important note: When both solvers fail to solve an instance, the competition scoring procedure will give a score of 0 to solver1 and a score of 1 to solver2. To give both solvers a score of 0 in such case, set zeroScoreWhenBothFail=True - - """ - assert status1 in ["S", "C", "ERR", "UNK"], status2 in ["S", "C", "ERR", "UNK"] - assert problemType in ["MIN", "MAX", "SAT"] - - scores = {"complete": (), "incomplete": ()} - - def solved(status): - return status in ["S", "C"] - - # for decision problems, the two scoring methods are the same - if problemType == "SAT": - - def better_sat(s1, s2): - if solved(s1) and not solved(s2): - return True - return False - - # instance is solved by only one of the two solvers - if better_sat(status1, status2): - scores["complete"] = scores["incomplete"] = (1, 0) - elif better_sat(status2, status1): - scores["complete"] = scores["incomplete"] = (0, 1) - # instance is solved/unsolvable by both solvers - else: - # instance is solved by both solvers - if solved(status1) and solved(status2): - # TODO: the competition rules say "0.5 if both finished in 0s", but how to check it? - scores["complete"] = scores["incomplete"] = ( - time2 / (time1 + time2), - time1 / (time1 + time2), - ) - # instance is unsolvable for both solvers - else: - assert (not solved(status1)) and (not solved(status2)) - if zeroScoreWhenBothFail: - scores["complete"] = scores["incomplete"] = (0, 0) - else: - scores["complete"] = scores["incomplete"] = (0, 1) - - # calculate scores for optimisation problems - else: - - # complete scoring - def better_optimisation_complete(s1, s2, o1, o2): - if solved(s1) and not solved(s2): - return True - if (s1 == "C") and (s2 != "C"): - return True - if (s1 == s2) and (s1 == "S"): - assert len(o1) > 0 and len(o2) > 0 - lastObj1 = o1[-1][1] - lastObj2 = o2[-1][1] - return has_better_objective(lastObj1, lastObj2, problemType) - return False - - if better_optimisation_complete(status1, status2, objs1, objs2): - scores["complete"] = (1, 0) - elif better_optimisation_complete(status2, status1, objs2, objs1): - scores["complete"] = (0, 1) - else: - # both solvers fail - if (not solved(status1)) and (not solved(status2)): - if zeroScoreWhenBothFail: - scores["complete"] = (0, 0) - else: - scores["complete"] = (0, 1) - # both solvers complete - elif (status1 == "C") and (status2 == "C"): - scores["complete"] = (time2 / (time1 + time2), time1 / (time1 + time2)) - # both solvers give equal solution quality but without optimality proof - else: - assert (status1 == "S") and (status2 == "S") - assert objs1[-1][1] == objs2[-1][1] - lastTime1 = objs1[-1][0] - lastTime2 = objs2[-1][0] - scores["complete"] = ( - lastTime2 / (lastTime1 + lastTime2), - lastTime1 / (lastTime1 + lastTime2), - ) - - # incomplete scoring - def better_optimisation_incomplete(s1, s2, o1, o2): - if solved(s1) and not solved(s2): - return True - if solved(s1) and solved(s2) and len(o1) > 0: - assert len(o2) > 0 - lastObj1 = o1[-1][1] - lastObj2 = o2[-1][1] - return has_better_objective(lastObj1, lastObj2, problemType) - return False - - if better_optimisation_incomplete(status1, status2, objs1, objs2): - scores["incomplete"] = (1, 0) - elif better_optimisation_incomplete(status2, status1, objs2, objs1): - scores["incomplete"] = (0, 1) - else: - # both solvers fail - if (not solved(status1)) and (not solved(status2)): - if zeroScoreWhenBothFail: - scores["incomplete"] = (0, 0) - else: - scores["incomplete"] = (0, 1) - # both solvers complete - elif (status1 == "C") and (status2 == "C"): - scores["incomplete"] = ( - time2 / (time1 + time2), - time1 / (time1 + time2), - ) - # both solvers give equal solution quality - else: - assert solved(status1) and solved(status2) - assert ( - objs1[-1][1] == objs2[-1][1] - ) # check if both solvers give the same solution quality - lastTime1 = objs1[-1][0] - lastTime2 = objs2[-1][0] - scores["incomplete"] = ( - lastTime2 / (lastTime1 + lastTime2), - lastTime1 / (lastTime1 + lastTime2), - ) - assert len(scores["complete"]) == 2 - assert len(scores["incomplete"]) == 2 - return scores - - -def run_comparator(info1, info2): - """ - comparator for comparing results of two runs called by minizinc_solve - return -1 if the first run is better, 0 if incomparable, and 1 otherwise - note that problemType has to be added into either info1 or info2 - """ - assert conf.problemType in ["MIN", "MAX", "SAT"] - problemType = conf.problemType - - def solved(status): - return status in ["S", "C"] - - def compare_time(t1, t2): - if t1 < t2: - return -1 - if t1 > t2: - return 1 - return 0 - - s1 = info1["status"] - s2 = info2["status"] - time1 = info1["time"] - time2 = info2["time"] - o1 = info1["extra"]["objs"] - o2 = info2["extra"]["objs"] - - # decision problem - if problemType == "SAT": - - def better_sat(s1, s2): - if solved(s1) and not solved(s2): - return True - return False - - if better_sat(s1, s2): - return -1 - if better_sat(s2, s1): - return 1 - - # instance is solved by both solvers - if solved(s1) and solved(s2): - return compare_time(time1, time2) - # instance is unsolvable for both solvers - else: - assert (not solved(s1)) and (not solved(s2)) - return 0 - - # optimisation problem - else: - - def better_optimisation(s1, s2, o1, o2): - if solved(s1) and not solved(s2): - return True - if (s1 == "C") and (s2 != "C"): - return True - if (s1 == s2) and (s1 == "S"): - assert len(o1) > 0 and len(o2) > 0 - lastObj1 = o1[-1][1] - lastObj2 = o2[-1][1] - return has_better_objective(lastObj1, lastObj2, problemType) - return False - - if better_optimisation(s1, s2, o1, o2): - return -1 - if better_optimisation(s2, s1, o2, o1): - return 1 - # both solvers fail - if (not solved(s1)) and (not solved(s2)): - return 0 - # both solvers complete - elif (s1 == "C") and (s2 == "C"): - return compare_time(time1, time2) - # both solvers give equal solution quality but without optimality proof - else: - assert (s1 == "S") and (s2 == "S") - assert o1[-1][1] == o2[-1][1] - lastTime1 = o1[-1][0] - lastTime2 = o2[-1][0] - return compare_time(lastTime1, lastTime2) - - -if __name__ == "__main__": - import argparse - - parser = argparse.ArgumentParser(description="Run a minizinc problem") - # general settings - parser.add_argument("--modelFile", required=True, type=str, help="model file") - parser.add_argument("--instFile", required=True, type=str, help="Instance file") - parser.add_argument("--solver", required=True, type=str, help="solver to use") - parser.add_argument( - "--solverCheck", - required=True, - type=str, - help='list of solvers to use in a comma separated style: name1,name2,name3... Pass an empty string ("") to not check the solution', - ) - - # read from command line args - args = parser.parse_args() - - solvers = args.solverCheck.split(",") - - # run the "main" - minizinc_solve(args.modelFile, args.instFile, args.solver, solvers_to_check=solvers) diff --git a/scripts/read-output-files.sh b/scripts/read-output-files.sh deleted file mode 100755 index a507a47c..00000000 --- a/scripts/read-output-files.sh +++ /dev/null @@ -1,10 +0,0 @@ -outFile="detailed-results.json" -echo "">$outFile - -for fn in $(ls out-*) -do - tail -n2 $fn | head -n1 >>$outFile -done - -# replace single quotes with double quotes (look nicer for json files) -sed -i "s#'#\"#g" $outFile diff --git a/scripts/run-irace.sh b/scripts/run-irace.sh deleted file mode 100755 index 720a708e..00000000 --- a/scripts/run-irace.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -irace --seed --scenario --parameter-file params.irace --train-instances-file instances --exec-dir ./ --max-experiments --target-runner --debug-level 2 diff --git a/scripts/run.sh b/scripts/run.sh deleted file mode 100755 index 51c8a6ab..00000000 --- a/scripts/run.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# start the instance generation process with irace -bash run-irace.sh - -# extract output -pushd detailed-output -bash $AUTOIG/scripts/read-output-files.sh -bash $AUTOIG/scripts/extract-md5sum.sh -popd - -# collect results and statistics -python $AUTOIG/scripts/collect_results.py ./ -cp detailed-output/detailed-results.json ./ diff --git a/scripts/run_solver_via_mzn.py b/scripts/run_solver_via_mzn.py deleted file mode 100644 index e696e8da..00000000 --- a/scripts/run_solver_via_mzn.py +++ /dev/null @@ -1,46 +0,0 @@ -import sys -import os -import argparse - -scriptDir = os.path.dirname(os.path.realpath(__file__)) -sys.path.append(scriptDir) - -from minizinc_utils import minizinc_solve - -parser = argparse.ArgumentParser(description="Run a solver on an instance via minizinc") -parser.add_argument("-m", type=str, required=True, help="MiniZinc model file") -parser.add_argument("-i", type=str, required=True, help="MiniZinc instance file") -parser.add_argument("-s", type=str, required=True, help="solver") -parser.add_argument("-c", type=str, default=None, help="check solvers") -parser.add_argument("-t", type=int, default=1200, help="time limit") - -args = parser.parse_args() - -modelFile = args.m -instFile = args.i -solver = args.s -solvers_to_check = None -if args.c is not None: - solvers_to_check = [s.strip() for s in args.c.split(",")] -timelimit = args.t - -modelFile = os.path.abspath(modelFile) -instFile = os.path.abspath(instFile) - -status, totalTime, extra = minizinc_solve( - modelFile=modelFile, - instFile=instFile, - solver=solver, - timeLimit=timelimit, - solvers_to_check=solvers_to_check, -) -results = { - "modelFile": os.path.abspath(modelFile), - "instFile": os.path.abspath(instFile), - "solver": solver, - "status": status, - "time": totalTime, - "extra": extra, -} -print("\nRun results:") -print(results) diff --git a/scripts/scenario.R b/scripts/scenario.R deleted file mode 100755 index e73ad6a2..00000000 --- a/scripts/scenario.R +++ /dev/null @@ -1,111 +0,0 @@ -trainInstancesDir <- '' -repairConfiguration <- function(id, allConfigurations, parameters, digits, nConfsPreviousRaces=0){ - outputDir <- './detailed-output/' - configuration <- allConfigurations[id-nConfsPreviousRaces,] - - require(data.table) - - # if there is no repairing model, just return the current configuration - repairModel <- paste(outputDir,'/repair.eprime',sep='') - if (!file.exists(repairModel)) - return (configuration) - - # just for debug - start_time <- Sys.time() - originalConfiguration <- configuration - - # prefix name for all generated files - baseFileName <- id - - # check if repairing results are already available - outFile <- paste(outputDir,'/repairout-',baseFileName,sep='') - if (file.exists(outFile)){ - configuration <- fread(outFile) - return (configuration) - } - - # make sure min<=max in configuration - lsParams <- sort(parameters$names) - for (param in lsParams){ - maxParam <- NA - if (endsWith(param,'_min')){ - maxParam <- paste(substr(param,1,nchar(param)-3),'max',sep='') - } else if (endsWith(param,'Min')){ - maxParam <- paste(substr(param,1,nchar(param)-3),'Max',sep='') - } - if (!is.na(maxParam)){ - minVal <- min(configuration[[param]],configuration[[maxParam]]) - maxVal <- max(configuration[[param]],configuration[[maxParam]]) - configuration[[param]] <- minVal - configuration[[maxParam]] <- maxVal - } - } - - # write down essence param file - paramFile <- paste(outputDir,'/repair-',baseFileName,'.param',sep='') - lsLines <- c() - for (paramName in colnames(configuration)){ - if (!(paramName %in% c('.ID.','.PARENT.'))){ - val <- configuration[[paramName]] - lsLines <- c(lsLines, paste('letting', paramName, 'be', val)) - } - } - writeLines(lsLines, con <- file(paramFile)) - close(con) - - # solve - seed <- as.integer(id) - cmd <- paste('conjure solve repair.essence ', - paramFile, - ' -o ', outputDir, - ' --use-existing-model repair.eprime ', - ' --solver-options "-timelimit 120 -varorder domoverwdeg -randomiseorder', '-randomseed', seed, '"', - ' --copy-solutions=off') - cat(cmd,'\n') - exitCode <- system(cmd, intern=FALSE, wait=TRUE) - if (exitCode != 0){ - cat("ERROR while repairing configuration \n") - print(configuration) - return (NULL) - } - - # read results - solutionFile <- paste(outputDir, '/repair-repair-', baseFileName, '-solution000001.solution',sep='') - lsLines <- readLines(con<-file(solutionFile)) - close(con) - lsLines <- gsub('repaired_','',lsLines) - lsLines <- lsLines[grep('letting ',lsLines)] - - # delete unneccessary files generated - baseTempName <- paste(outputDir,'/repair-repair-',baseFileName,sep='') - for (endName in c('.eprime-info','.eprime-infor','.eprime-minion','.eprime-param','-solution000001.eprime-solution','-solution000001.solution')){ - file.remove(paste(baseTempName,endName,sep='')) - } - file.remove(paramFile) - - # convert results to configuration - # NOTE: only work for integer values - for (paramName in colnames(configuration)){ - if (!(paramName %in% c('.ID.','.PARENT.'))){ - pattern <- paste('letting ',paramName,' be ',sep='') - s <- lsLines[grep(pattern, lsLines)] - newVal <- as.integer(trimws(strsplit(s,' be ')[[1]][2])) - configuration[[paramName]] <- newVal - } - } - - - #DEBUG - cat("\nBefore repair: \n") - print(originalConfiguration) - cat("After repair: \n") - print(configuration) - cat("\n") - end_time <- Sys.time() - cat("\nRepairing time: ", round(end_time-start_time,2), " seconds\n") - - # save results in case the tuning is resumed - write.csv(configuration,file=outFile,row.names=FALSE) - - return (configuration) -} diff --git a/scripts/setup.py b/scripts/setup.py index b9cc779a..32b1643d 100755 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -42,6 +42,10 @@ def read_config(args): "minSolverTime", "maxSolverTime", "nRunsPerInstance", + "SRTimeLimit", + "SRFlags", + "solverTimeLimit", + "solverFlags", ] # read common settings for both graded/discriminating experiments @@ -149,6 +153,7 @@ def setup(config): ) # rename repair spec + # flagvp: this is the part where it will create a repair model oldRepairModelFile = problemModelFile.replace( ".essence", "-instanceRepair.essence" ) @@ -293,6 +298,7 @@ def main(): parser.add_argument( "--genSRTimeLimit", default=300, + type=int, help="Savile Row time limit on each generator instance (in seconds)", ) parser.add_argument( @@ -309,6 +315,7 @@ def main(): parser.add_argument( "--genSolverTimeLimit", default=300, + type=int, help="time limit for solving each generator instance (in seconds)", ) parser.add_argument( @@ -345,6 +352,18 @@ def main(): parser.add_argument( "--nRunsPerInstance", default=1, type=int, help="number of runs per instance" ) + parser.add_argument( + "--SRTimeLimit", default=1, type=int, help="savile row time limit" + ) + parser.add_argument( + "--SRFlags", default="", help="savile row flags" + ) + parser.add_argument( + "--solverTimeLimit", default=1, type=int, help="sover time limit" + ) + + + # instance setting (for graded experiment only) parser.add_argument( diff --git a/scripts/target-runner b/scripts/target-runner deleted file mode 100755 index b169673c..00000000 --- a/scripts/target-runner +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# a bash script that will be called by irace every time a configuration is evaluated -# this script will save output of a run in a text file called out--, so if irace is terminated early and is resumed, this csript will look for that output file first. If the file exists and result is valid, it won't re-run the evaluation and just simply returns the current output. - -candId=$1 -instId=$2 -seed=$3 -problem=$4 - -# options -reRunExistingButFailedOutput='1' - -outfn="detailed-output/out-${candId}-${seed}" - -function checkScore -{ - score="$(echo $1|cut -d' ' -f 1)" - re='^-?[0-9]+([.][0-9]+)?e?[+-]?([0-9]+)?$' - if ! [[ ${score} =~ $re ]] && [[ ${score} != "Inf" ]]; then - return 1 - fi - return 0 -} - -# if output file already exists but its last line isn't a valid tuning results, re-run it -reRun='0' -if [ -f $outfn ]; then - rs="$(tail -n 1 ${outfn})" - checkScore "$rs" - reRun="$?" -fi - -# run command -if [ ! -f $outfn ] || [ "${reRun}" = "1" ] ; then - scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}"; )" >/dev/null 2>&1 && pwd )" - cmd="python3 -u $scriptDir/wrapper.py $@ > ${outfn} 2>&1" - #echo $cmd - eval $cmd -fi - -# if output is neither a number nor Inf , print "Error" -rs="$(tail -n 1 ${outfn})" -checkScore "$rs" -failed="$?" -if [[ "${failed}" == "1" ]]; then - #echo "Inf" - echo "Error! ${rs}" -else - echo "$rs" -fi diff --git a/scripts/utils.py b/scripts/utils.py deleted file mode 100644 index 76c443c5..00000000 --- a/scripts/utils.py +++ /dev/null @@ -1,94 +0,0 @@ -import os -import glob -import subprocess -import shlex -import datetime -import shutil - - -def log(logMessage): - print( - "{0}: {1}".format( - datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), logMessage - ) - ) - - -def read_file(fn): - lsLines = [] - with open(fn, "rt") as f: - lsLines = [line.rstrip("\n") for line in f] - - return lsLines - - -def search_string(s, lsStrs): - lsOut = [] - for line in lsStrs: - if s in line: - lsOut.append(line) - return lsOut - - -def run_cmd(cmd, printOutput=False, outFile=None): - lsCmds = shlex.split(cmd) - p = subprocess.run(lsCmds, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - output = p.stdout.decode("utf-8") - if outFile is not None: - with open(outFile, "wt") as f: - f.write(output) - if printOutput: - print(output) - return output, p.returncode - - -def run_cmd_with_assertion(cmd): - output, rc = run_cmd(cmd) - assert rc==0, f"ERROR: command '{cmd}' does not run correctly. Output is: \n{output}\n. \nReturn code: {rc}" - return output - - -def delete_file(fn): - if isinstance(fn, list): # delete a list of files - for name in fn: - if isinstance(name, list): - delete_file(name) - elif os.path.isfile(name): - os.remove(name) - else: # delete by pattern - lsFile = glob.glob(fn) - for fn in lsFile: - os.remove(fn) - - -def get_conjure_version(): - if shutil.which("conjure") is None: - return None - ls, _ = run_cmd("conjure --help", printOutput=False) - ls = ls.split("\n") - s = [s for s in ls if "Repository version" in s][0] - conjureVersion = s.split(" ")[2] - return conjureVersion - - -def get_SR_version(): - if shutil.which("savilerow") is None: - return None - ls, _ = run_cmd("savilerow -help", printOutput=False) - ls = ls.split("\n") - s = [s for s in ls if "Repository Version" in s][0] - srVersion = s.split(" ")[5] - return srVersion - - -def get_minizinc_version(): - if shutil.which("minizinc") is None: - return None - ls, _ = run_cmd("minizinc --version", printOutput=False) - ls = ls.split("\n") - ls = [s for s in ls if "version " in s] - if len(ls) > 0: - mznVersion = ", ".join(ls[1:]) - return mznVersion - else: - return "" diff --git a/scripts/wrapper.py b/scripts/wrapper.py index 37024d72..a3be6195 100755 --- a/scripts/wrapper.py +++ b/scripts/wrapper.py @@ -111,7 +111,7 @@ def get_results(): # make score # inst unwanted type: score=1 if ( - (setting["gradedTypes"] != "both") + (setting["gradedTypes"] != "all") and (runStatus in ["sat", "unsat"]) and (runStatus != setting["gradedTypes"]) ): @@ -143,7 +143,7 @@ def get_results(): meanSolverTime = 0 if status == "ok": meanSolverTime = sum(lsSolverTime) / len(lsSolverTime) - if meanSolverTime < setting["solverMinTime"]: + if meanSolverTime < setting["minTime"]: status = "tooEasy" else: status = "graded" @@ -159,14 +159,14 @@ def get_results(): # make final score if score != None: - return score + return score, get_results() # - otherwise, for each evaluation: if the run is too easy: score=-solverTime, if the run is graded: score=nEvaluations*-solverMinTime score = 0 for i in range(len(lsSolverTime)): - if lsSolverTime[i] < setting["solverMinTime"]: + if lsSolverTime[i] < setting["minTime"]: score -= lsSolverTime[i] else: - score -= setting["nEvaluations"] * setting["solverMinTime"] + score -= setting["nEvaluations"] * setting["minTime"] return score, get_results() @@ -225,6 +225,7 @@ def get_results(): + ")" ) + #flagvp: current source of the issue for discriminating instances runStatus, SRTime, solverTime = call_conjure_solve( essenceModelFile, eprimeModelFile, instFile, solverSetting, rndSeed ) @@ -252,7 +253,7 @@ def get_results(): # ------------ update score # inst unwanted type: score=1 if ( - (setting["gradedTypes"] != "both") + (setting["gradedTypes"] != "all") and (runStatus in ["sat", "unsat"]) and (runStatus != setting["gradedTypes"]) ): @@ -905,6 +906,10 @@ def read_setting(settingFile): c["evaluationSettings"]["nEvaluations"] = setting["nRunsPerInstance"] c["evaluationSettings"]["gradedTypes"] = setting["instanceValidTypes"] + c["evaluationSettings"]["SRTimeLimit"] = setting["SRTimeLimit"] + c["evaluationSettings"]["SRFlags"] = setting["SRFlags"] + c["evaluationSettings"]["solverTimeLimit"] = setting["solverTimeLimit"] + c["evaluationSettings"]["solverFlags"] = setting["solverFlags"] if setting["instanceSetting"] == "graded": c["evaluationSettings"]["solver"] = setting["solver"] if setting["solver"] in ["yuck"]: @@ -923,11 +928,17 @@ def read_setting(settingFile): "solverMinTime": setting["minSolverTime"], "totalTimeLimit": setting["maxSolverTime"], "solverFlags": setting["baseSolverFlags"], + "SRTimeLimit": setting["SRTimeLimit"], + "SRFlags": setting["SRFlags"], + "solverTimeLimit": setting["solverTimeLimit"], } favouredSolverSettings = { "name": setting["favouredSolver"], "totalTimeLimit": setting["maxSolverTime"], "solverFlags": setting["favouredSolverFlags"], + "SRTimeLimit": setting["SRTimeLimit"], + "SRFlags": setting["SRFlags"], + "solverTimeLimit": setting["solverTimeLimit"], } c["evaluationSettings"]["baseSolver"] = baseSolverSettings @@ -959,6 +970,10 @@ def print_results(): # if results['genResults']['status']=='sat': # assert results['instanceResults']!={} totalWrapperTime = time.time() - startTime + # my pc is a potato so I was getting negaive time..... + # remove them when running on a better pc + if totalWrapperTime<0: + totalWrapperTime*=totalWrapperTime results["totalTime"] = totalWrapperTime results["status"] = status results["score"] = score @@ -1028,10 +1043,14 @@ def get_unwanted_types(): # evaluate the generated instance if modelType == "essence": + # MOD evaluationFunctionName = "evaluate_" + modelType + "_instance_" + experimentType + score, instanceResults = globals()[evaluationFunctionName]( instFile, seed, setting["evaluationSettings"] ) + + else: # convert the generated instance into .dzn mznInstFile = instFile.replace(".param", ".dzn") @@ -1111,4 +1130,4 @@ def get_unwanted_types(): # - inst unwanted type or SR timeout/memout (either solver) or solver crash (either solver): 1 # - favoured solver timeout (any run) or base solver too easy (any run): 0 # - otherwise: max{-minRatio, -badSolver/goodSolver} -# - note: timelimit_badSolver = minRatio * timelimit_goodSolver +# - note: timelimit_badSolver = minRatio * timelimit_goodSolver \ No newline at end of file