python-sat 0.1.8.dev10__cp310-cp310-win_amd64.whl → 1.8.dev26__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of python-sat might be problematic. Click here for more details.
- pycard.cp310-win_amd64.pyd +0 -0
- pysat/__init__.py +4 -4
- pysat/_fileio.py +30 -14
- pysat/allies/approxmc.py +22 -22
- pysat/allies/unigen.py +435 -0
- pysat/card.py +13 -12
- pysat/engines.py +1302 -0
- pysat/examples/bbscan.py +663 -0
- pysat/examples/bica.py +691 -0
- pysat/examples/fm.py +12 -8
- pysat/examples/genhard.py +24 -23
- pysat/examples/hitman.py +53 -37
- pysat/examples/lbx.py +56 -15
- pysat/examples/lsu.py +28 -14
- pysat/examples/mcsls.py +53 -15
- pysat/examples/models.py +6 -4
- pysat/examples/musx.py +15 -7
- pysat/examples/optux.py +71 -32
- pysat/examples/primer.py +620 -0
- pysat/examples/rc2.py +268 -69
- pysat/formula.py +3241 -229
- pysat/pb.py +85 -37
- pysat/process.py +16 -2
- pysat/solvers.py +2119 -724
- pysolvers.cp310-win_amd64.pyd +0 -0
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/approxmc.py +22 -22
- python_sat-1.8.dev26.data/scripts/bbscan.py +663 -0
- python_sat-1.8.dev26.data/scripts/bica.py +691 -0
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/fm.py +12 -8
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/genhard.py +24 -23
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/lbx.py +56 -15
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/lsu.py +28 -14
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/mcsls.py +53 -15
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/models.py +6 -4
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/musx.py +15 -7
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/optux.py +71 -32
- python_sat-1.8.dev26.data/scripts/primer.py +620 -0
- {python_sat-0.1.8.dev10.data → python_sat-1.8.dev26.data}/scripts/rc2.py +268 -69
- python_sat-1.8.dev26.data/scripts/unigen.py +435 -0
- {python_sat-0.1.8.dev10.dist-info → python_sat-1.8.dev26.dist-info}/METADATA +19 -5
- python_sat-1.8.dev26.dist-info/RECORD +48 -0
- {python_sat-0.1.8.dev10.dist-info → python_sat-1.8.dev26.dist-info}/WHEEL +1 -1
- python_sat-0.1.8.dev10.dist-info/RECORD +0 -39
- {python_sat-0.1.8.dev10.dist-info → python_sat-1.8.dev26.dist-info/licenses}/LICENSE.txt +0 -0
- {python_sat-0.1.8.dev10.dist-info → python_sat-1.8.dev26.dist-info}/top_level.txt +0 -0
pysat/card.py
CHANGED
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
pp. 129-134
|
|
69
69
|
|
|
70
70
|
A cardinality constraint is a constraint of the form:
|
|
71
|
-
:math
|
|
72
|
-
practical problem formulations. Note that the implementation of the
|
|
71
|
+
:math:`\\sum_{i=1}^n{x_i}\\leq k`. Cardinality constraints are ubiquitous
|
|
72
|
+
in practical problem formulations. Note that the implementation of the
|
|
73
73
|
pairwise, bitwise, and ladder encodings can only deal with AtMost1
|
|
74
|
-
constraints, e.g. :math
|
|
74
|
+
constraints, e.g. :math:`\\sum_{i=1}^n{x_i}\\leq 1`.
|
|
75
75
|
|
|
76
76
|
Access to all cardinality encodings can be made through the main class of
|
|
77
77
|
this module, which is :class:`.CardEnc`.
|
|
@@ -150,9 +150,9 @@ class EncType(object):
|
|
|
150
150
|
Note that while most of the encodings are produced as a list of
|
|
151
151
|
clauses, the "native" encoding of `MiniCard
|
|
152
152
|
<https://github.com/liffiton/minicard>`__ is managed as one clause.
|
|
153
|
-
Given an AtMostK constraint :math
|
|
154
|
-
encoding represents it as a pair ``[lits, k]``, where ``lits``
|
|
155
|
-
list of size ``n`` containing literals in the sum.
|
|
153
|
+
Given an AtMostK constraint :math:`\\sum_{i=1}^n{x_i\\leq k}`, the
|
|
154
|
+
native encoding represents it as a pair ``[lits, k]``, where ``lits``
|
|
155
|
+
is a list of size ``n`` containing literals in the sum.
|
|
156
156
|
"""
|
|
157
157
|
|
|
158
158
|
pairwise = 0
|
|
@@ -248,8 +248,8 @@ class CardEnc(object):
|
|
|
248
248
|
encoding=EncType.seqcounter):
|
|
249
249
|
"""
|
|
250
250
|
This method can be used for creating a CNF encoding of an AtMostK
|
|
251
|
-
constraint, i.e. of :math
|
|
252
|
-
shares the arguments and the return type with method
|
|
251
|
+
constraint, i.e. of :math:`\\sum_{i=1}^{n}{x_i}\\leq k`. The
|
|
252
|
+
method shares the arguments and the return type with method
|
|
253
253
|
:meth:`CardEnc.atleast`. Please, see it for details.
|
|
254
254
|
"""
|
|
255
255
|
|
|
@@ -310,9 +310,10 @@ class CardEnc(object):
|
|
|
310
310
|
encoding=EncType.seqcounter):
|
|
311
311
|
"""
|
|
312
312
|
This method can be used for creating a CNF encoding of an AtLeastK
|
|
313
|
-
constraint, i.e. of :math
|
|
314
|
-
takes 1 mandatory argument ``lits`` and 3 default arguments
|
|
315
|
-
specified: ``bound``, ``top_id``, ``vpool``, and
|
|
313
|
+
constraint, i.e. of :math:`\\sum_{i=1}^{n}{x_i}\\geq k`. The
|
|
314
|
+
method takes 1 mandatory argument ``lits`` and 3 default arguments
|
|
315
|
+
can be specified: ``bound``, ``top_id``, ``vpool``, and
|
|
316
|
+
``encoding``.
|
|
316
317
|
|
|
317
318
|
:param lits: a list of literals in the sum.
|
|
318
319
|
:param bound: the value of bound :math:`k`.
|
|
@@ -410,7 +411,7 @@ class CardEnc(object):
|
|
|
410
411
|
encoding=EncType.seqcounter):
|
|
411
412
|
"""
|
|
412
413
|
This method can be used for creating a CNF encoding of an EqualsK
|
|
413
|
-
constraint, i.e. of :math
|
|
414
|
+
constraint, i.e. of :math:`\\sum_{i=1}^{n}{x_i}= k`. The method
|
|
414
415
|
makes consecutive calls of both :meth:`CardEnc.atleast` and
|
|
415
416
|
:meth:`CardEnc.atmost`. It shares the arguments and the return type
|
|
416
417
|
with method :meth:`CardEnc.atleast`. Please, see it for details.
|