Beispiel #1
0
 def __init__(self, solution=None, cec_type="cec2014", bound=(-100, 100), dimensions=(10, 20, 30, 50, 100)):
     BasicFunction.__init__(self, cec_type)
     self.problem_size = len(solution)
     self.dimensions = dimensions
     self.check_dimensions(self.problem_size)
     self.bound = bound
     self.solution = solution
Beispiel #2
0
 def __init__(self, problem_size=None, cec_type="cec2013", f_shift="shift_data", f_matrix="M_D", bound=(-100, 100),
              dimensions=(2, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)):
     BasicFunction.__init__(self, cec_type)
     self.problem_size = problem_size
     self.dimensions = dimensions
     self.check_dimensions(self.problem_size)
     self.bound = bound
     self.f_shift = f_shift + ".txt"
     self.f_matrix = f_matrix + str(self.problem_size) + ".txt"
     self.shift = self.load_matrix_data__(self.f_shift)[:, :problem_size]
     self.matrix = self.load_matrix_data__(self.f_matrix)
Beispiel #3
0
 def __init__(self,
              problem_size=None,
              cec_type="cec2014",
              bound=(-100, 100),
              dimensions=(10, 20, 30, 50, 100)):
     """
     Parameters
     ----------
         problem_size (int): The number of variables in problem
         cec_type (str, optional):
         bound (set, optional):
         dimensions (list, optional):
     """
     BasicFunction.__init__(self, cec_type)
     self.problem_size = problem_size
     self.dimensions = dimensions
     self.check_dimensions(self.problem_size)
     self.bound = bound