diff --git a/cpmpy/transformations/decompose_global.py b/cpmpy/transformations/decompose_global.py index 48e8028ac..2f03726c8 100644 --- a/cpmpy/transformations/decompose_global.py +++ b/cpmpy/transformations/decompose_global.py @@ -27,11 +27,12 @@ def decompose_in_tree(lst_of_expr, supported=set(), supported_reified=set(), _to Supported numerical global functions remain in the expression tree as is. They can be rewritten using `cpmpy.transformations.reification.reify_rewrite` The following `bv -> NumExpr Var/Const` can be rewritten as [bv -> IV0 Var/Const, NumExpr == IV0]. - So even if numerical constraints are not supported in reified context, we can rewrite them to non-reified versions. + So even if numerical constraints are not supported in reified context, we can rewrite them to non-reified versions if they are total. """ if _toplevel is None: _toplevel = [] + # swap the arguments of a comparison while maintaining its semantics flipmap = {"==": "==", "!=": "!=", "<": ">", "<=": ">=", ">": "<", ">=": "<="} newlist = [] # decomposed constraints will go here