Home / Computer science / Zebra puzzle / Computation
Decision variables
- \(1 \leq h \leq l\) with \(l = 5\) attributes
- \(1 \leq i \leq m\) with \(m = 5\) houses
- \(1 \leq j \leq n\) with \(n = 5\) attribute values
l, m, n = 5, 5, 5
x = {
(h, i, j): model.new_bool_var("x_{%d, %d, %d}" % (h + 1, i + 1, j + 1))
for h in range(l)
for i in range(m)
for j in range(n)
}