Expression transformations (cpmpy.transformations)

Methods to transform CPMpy expressions in other CPMpy expressions

Input and output are always CPMpy expressions, so transformations can be chained and called multiple times, as needed.

A transformation can not modify expressions in place but in that case should create and return new expression objects. In this way, the expressions prior to the transformation remain intact, and could be used for other purposes too.

List of submodules

flatten_model

Flattening a model (or individual constraints) into 'flat normal form'.

get_variables

Returns an list of all variables in the model or expressions