dcp-exact
/dcp-exact
Buduje i debuguje modele liniowe całkowitoliczbowe i pseudo-boolowskie w bibliotece Exact w Pythonie, z ograniczeniami liniowymi i reifikacją.
- Autor
- DCP-Bench ↗
- Repozytorium
- DCP-Skills ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 11.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 28
- Skrypty
- 11
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 3
Brak sygnałów. Repozytorium zmienione 11.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 11 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: assets/python/assign-distinct/model.py, assets/python/budget-infeasible/model.py, assets/python/change-making/model.py, assets/python/change-ways/model.py, assets/python/cryptarithm/model.py, assets/python/either-or/model.py, assets/python/graph-colouring/model.py, assets/python/job-shop/model.py, assets/python/pick-items/model.py, assets/python/production-plan/model.py, assets/python/task-schedul
Co robi i kiedy
Buduje i debuguje modele liniowe całkowitoliczbowe i pseudo-boolowskie w bibliotece Exact w Pythonie, z ograniczeniami liniowymi i reifikacją.
Oryginalny opis (EN)
Exact, a pseudo-Boolean and integer linear solver with Python bindings (package exact, import exact, class Exact) that builds models from named integer and 0/1 variables, linear constraints, reification and multiplication. Use when writing, debugging or explaining an integer linear or pseudo-Boolean model with Exact, or when the user asks for Exact's Python API.
Jak działa
- Pick an interface
- Contents
- Modelling
- Solving
- All solutions
- Common issues
- Further reading
Podgląd SKILL.md
--- name: dcp-exact description: Exact, a pseudo-Boolean and integer linear solver with Python bindings (package exact, import exact, class Exact) that builds models from named integer and 0/1 variables, linear constraints, reification and multiplication. Use when writing, debugging or explaining an integer linear or pseudo-Boolean model with Exact, or when the user asks for Exact's Python API. license: Apache-2.0 compatibility: Requires Python 3.12 (tested) and the exact package (pip install exact; precompiled for x86_64 Linux and Windows). The package is AGPL-3.0-only. metadata: domain: constraint-programming solver: exact paradigm: pb interfaces: "python" --- Exact is a pseudo-Boolean solver: it encodes integer variables as binaries internally, so a wide integer domain is cheap, but **every constraint must be linear**. A model is built by naming variables and adding constraints; there is no expression language, and nothing is solved until you call a solve method. ## Pick an interface Read this file, then the interface file for your language. | | Python | |---|---| | Read | [interfaces/python/README.md](interfaces/python/README.md) | | Package | `exact` (`import exact`, class `Exact`) | Other bindings (the C++ library and the command-line tool) are not covered yet. ## Contents - [Modelling](#modelling) - [Solving](#solving) - [All solutions](#all-solutions) - [Common issues](#common-issues) - [Further reading](#further-reading) ## Modelling Variables and constraints are addressed by **name**. Constraints are linear sums of integer variables with integer coefficients, bounded from one or both sides; implications and equivalences with a 0/1 head variable (reification) and products of variables exist. Exact has **no global constraints** (all-different, element, table, cumulative, no-overlap): build them from 0/1 indicator variables or reification. Anything that talks about a variable *taking a particular value* needs one 0/1 variable per value, linked to the integer variable. Patterns and code: [interfaces/python/patterns.md](interfaces/python/patterns.md). ## Solving Nothing is solved until a solve method is called. The result is a state: | State | Meaning | |---|---| | `SAT` | a solution was found; with `toOptimum`, it is proven optimal | | `UNSAT` | no solution exists (after exhaustion, too) | | `TIMEOUT` | the limit stopped the search; not proven, and the value is meaningless | Infeasibility is never an exception. There is **no time limit by default**: a hard model runs until it finishes, so pass a limit when there is a budget and report a `TIMEOUT` answer as not proven. Exact minimises internally: a maximised objective value comes back negated. Exact calls and parameters: [interfaces/python/README.md](interfaces/python/README.md). ## All solutions Enumerate by solving without optimising, then blocking the solution projected onto the decision variables, so auxiliary variables are not counted twice; stop at `UNSAT`. All optimal solutions: solve for the optimum, pin the real objective at that value with a constraint, then enumerate over the decision variables. ## Common issues | Problem | Likely cause | Fix | |---|---|---| | Global constraint not found (`all_different`, `element`) | Exact has none | Build from indicators or reification ([Modelling](#modelling)) | | Run never ends, or hits an external limit with no answer | no time limit by default | Set a limit; on `TIMEOUT` report "not proven" | | Maximum shows as a negative number | Exact minimises internally | Negate the value for a maximisation | | Enumeration gives duplicates | Enumerated over auxiliary variables | Block solutions over the decision variables only | Binding-specific issues: [interfaces/python/README.md](interfaces/python/README.md#common-issues). ## Further reading - Repository and README: <https://gitlab.com/nonfiction-software/exact> - Input formats for the command line: <https://gitlab.com/nonfiction-software/exact/-/blob/main/InputFormats.md> - Package: <https://pypi.org/project/exact/>
Pliki w paczce (28)
- SKILL.md 4 KB
- sources.md 2 KB
- assets/python/assign-distinct/README.md 1 KB
- assets/python/assign-distinct/model.py 1 KB
- assets/python/budget-infeasible/README.md 1 KB
- assets/python/budget-infeasible/model.py 1 KB
- assets/python/change-making/README.md 1 KB
- assets/python/change-making/model.py 1 KB
- assets/python/change-ways/README.md 1 KB
- assets/python/change-ways/model.py 1 KB
- assets/python/cryptarithm/README.md 1 KB
- assets/python/cryptarithm/model.py 2 KB
- assets/python/either-or/README.md 1 KB
- assets/python/either-or/model.py 1 KB
- assets/python/graph-colouring/README.md 1 KB
- assets/python/graph-colouring/model.py 2 KB
- assets/python/job-shop/README.md 1 KB
- assets/python/job-shop/model.py 3 KB
- assets/python/pick-items/README.md 1 KB
- assets/python/pick-items/model.py 1 KB
- assets/python/production-plan/README.md 1 KB
- assets/python/production-plan/model.py 1 KB
- assets/python/task-schedule/README.md 1 KB
- assets/python/task-schedule/model.py 2 KB
- evals/evals.json 2 KB
- interfaces/python/README.md 13 KB
- interfaces/python/patterns.md 3 KB
- references/python/exact-api.md 6 KB
Wersje
W bazie nie ma innych skilli o nazwie dcp-exact.
Migawka bazy z 13.11.2026 · wersja paczki d15bba724275 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100dcp-hermax
Buduje modele MaxSAT w bibliotece hermax dla Pythona, z ograniczeniami pseudo-boolowskimi, harmonogramami i wyliczaniem rozwiązań. - 100dcp-pumpkin
Buduje modele ograniczeń i optymalizacji w Rust z solverem Pumpkin, z ograniczeniami liniowymi i globalnymi oraz dowodzeniem optymalności. - 90boolean-parameters
Zastępuje anonimowe flagi boolowskie nazwanymi enumami lub osobnymi funkcjami, żeby wywołania były czytelne bez zaglądania do definicji. - 80role-algorithms:mathematical-optimization
Formułuje zadania optymalizacyjne i dobiera solver: programowanie liniowe, całkowitoliczbowe, wypukłe oraz harmonogramy. - 100linear-debug-bundle
Dostarcza zestaw narzędzi do debugowania integracji z Linear: logowanie, śledzenie wywołań API i własne narzędzia diagnostyczne. - 100linear-common-errors
Diagnozuje i naprawia typowe błędy API Linear, w tym problemy z uwierzytelnianiem, przydatne przy debugowaniu integracji.