-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #603 from conjure-cp/adding-ortools
Adding ortools
- Loading branch information
Showing
11 changed files
with
418 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# version as of 7 Nov 2023 | ||
VERSION=v9.7 | ||
|
||
source "download.sh" 2> /dev/null # if called from the script dir | ||
source "etc/build/download.sh" 2> /dev/null # if called from the repo base (the common case) | ||
|
||
set -o errexit | ||
set -o nounset | ||
|
||
export BIN_DIR=${BIN_DIR:-${HOME}/.local/bin} | ||
|
||
rm -rf tmp-install-ortools | ||
mkdir tmp-install-ortools | ||
pushd tmp-install-ortools | ||
download https://github.com/google/or-tools/archive/refs/tags/${VERSION}.zip | ||
unzip ${VERSION}.zip | ||
cd or-tools-9.7 | ||
cmake -S. -Bbuild -DBUILD_DEPS:BOOL=ONere | ||
cmake --build build | ||
cp build/bin/fzn-ortools ${BIN_DIR}/fzn-ortools | ||
ls -l build/lib | ||
# .dylib or .a depending on OS | ||
cp build/lib/libortools* ${BIN_DIR} | ||
echo "ortools executable is at ${BIN_DIR}/fzn-ortools" | ||
ls -l ${BIN_DIR}/fzn-ortools | ||
popd | ||
rm -rf tmp-install-ortools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,200 @@ | ||
#!/bin/bash | ||
|
||
# get the script directory | ||
DIR="$( cd "$( dirname "$0" )" && pwd )" | ||
|
||
( | ||
cd $DIR | ||
|
||
echo "default, minion" | ||
conjure solve test.essence | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
|
||
# CP solvers | ||
|
||
echo "\nminion" | ||
echo "minion" | ||
conjure solve test.essence --solver minion | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\ngecode" | ||
echo "gecode" | ||
conjure solve test.essence --solver gecode | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nchuffed" | ||
echo "chuffed" | ||
conjure solve test.essence --solver chuffed | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
# echo "or-tools" | ||
# conjure solve test.essence --solver or-tools | ||
# echo "" | ||
# echo "" | ||
# echo "========================================" | ||
|
||
# SAT solvers | ||
|
||
echo "\nglucose" | ||
echo "glucose" | ||
conjure solve test.essence --solver glucose | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nglucose-syrup" | ||
echo "glucose-syrup" | ||
conjure solve test.essence --solver glucose-syrup | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nlingeling" | ||
echo "lingeling" | ||
conjure solve test.essence --solver lingeling | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nplingeling" | ||
echo "plingeling" | ||
conjure solve test.essence --solver plingeling | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\ntreengeling" | ||
echo "treengeling" | ||
conjure solve test.essence --solver treengeling | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\ncadical" | ||
echo "cadical" | ||
conjure solve test.essence --solver cadical | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nminisat" | ||
conjure solve test.essence --solver minisat | ||
|
||
# commenting out as we do not have an install script for it | ||
# echo "minisat" | ||
# conjure solve test.essence --solver minisat | ||
# echo "" | ||
# echo "" | ||
# echo "========================================" | ||
|
||
# AllSAT solvers | ||
|
||
echo "\nbc_minisat_all --number-of-solutions=all" | ||
echo "bc_minisat_all --number-of-solutions=all" | ||
conjure solve test.essence --solver bc_minisat_all --number-of-solutions=all | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nnbc_minisat_all --number-of-solutions=all" | ||
echo "nbc_minisat_all --number-of-solutions=all" | ||
conjure solve test.essence --solver nbc_minisat_all --number-of-solutions=all | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
|
||
# MaxSAT solvers | ||
|
||
echo "\nopen-wbo" | ||
echo "open-wbo" | ||
conjure solve testo.essence --solver open-wbo | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
|
||
# MIP solvers (via MiniZinc) | ||
|
||
echo "\ncoin-or" | ||
conjure solve test.essence --solver coin-or | ||
# commenting out as we do not have an install script for it | ||
# echo "coin-or" | ||
# conjure solve test.essence --solver coin-or | ||
# echo "" | ||
# echo "" | ||
# echo "========================================" | ||
|
||
echo "\ncplex" | ||
conjure solve test.essence --solver cplex | ||
# commenting out as we do not have an install script for it | ||
# echo "cplex" | ||
# conjure solve test.essence --solver cplex | ||
# echo "" | ||
# echo "" | ||
# echo "========================================" | ||
|
||
|
||
# SMT solvers | ||
|
||
echo "\nboolector" | ||
echo "boolector" | ||
conjure solve test.essence --solver boolector | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nboolector-bv" | ||
echo "boolector-bv" | ||
conjure solve test.essence --solver boolector-bv | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nyices" | ||
echo "yices" | ||
conjure solve test.essence --solver yices | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nyices-bv" | ||
echo "yices-bv" | ||
conjure solve test.essence --solver yices-bv | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nyices-lia" | ||
echo "yices-lia" | ||
conjure solve test.essence --solver yices-lia | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nyices-idl" | ||
echo "yices-idl" | ||
conjure solve test.essence --solver yices-idl | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nz3" | ||
echo "z3" | ||
conjure solve test.essence --solver z3 | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nz3-bv" | ||
echo "z3-bv" | ||
conjure solve test.essence --solver z3-bv | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nz3-lia" | ||
echo "z3-lia" | ||
conjure solve test.essence --solver z3-lia | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nz3-nia" | ||
echo "z3-nia" | ||
conjure solve test.essence --solver z3-nia | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
echo "\nz3-idl" | ||
echo "z3-idl" | ||
conjure solve test.essence --solver z3-idl | ||
echo "" | ||
echo "" | ||
echo "========================================" | ||
|
||
|
||
# remove the generated files | ||
rm -rf conjure-output *.solution | ||
|
||
) |
Oops, something went wrong.