add_modulo_equality not working with python OR-Tools CP-SAT
I’m trying to solve a problem which relies on the sum of the row entries being 0 mod (n). I have tried to write a simplified version, but cannot figure out to use model.AddModuloEquality
. For example, the following code, (adapted from Google’s Suduko example), should give me the array [[10,14][11,13]]. It works. if I add the constraint, should it to 24, but not if I try and make it equal 0 mod 12, when should it be the same answer? First day using ORtools and beign away from Python for a while.
add_modulo_equality not working with python OR-Tools CP-SAT
I’m trying to solve a problem which relies on the sum of the row entries being 0 mod (n). I have tried to write a simplified version, but cannot figure out to use model.AddModuloEquality
. For example, the following code, (adapted from Google’s Suduko example), should give me the array [[10,14][11,13]]. It works. if I add the constraint, should it to 24, but not if I try and make it equal 0 mod 12, when should it be the same answer? First day using ORtools and beign away from Python for a while.
add_modulo_equality not working with python OR-Tools CP-SAT
I’m trying to solve a problem which relies on the sum of the row entries being 0 mod (n). I have tried to write a simplified version, but cannot figure out to use model.AddModuloEquality
. For example, the following code, (adapted from Google’s Suduko example), should give me the array [[10,14][11,13]]. It works. if I add the constraint, should it to 24, but not if I try and make it equal 0 mod 12, when should it be the same answer? First day using ORtools and beign away from Python for a while.