Example #1
0
 def __init__(self,objfunc,paramspace):
     Individual.__init__(self,objfunc,paramspace)
     self.attractors=[]
     self.attweights=[]
     self.speed=zeros(self.ng,dtype=float)
     self.memory={}  # will contain 'bestx', 'bestval', 'nhbestx', and 'nhbestval
     self.nh=[]      # own neighbourhood
     self.egofade=0.5  # if 1 then don't listen to neighbourhood, if 0 then don't listen to yourself
     self.swarm=None # slot for link to own population
     self.random_influence='ND' # '1D' or 'ND'
Example #2
0
 def __init__(self, dummyfunc, pspace):
     Individual.__init__(self, dummyfunc, pspace)
     self.a = [1.0, 1.5, 2.0]
     self.w = [5.0, 4.8, 4.9]
     self.nt = 101
     self.t = arange(self.nt, dtype=float)
     self.theta = 2 * pi / (self.nt - 1)
     self.trial = zeros(self.nt)
     self.target = zeros(self.nt)
     self.initialize_target()
     self.plotpath = join(getcwd(), "plots")
Example #3
0
 def __init__(self, dummyfunc, pspace):
     Individual.__init__(self, dummyfunc, pspace)
     self.a = [1., 1.5, 2.]
     self.w = [5., 4.8, 4.9]
     self.nt = 101
     self.t = arange(self.nt, dtype=float)
     self.theta = 2 * pi / (self.nt - 1)
     self.trial = zeros(self.nt)
     self.target = zeros(self.nt)
     self.initialize_target()
     self.plotpath = join(getcwd(), 'plots')
Example #4
0
 def __init__(self, objfunc, paramspace):
     Individual.__init__(self, objfunc, paramspace)
     self.attractors = []
     self.attweights = []
     self.speed = zeros(self.ng, dtype=float)
     self.memory = {
     }  # will contain 'bestx', 'bestval', 'nhbestx', and 'nhbestval
     self.nh = []  # own neighbourhood
     self.egofade = 0.5  # if 1 then don't listen to neighbourhood, if 0 then don't listen to yourself
     self.swarm = None  # slot for link to own population
     self.random_influence = 'ND'  # '1D' or 'ND'
Example #5
0
 def __init__(self, dummyfunc, pspace):
     Individual.__init__(self, dummyfunc, pspace)
     self.dots = None
Example #6
0
 def __init__(self, paramspace, ncase):
     Individual.__init__(self, paramspace, ncase)
Example #7
0
 def __init__(self, paramspace, ncase):
     Individual.__init__(self, paramspace, ncase)
     self.weights = ones(
         self.ng) - arange(self.ng, dtype=float) * 0.8 / float(self.ng - 1)
     self.radii = 0.2 * (0.75 * self.weights / pi)**0.333
Example #8
0
 def __init__(self,dummyfunc,pspace):
     Individual.__init__(self,dummyfunc,pspace)
     self.dots=None
Example #9
0
 def __init__(self,paramspace,ncase):
     Individual.__init__(self,paramspace,ncase)
Example #10
0
 def __init__(self,paramspace,ncase):
     Individual.__init__(self,paramspace,ncase)
     self.weights=ones(self.ng)-arange(self.ng,dtype=float)*0.8/float(self.ng-1)
     self.radii=0.2*(0.75*self.weights/pi)**0.333