def opt(self, objective, parameter): """ The optimization procedure. :param objective: an Objective object :param parameter: a Parameter object :return: the best solution """ self.clear() if parameter.get_noise_handling() is True and parameter.get_ponss( ) is True: self.__algorithm = PONSS() else: self.__algorithm = ParetoOpt() self.__best_solution = self.__algorithm.opt(objective, parameter) return self.__best_solution
def __init__(self): ParetoOpt.__init__(self) pass
def test_mutation(self): a = [0, 1, 0, 1] n = 4 res = ParetoOpt.mutation(a, n) assert res != a