Get variables from expressions (cpmpy.transformations.get_variables
)
Returns an list of all variables in the model or expressions
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
expr: Expression or list of expressions
collect: optional set, variables will be added to this set of given
- cpmpy.transformations.get_variables.get_variables_model(model)[source]
Get variables of a model (constraints and objective)
This is a separate function because we can not import Model without a circular dependency…