diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92cbe7e..4a35bd6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,12 +26,12 @@ sphinx-build -M html docs/source docs/output ## Performance ### How to profile the code ```bash -NUMBA_DISABLE_JIT=1 ./scripts/bash/profile.sh tests/examples/test_queens.py | more +NUMBA_DISABLE_JIT=1 python -m "cProfile" -s time -m nucs.examples.queens | more ``` ### How to measure the performance ```bash -time NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python tests/examples/test_queens.py -n 12 +time NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.queens -n 12 ``` ## Package diff --git a/ROADMAP.md b/ROADMAP.md index b6fac16..4937787 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -15,7 +15,9 @@ # Engine - choice points pruning - backtrackable propagator __state__ +- backtrackable list of entailed propagators - implement decision variables +- disable offsets when not useful # Numba - use prange with parallel=True @@ -26,3 +28,4 @@ - installation : put links to examples (and not CSPLIB) - examples : link to github - improve usage of rst +- document environment variables \ No newline at end of file diff --git a/nucs/examples/queens/__main__.py b/nucs/examples/queens/__main__.py index 1b4996d..33dd712 100644 --- a/nucs/examples/queens/__main__.py +++ b/nucs/examples/queens/__main__.py @@ -8,7 +8,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("-n", type=int, default=12) + parser.add_argument("-n", type=int, default=10) args = parser.parse_args() problem = QueensProblem(args.n) solver = BacktrackSolver(problem) diff --git a/scripts/bash/profile.sh b/scripts/bash/profile.sh deleted file mode 100755 index b2322db..0000000 --- a/scripts/bash/profile.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -python -m "cProfile" -s time "$1" -