Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
 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