Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yan Georget committed Nov 12, 2024
1 parent 6591d34 commit 761724c
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 38 deletions.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
copyright = '2024, Yan Georget'
author = 'Yan Georget'

release = '2.1.0'
version = '2.1.0'
release = '2.2.0'
version = '2.2.0'

# -- General configuration

Expand Down
86 changes: 62 additions & 24 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,34 @@ Let's find all solutions to the `12-queens problem <https://www.csplib.org/Probl

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.queens -n 12
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.queens -n 12 --log_level=INFO
Produces the following output:

.. code-block:: bash
2024-11-12 17:24:49,061 - INFO - nucs.solvers.solver - Problem has 3 propagators
2024-11-12 17:24:49,061 - INFO - nucs.solvers.solver - Problem has 12 variables
2024-11-12 17:24:49,061 - INFO - nucs.solvers.backtrack_solver - BacktrackSolver uses variable heuristic 0
2024-11-12 17:24:49,061 - INFO - nucs.solvers.backtrack_solver - BacktrackSolver uses domain heuristic 0
2024-11-12 17:24:49,061 - INFO - nucs.solvers.backtrack_solver - BacktrackSolver uses consistency algorithm 0
2024-11-12 17:24:49,061 - INFO - nucs.solvers.backtrack_solver - Choice points stack has a maximal height of 128
2024-11-12 17:24:49,200 - INFO - nucs.solvers.multiprocessing_solver - MultiprocessingSolver has 1 processors
{
'OPTIMIZER_SOLUTION_NB': 0,
'PROBLEM_FILTER_NB': 262011,
'PROBLEM_PROPAGATOR_NB': 3,
'PROBLEM_VARIABLE_NB': 36,
'PROPAGATOR_ENTAILMENT_NB': 0,
'PROPAGATOR_FILTER_NB': 2269980,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 990450,
'PROPAGATOR_INCONSISTENCY_NB': 116806,
'SOLVER_BACKTRACK_NB': 131005,
'SOLVER_CHOICE_NB': 131005,
'SOLVER_CHOICE_DEPTH': 10,
'SOLVER_SOLUTION_NB': 14200
'OPTIMIZER_SOLUTION_NB': 0,
'PROBLEM_FILTER_NB': 262011,
'PROBLEM_SHAVING_NB': 0,
'PROBLEM_SHAVING_CHANGE_NB': 0,
'PROBLEM_SHAVING_NO_CHANGE_NB': 0,
'PROPAGATOR_ENTAILMENT_NB': 0,
'PROPAGATOR_FILTER_NB': 2269980,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 990450,
'PROPAGATOR_INCONSISTENCY_NB': 116806,
'SOLVER_BACKTRACK_NB': 131005,
'SOLVER_CHOICE_NB': 131005,
'SOLVER_CHOICE_DEPTH': 10,
'SOLVER_SOLUTION_NB': 14200
}
Solve the Golomb ruler problem
Expand All @@ -47,22 +61,46 @@ Let's find the optimal solution to the `Golomb ruler problem <https://www.csplib

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.golomb -n 10 --symmetry_breaking
NUMBA_CACHE_DIR=.numba/cache -m nucs.examples.golomb -n 10 --symmetry_breaking --log_level=INFO
Produces the following output:

.. code-block:: bash
2024-11-12 17:27:45,110 - INFO - nucs.solvers.solver - Problem has 82 propagators
2024-11-12 17:27:45,110 - INFO - nucs.solvers.solver - Problem has 45 variables
2024-11-12 17:27:45,110 - INFO - nucs.solvers.backtrack_solver - BacktrackSolver uses variable heuristic 0
2024-11-12 17:27:45,110 - INFO - nucs.solvers.backtrack_solver - BacktrackSolver uses domain heuristic 0
2024-11-12 17:27:45,110 - INFO - nucs.solvers.backtrack_solver - BacktrackSolver uses consistency algorithm 2
2024-11-12 17:27:45,110 - INFO - nucs.solvers.backtrack_solver - Choice points stack has a maximal height of 128
2024-11-12 17:27:45,172 - INFO - nucs.solvers.backtrack_solver - Minimizing variable 8
2024-11-12 17:27:45,644 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 80
2024-11-12 17:27:45,677 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 75
2024-11-12 17:27:45,677 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 73
2024-11-12 17:27:45,678 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 72
2024-11-12 17:27:45,679 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 70
2024-11-12 17:27:45,682 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 68
2024-11-12 17:27:45,687 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 66
2024-11-12 17:27:45,693 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 62
2024-11-12 17:27:45,717 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 60
2024-11-12 17:27:45,977 - INFO - nucs.solvers.backtrack_solver - Found a (new) solution: 55
{
'OPTIMIZER_SOLUTION_NB': 10,
'PROBLEM_FILTER_NB': 22886,
'PROBLEM_PROPAGATOR_NB': 82,
'PROBLEM_VARIABLE_NB': 45,
'PROPAGATOR_ENTAILMENT_NB': 98080,
'PROPAGATOR_FILTER_NB': 2843257,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 1806240,
'PROPAGATOR_INCONSISTENCY_NB': 11406,
'SOLVER_BACKTRACK_NB': 11405,
'SOLVER_CHOICE_NB': 11470,
'PROBLEM_FILTER_NB': 22652,
'PROBLEM_SHAVING_NB': 0,
'PROBLEM_SHAVING_CHANGE_NB': 0,
'PROBLEM_SHAVING_NO_CHANGE_NB': 0,
'PROPAGATOR_ENTAILMENT_NB': 107911,
'PROPAGATOR_FILTER_NB': 2813035,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 1745836,
'PROPAGATOR_INCONSISTENCY_NB': 11289,
'SOLVER_BACKTRACK_NB': 11288,
'SOLVER_CHOICE_NB': 11353,
'SOLVER_CHOICE_DEPTH': 9,
'SOLVER_SOLUTION_NB': 10
}
[1, 6, 10, 23, 26, 34, 41, 53, 55]
[ 1 6 10 23 26 34 41 53 55]
**********************
Write your first model
Expand Down
22 changes: 11 additions & 11 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ This problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.alpha
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.alpha
This problem leverages the propagators:

Expand All @@ -515,7 +515,7 @@ This problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.bibd -v 8 -b 14 -r 7 -k 4 -l 3 --symmetry_breaking
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.bibd -v 8 -b 14 -r 7 -k 4 -l 3 --symmetry_breaking
This problem leverages the propagators:

Expand All @@ -531,7 +531,7 @@ This problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.donald
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.donald
This problem leverages the propagators:

Expand All @@ -548,7 +548,7 @@ This problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.golomb -n 10 --symmetry_breaking
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.golomb -n 10 --symmetry_breaking
This problem leverages the propagators:

Expand All @@ -566,7 +566,7 @@ This problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.knapsack
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.knapsack
This problem leverages the propagators:

Expand All @@ -583,7 +583,7 @@ This problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.magic_sequence -n 100
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.magic_sequence -n 100
This problem leverages the propagators:

Expand All @@ -600,7 +600,7 @@ This problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.magic_square -n 4 --symmetry_breaking
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.magic_square -n 4 --symmetry_breaking
This problem leverages the propagators:

Expand All @@ -618,7 +618,7 @@ The problem QG5, a sub-instance of the quasigroup problem, can be run with the c

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.quasigroup -n 10 --symmetry_breaking
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.quasigroup -n 10 --symmetry_breaking
This problem leverages the propagators:

Expand All @@ -636,7 +636,7 @@ The problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.queens -n 10
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.queens -n 10
This problem leverages the propagators:

Expand All @@ -652,7 +652,7 @@ The problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.schur_lemma -n 20 --symmetry_breaking
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.schur_lemma -n 20 --symmetry_breaking
This problem leverages the propagators:

Expand All @@ -670,7 +670,7 @@ The problem can be run with the command:

.. code-block:: bash
NUMBA_CACHE_DIR=.numba/cache PYTHONPATH=. python -m nucs.examples.sports_tournament_scheduling -n 10 --symmetry_breaking
NUMBA_CACHE_DIR=.numba/cache python -m nucs.examples.sports_tournament_scheduling -n 10 --symmetry_breaking
This problem leverages the propagators:

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name="NUCS"
version="2.1.0"
version="2.2.0"
authors = [
{ name="Yan Georget", email="[email protected]" },
]
Expand Down

0 comments on commit 761724c

Please sign in to comment.