Cpmpy

Latest version: v0.9.24

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.9.11

FuzzTest bugfix release

* core: importing a file and adding constrains can turn problems wrongly unsatisfiable (174)
* core: Added floordivision '//' on integer variables (201)
* core: Wsum care (182)
* core: cumulative can not assume args are numpy array (178)
* core: add custom cpmpy exceptions
* core: 172 fix - memory crash on mod
* core: double negation bug 170
* globals: Enable deep copy of Cumulative global constraint (169)

* examples: csplib prob001 car sequencepy sliding window view only numpy 1200+ (186)
* tests: (re)active constraint tests on ortools as default solver (180)
* tests: fix deprecation warnings
* tests: skipif when solvers not available
* tests: enable automatic tests on github
* docs: multiple fixes
* docs: add developer guidelines

* transf: Make line-expr more linear (200)
* solvers: minizinc stopped with a non zero exit code but did not output an error message (192)
* solvers: gurobi: timeout status fix

* tools: Example for maximal propagate set of constraints (147)
* tools: prevent incrementality of solvers during tuning
* tools: mus tool crashes with only 1 soft constraint (196)

0.9.10

New:
* tools: added MUS computation to tools
* tools: added hypaerparameter tuning (with Decaprio, CPAIOR22) to tools
* cumulative global constraint, with native ortools and decomposition
* solvers: Z3 interface. Implemented both SAT and OPT subsolvers
* examples: CSPlib problems, with data, all runnable
* examples: IJCAI22 tutorial on 'CP as oracle' slides and notebooks
* variables: add v.clear() to easily clear variables their value

Changed:
* critical bugfix in double negation normalization
* bugfixes in solver translations
* bugfix in negation of globals normalization
* docs: improved docs on hyperparameter search and adding and testing solvers
* gurobi: fix timeout status
* bugfix in element decomposition

0.9.9

Stabilizing the core implementations and a knowledge compiler as solver

New:
* New example: ortools as propagator (only propagation)
* Copy method for model and constraints (and hence hash functions)
* Bools are now treated as numeric when needed
* Xor is now a global constraint (with a decomposition)
* the reify-rewrite transformation: most reifications automatically supported
* the only-numexpr-equality transformation, now generic for all solvers that want
* PySDD as solver: knowledge compiler for Boolean logic and solveAll model counting

Changed:
* Docs: many additions (direct solver access, solveAll, adding a solver guide) and improvements
* Transformation flatten has cleaner implementation
* Bugfixes in bound computations (modulo, weighted sum)
* MiniZinc: fix allequal translation, use integer division
* Reification of Elements now takes range of index variable into account
* Examples: small fixes and improvements
* Tests: more and better

0.9.8

An exciting 'technical' release that opens the door to
add many more solvers

* API change: unified interfaces of solvers/
* New: the gurobi MIP solver
* New: transformations/linearisation/
* More extensive testing
* PySAT: support time\_limit argument to solve

0.9.7

* New: s.solveAll(): convenient (efficient) solution enumeration
* New: added sum() to python\_builtins, behaves like np.sum
* Behind the scenes: add 'wsum' weighted sum operator
* bugfix for sum: always create new expression, do not modify inplace
* bugfix: allow model with only an objective

0.9.6

* Added tutorial video and used notebooks
https://www.youtube.com/watch?v=A4mmmDAdusQ

* Added to examples/:
- LP/CP contest 2021, first problem
- wolf-goat-cabbage and n-puzzle rework
- palindrome day problem
- graph coloring australia (with actual map)

* Added to examples/advanced/:
- CPMpy versions of visual examples from A. Schiendorfer
- visual sudoku example with pytorch neural network classification
- cost-optimal unsatisfiable subset search example
- step-wise explanations of satisfiable problems
- smart predict + optimize with integrated pytorch training
- counterfactual explanations of optimisation problems
- VRP by learning from historical data

* API change:
- m.solve() now only returns True/False, also for optimisation
- new: m.objective\_value(), to get the objective after solving
- new: SolverLookup.get(solvername, model) for easy solver getting
names also allow e.g. 'minizinc:chuffed' and 'pysat:glucose4'

* pysat: better checking of correct package installed
* pysat: automatic encoding of cardinality constraints like sum(x) >= v
* to\_cnf: more testing, some bugfixes
* ort: basic support for 'power' operator
* ort: added installation instructions for or-tools on Apple M1
* ort: bugfix in solution hinting, clear hints once
* ort: fix log callback duplicate printing
* mzn: generic fix for offset 1/0 errors
* model: better handle empty constraints and non-standard lists
* model: can now save\_to/load\_from pickle files
* bugfixes in bounds computations for modulo operator
* get\_vars: ensure the transformation returns unique elements
* requirements included minizinc, no longer the case (it is optional)
* many documentation updates

Page 2 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.