Pierre Flener, IT Dept, Uppsala University Constraint Technology: Modelling Slide 1 of 29
- 1. Modelling Issues
Modelling is more an art than a science!
Choice of the Right Decision Variables Example: Alphametic problems, using backtracking with constraint propagation:
- For SEND + MORE = MONEY, the model without carry variables is more efficient:
- nly 19 of 23 nodes of the search tree are visited, rather than 23 of 29 nodes.
- For GERALD + DONALD = ROBERT, the model with carry variables is more efficient:
- nly 791 of 869 nodes of the search tree are visited, rather than 13,795 of 16,651 nodes.
Choice of the Right (Combination of) Constraints Example: The allDifferent constraint vs the equivalent conjunction of disequality (≠) constraints:
- For SEND + MORE = MONEY without carry variables, the same domain reduction is achieved.
- The problem 〈allDifferent(x,y,z) ; x, y, z ∈{1,2}〉 is not hyper-arc-consistent,