Skip to content

Commit

Permalink
change default names to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout4 committed Jul 12, 2023
1 parent 89c7fab commit 3436559
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpmpy/expressions/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def __init__(self, lb, ub, name=None):
assert is_int(ub), "IntVar upperbound must be integer {} {}".format(type(ub), ub)

if name is None:
name = "IV{}".format(_IntVarImpl.counter)
name = "IVV{}".format(_IntVarImpl.counter)
_IntVarImpl.counter = _IntVarImpl.counter + 1 # static counter

super().__init__(int(lb), int(ub), name=name) # explicit cast: can be numpy
Expand All @@ -307,7 +307,7 @@ def __init__(self, lb=0, ub=1, name=None):
assert(ub == 0 or ub == 1)

if name is None:
name = "BV{}".format(_BoolVarImpl.counter)
name = "BVV{}".format(_BoolVarImpl.counter)
_BoolVarImpl.counter = _BoolVarImpl.counter + 1 # static counter
_IntVarImpl.__init__(self, lb, ub, name=name)

Expand Down

0 comments on commit 3436559

Please sign in to comment.