'Returns a list of the constants in the problem.'

def constants(self):

    const_dict = {}
    constants_ = self.objective.constants()
    for constr in self.constraints:
        constants_ += constr.constants()
    const_dict = {id(constant): constant for constant in constants_}
    return list(const_dict.values())
