def add_custom_constraint(constr, constraint, ll):
    """Adds a custom range constraint


		constraint shall be on the format (name, minimum, maximum)"""
    name, minimum, maximum = constraint
    m = [minimum, maximum]
    for i in range(2):
        if type(m[i]) == str:
            if not ll is None:
                m[i] = eval(m[i], globals(), ll.__dict__)
            else:
                return
    [minimum, maximum] = m
    constr.add_named(name, None, 'user constraint', [minimum, maximum])
