Skip to content

Commit

Permalink
minor doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
tias committed Feb 8, 2024
1 parent 0afbb86 commit b3e0b56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpmpy/transformations/decompose_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <comp> Var/Const` can be rewritten as [bv -> IV0 <comp> 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
Expand Down

0 comments on commit b3e0b56

Please sign in to comment.