Get variables from expressions (cpmpy.transformations.get_variables)
Getting and printing variables in the model or expression.
Variables are ordered by appearance, e.g. first encountered first.
- cpmpy.transformations.get_variables.get_variables(expr, collect=None)[source]
Get variables of an expression
- Parameters:
expr – Expression or list of expressions
collect – optional set, variables will be added to this set of given