dcp-pumpkin
/dcp-pumpkin
Buduje modele ograniczeń i optymalizacji w Rust z solverem Pumpkin, z ograniczeniami liniowymi i globalnymi oraz dowodzeniem optymalności.
- Autor
- DCP-Bench ↗
- Repozytorium
- DCP-Skills ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 11.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 29
- Skrypty
- 8
- 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.
- 8 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: assets/rust/all-optimal-solutions/src/main.rs, assets/rust/all-solutions/src/main.rs, assets/rust/infeasible-sums/src/main.rs, assets/rust/maximise-production/src/main.rs, assets/rust/minimise-colours/src/main.rs, assets/rust/minimise-partition/src/main.rs, assets/rust/satisfy-colouring/src/main.rs, assets/rust/scheduling-makespan/src/main.rs
Co robi i kiedy
Buduje modele ograniczeń i optymalizacji w Rust z solverem Pumpkin, z ograniczeniami liniowymi i globalnymi oraz dowodzeniem optymalności.
Oryginalny opis (EN)
Pumpkin, a constraint solver written in Rust (crate pumpkin-solver 0.5.0) with lazy clause generation, integer and Boolean variables, linear and global constraints, and proven optimisation. Use when writing, debugging or explaining a constraint or optimisation model with Pumpkin, in Rust, or when the user has chosen Pumpkin.
Jak działa
- Pick an interface
- Contents
- Modelling
- Solving
- All solutions
- Further reading
Podgląd SKILL.md
--- name: dcp-pumpkin description: Pumpkin, a constraint solver written in Rust (crate pumpkin-solver 0.5.0) with lazy clause generation, integer and Boolean variables, linear and global constraints, and proven optimisation. Use when writing, debugging or explaining a constraint or optimisation model with Pumpkin, in Rust, or when the user has chosen Pumpkin. license: Apache-2.0 compatibility: "Rust: cargo (tested with Rust 1.98.1), pumpkin-solver 0.5.0 from crates.io (MIT OR Apache-2.0), git on PATH while building, and network access or a vendored copy of the crates. Build with NO_CHECKERS=true." metadata: domain: constraint-programming solver: pumpkin paradigm: cp interfaces: "rust" --- # Pumpkin Pumpkin is a constraint programming solver with lazy clause generation, written in Rust by ConSol Lab at TU Delft. You create variables on a solver object, post constraints built by Pumpkin's own constructors, then ask it to satisfy or optimise. A Boolean is a literal, not a variable, and a linear constraint takes variables with explicit coefficients. ## Pick an interface Read this file, then the interface file for your language. | | Rust | |---|---| | Read | [interfaces/rust.md](interfaces/rust.md) | | Package | `pumpkin-solver` crate on crates.io, native API | Other bindings of Pumpkin are not covered yet. ## Contents - [Modelling](#modelling) · [Solving](#solving) · [All solutions](#all-solutions) - Per language: [Rust](interfaces/rust.md); sources in [sources.md](sources.md) ## Modelling Official: [repository](https://github.com/consol-lab/pumpkin). The constructors and their exact arguments are in the interface file. Pumpkin offers linear (in)equalities, `all_different`, `element` (0-based), `table`, `cumulative`, `times`, `division` (truncates toward zero), `absolute`, `maximum`, `minimum`, clauses and Boolean-weighted sums, and reification of any posted constraint in both directions or one way. There is no modulo and no cardinality (count) constraint. Write `a == k*q + r` with `0 <= r < k` for modulo, and use a Boolean-weighted sum with unit weights for "at most k of these literals". **Counting distinct values (for example the number of colours).** Pumpkin has no count-distinct or cardinality constraint. Give each value a variable in `0..=n-1`, take the maximum of them into one variable `top`, and minimise `top`. Values start at 0, so the count is `optimum + 1`. A zero coefficient must never reach a linear term: drop zero weights before building terms (the failure modes are in the interface file). ## Solving The objective is a single variable. Every call needs a brancher, a conflict resolver and a time budget. | Outcome | Meaning | |---|---| | satisfiable | A solution was found | | unsatisfiable | Proven: no solution (or none left, when enumerating) | | unknown | The time budget ran out; nothing proven | | optimal | Proven optimal | | satisfiable or stopped, while optimising | A solution was found but optimality is not proven | For a larger instance, `unknown` or `stopped` means the budget ran out: raise the time limit to prove optimality. A solution from a cut-off run is valid, but its value is only a bound on the optimum. The job-shop instance ft06 (optimum 55, 6 jobs by 6 machines) solved in under 2 seconds of wall time with a release build. ## All solutions Enumerate by solving again after each solution, with a clause that rules out the values just printed. Block only the variables you print: a clause over auxiliary variables lets the same printed answer appear twice. **All optimal solutions.** Optimise first, then fix the objective to the best value found, and enumerate as above. ## Further reading - Repository and changelog: <https://github.com/consol-lab/pumpkin> - Crate API reference: <https://docs.rs/pumpkin-solver/0.5.0/pumpkin_solver/> - Per language: [Rust](interfaces/rust.md)
Pliki w paczce (29)
- SKILL.md 4 KB
- sources.md 9 KB
- assets/rust/all-optimal-solutions/Cargo.toml 1 KB
- assets/rust/all-optimal-solutions/README.md 1 KB
- assets/rust/all-optimal-solutions/src/main.rs 4 KB
- assets/rust/all-solutions/Cargo.toml 1 KB
- assets/rust/all-solutions/README.md 1 KB
- assets/rust/all-solutions/src/main.rs 2 KB
- assets/rust/infeasible-sums/Cargo.toml 1 KB
- assets/rust/infeasible-sums/README.md 1 KB
- assets/rust/infeasible-sums/src/main.rs 1 KB
- assets/rust/maximise-production/Cargo.toml 1 KB
- assets/rust/maximise-production/README.md 1 KB
- assets/rust/maximise-production/src/main.rs 2 KB
- assets/rust/minimise-colours/Cargo.toml 1 KB
- assets/rust/minimise-colours/README.md 1 KB
- assets/rust/minimise-colours/src/main.rs 2 KB
- assets/rust/minimise-partition/Cargo.toml 1 KB
- assets/rust/minimise-partition/README.md 1 KB
- assets/rust/minimise-partition/src/main.rs 3 KB
- assets/rust/satisfy-colouring/Cargo.toml 1 KB
- assets/rust/satisfy-colouring/README.md 1 KB
- assets/rust/satisfy-colouring/src/main.rs 2 KB
- assets/rust/scheduling-makespan/Cargo.toml 1 KB
- assets/rust/scheduling-makespan/README.md 1 KB
- assets/rust/scheduling-makespan/src/main.rs 3 KB
- evals/evals.json 4 KB
- interfaces/rust.md 15 KB
- references/rust/pumpkin-api.md 5 KB
Wersje
W bazie nie ma innych skilli o nazwie dcp-pumpkin.
Migawka bazy z 13.11.2026 · wersja paczki d8ec0d024446 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Podobne skille
- 100dcp-huub
Buduje i debuguje modele ograniczeń i optymalizacji w Rust z solverem Huub, z ograniczeniami liniowymi, tablicowymi i kumulatywnymi. - 100dcp-maxicp
Buduje modele programowania z ograniczeniami w MaxiCP w Javie, z przedziałami dla harmonogramów, przeszukiwaniem i wyliczaniem rozwiązań. - 100casadi-ipopt-nlp
Rozwiązuje zadania optymalizacji nieliniowej w CasADi z solverem IPOPT: zmienne symboliczne, ograniczenia nieliniowe, opcje solvera i wiele inicjalizacji, także dla systemów elektroenergetycznych.