Sugar Rush
Additions to python-sat (https://github.com/pysathq/pysat) to automate some things. Extra features:
- Convert disjunction of CNFs to an equivalent CNF
- Automatic optimization using ITotalizer (binary search)
Design rules
- Only one method adds constraints to the model (solver.add). Other methods only return the clauses that define the constraint. The reason is that the user may want to negate or reify the constraint, i.e. the user may not wish to use the specific constraint. Another benefit is that the user can easily grep in the model definition code for all places where constraints are added to the model. This simplifies debugging.
- The solver's state should only consist of 3 parts:
- The active CNF.
- The used literals.
- The solution values to a satisfied model.
- can of course be computed directly from 1), but is kept for performance.
- The used literals can only be added to, and that should only be done via a single method (solver.var). The reason is to prevent strange bugs that result from re-using literals that are not meant to be equal.
- The solution values to a satisfied model should only be accessible from a single method (solver.solution_value). The reason is to prevent bugs resulting from different sets of solution values being different from each other.
- All methods names should be lowercase. Underscore is used to separate words.
Release files for sugarrush 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sugarrush-0.0.5.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sugarrush-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.0 kB
Release files / sugarrush-0.0.5.tar.gz
| Download URL | sugarrush-0.0.5.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71b7bfc2414c32b3c46dbdf8619ae7cf62b0b54be93ca785677644a1e7d4f826
|
|
BLAKE2b-256 checksum How to use checksums |
1cc39a52b2b4640c3b9f0729c66d498461e02d30b5367e60666e14ec475ec8b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
|
Release files / sugarrush-0.0.5-py3-none-any.whl
| Download URL | sugarrush-0.0.5-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89a19bdb2b57636a9181ee4eddd2fb8b2a35dab8daeeed35f297eebefbb56578
|
|
BLAKE2b-256 checksum How to use checksums |
19fcc621134192b476a606d804cac19020dcddbdb7d05563e78319b7b5000d60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9
|