A Numpy and Numba based Python library for solving Constraint Satisfaction Problems over finite domains
Project description
TLDR
NUCS is a Python library for solving Constraint Satisfaction and Optimization Problems. Because it is 100% written in Python, NUCS is easy to install and use. NUCS is also very fast because it is powered by Numpy and Numba.
Documentation
Check out NUCS documentation.
With NUCS, in a few seconds you can ...
Compute the 92 solutions to the BIBD(8,14,7,4,3) problem:
{
'OPTIMIZER_SOLUTION_NB': 0,
'PROBLEM_FILTER_NB': 2797,
'PROBLEM_PROPAGATOR_NB': 462,
'PROBLEM_VARIABLE_NB': 504,
'PROPAGATOR_ENTAILMENT_NB': 36977,
'PROPAGATOR_FILTER_NB': 564122,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 534436,
'PROPAGATOR_INCONSISTENCY_NB': 1307,
'SOLVER_BACKTRACK_NB': 1398,
'SOLVER_CHOICE_DEPTH': 41,
'SOLVER_CHOICE_NB': 1398,
'SOLVER_SOLUTION_NB': 92
}
Demonstrate that the optimal 10-marks Golomb ruler length is 55:
{
'OPTIMIZER_SOLUTION_NB': 10,
'PROBLEM_FILTER_NB': 22204,
'PROBLEM_PROPAGATOR_NB': 82,
'PROBLEM_VARIABLE_NB': 45,
'PROPAGATOR_ENTAILMENT_NB': 416934,
'PROPAGATOR_FILTER_NB': 2145268,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 1129818,
'PROPAGATOR_INCONSISTENCY_NB': 11065,
'SOLVER_BACKTRACK_NB': 11064,
'SOLVER_CHOICE_DEPTH': 9,
'SOLVER_CHOICE_NB': 11129,
'SOLVER_SOLUTION_NB': 10
}
Find all 14200 solutions to the 12-queens problem:
{
'OPTIMIZER_SOLUTION_NB': 0,
'PROBLEM_FILTER_NB': 262011,
'PROBLEM_PROPAGATOR_NB': 3,
'PROBLEM_VARIABLE_NB': 36,
'PROPAGATOR_ENTAILMENT_NB': 0,
'PROPAGATOR_FILTER_NB': 1910609,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 631079,
'PROPAGATOR_INCONSISTENCY_NB': 116806,
'SOLVER_BACKTRACK_NB': 131005,
'SOLVER_CHOICE_DEPTH': 10,
'SOLVER_CHOICE_NB': 131005,
'SOLVER_SOLUTION_NB': 14200
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nucs-0.9.0.tar.gz
(27.7 kB
view details)
Built Distribution
NUCS-0.9.0-py3-none-any.whl
(56.0 kB
view details)
File details
Details for the file nucs-0.9.0.tar.gz
.
File metadata
- Download URL: nucs-0.9.0.tar.gz
- Upload date:
- Size: 27.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbd2e41da2c4d55f3d72901e933a7b0ecbd3c8f8f090fd8c7e3548c75907b84a |
|
MD5 | 72260f2ec12b6ff65543a505e7c350ba |
|
BLAKE2b-256 | 94cf4dc2a34de6c4f1b8b088692f6ec4c09006c8f186c7427db106c0ce6ede18 |
File details
Details for the file NUCS-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: NUCS-0.9.0-py3-none-any.whl
- Upload date:
- Size: 56.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b4940e61d88f9f24f438ce9170183cdb2bb8fc2c58ea3dbb5d930e00cb6939 |
|
MD5 | 3cb6ce003c8bf7b44f7ed1eb73f990f6 |
|
BLAKE2b-256 | 386a6719004cecd9dfec75046b4c6c2c5801360435c9148cfd3aa6dba8b8d073 |