From 343655957da4e1b0d5a3e78957af212aaf561bc5 Mon Sep 17 00:00:00 2001 From: wout4 Date: Wed, 12 Jul 2023 12:09:11 +0200 Subject: [PATCH] change default names to avoid conflicts --- cpmpy/expressions/variables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpmpy/expressions/variables.py b/cpmpy/expressions/variables.py index 5225cf22d..c390ddcba 100644 --- a/cpmpy/expressions/variables.py +++ b/cpmpy/expressions/variables.py @@ -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 @@ -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)