def __init__(self, **kwargs): pm.OptimizationProblem.__init__(self, **kwargs) self.ub = array([5.12, 5.12]) self.lb = -1 * self.ub self.minimize = True self.visualiser = pm.TwoDFunVisualiser(fun=self.costfun, lb=self.lb, ub=self.ub, step=(self.ub - self.lb) / 100.0) self.__dict__.update(**kwargs)
def __init__(self, **kwargs): pm.OptimizationProblem.__init__(self) # inherit self.ub = array([30, 30]) # #defaults self.lb = array([-15, -15]) self.name = 'Ackley' self.minimize = True self.visualiser = pm.TwoDFunVisualiser(fun=self.costfun, lb=self.lb, ub=self.ub, step=(self.ub - self.lb) / 100.0) self.__dict__.update(**kwargs) # #overwrite
def __init__(self, **kwargs): pm.OptimizationProblem.__init__(self) # inherit self.ub = array([2.048, 2.048]) # #defaults self.lb = -1 * self.ub self.name = 'Rosenbrock' self.minimize = True self.visualiser = pm.TwoDFunVisualiser(fun=self.costfun, lb=self.lb, ub=self.ub, step=(self.ub - self.lb) / 100.0) self.__dict__.update(**kwargs) # #overwrite
def __init__(self, **kwargs): pm.OptimizationProblem.__init__(self) # inherit self.ub = array([511.97, 511.97]) # #defaults self.lb = -1 * array([512.03, 512.03]) self.name = 'Schwefel' self.minimize = True self.visualiser = pm.TwoDFunVisualiser(fun=self.costfun, lb=self.lb, ub=self.ub, step=(self.ub - self.lb) / 100.0) self.__dict__.update(**kwargs) # #overwrite
def __init__(self, **kwargs): pm.OptimizationProblem.__init__(self) # inherit self.ub = array([5.12, 5.12]) # #defaults self.lb = -1 * self.ub self.name = 'Rastrigin' self.optimum = 0.0 self.optimumsol = np.zeros_like(self.ub) self.visualiser = pm.TwoDFunVisualiser(fun=self.cost, lb=self.lb, ub=self.ub, step=(self.ub - self.lb) / 100.0) self.__dict__.update(**kwargs) # #overwrite self.minimize = True