or-toolscp-sat

What Happens if two variables have the same name?


By mistake, while defining a CP-SAT model, I've created two variables with the same name:

variable1 = model.NewIntVar(0, cp_model.INT32_MAX, "cool_name")
variable2 = model.NewIntVar(0, cp_model.INT32_MAX, "cool_name")

No error or warning is generated. Does it have any consequence at all?


Solution

  • nothing. We do not use names at all in the solver.