Dears, I'm using CP-SAT in python.
I have two variables:
pippo = model.NewIntVar(-93372036854775808,9123372036854775807, 'pippo')
test = model.NewIntVar(-93372036854775808,9123372036854775807, 'test')
and the following decision variables:
for r in self.all_records:
memory = {}
for p in self.all_decisions:
# create bool decision variables
memory[p] = model.NewBoolVar('c' + str(r) + self.scenario.decisions[p].name)
self.decision_var[r] = memory
I have two constraints:
1) test==sum(self.scenario.dataset['is_fraud'][r]*self.decision_var[r][0] for r in self.all_records)
2) pippo == test
If I remove constraint 2) everything is ok, but with constraint 2 I get this error:
Possible integer overflow in constraint: linear {
vars: 126660
vars: 126661
coeffs: -1
coeffs: 1
domain: 0
domain: 0
}
and Status is MODEL_INVALID.
I really do not understand why. Could you help me please?
question from:
https://stackoverflow.com/questions/65887660/possible-integer-overflow-in-constraint-linear 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…