Dears, I need your help on that CP-SAT implementation. Here a simplified version of what I'm doing: assume that I have 3 boolean decision variables: x1, x2, x3 and boolean coefficents a1 a2 a3
model.Add(num == a1*x1+a2*x2+a3*x3)
model.Add(denom == x1+x2+x3)
model.Add(denom > 0)
model.AddDivisionEquality(division, num, denom)
model.Minimize(division)
When I solve it I receive MODEL_INVALID The divisor cannot span across zero in constraint: int_div { target { vars: 1004 coeffs: 1 } exprs { vars: 1002 coeffs: 1 } exprs { vars: 1003 coeffs: 1 } }
Seems the denominator is getting zero value temporary during the search. Is there a way to avoid this? Thanks!