MCPcopy Create free account
hub / github.com/dimvasdim/Thesis / __init__

Method __init__

pso.py:17–23  ·  view source on GitHub ↗
(self, position, velocity)

Source from the content-addressed store, hash-verified

15
16class Particle:
17 def __init__(self, position, velocity):
18 self.position = position
19 self.velocity = velocity
20 self.pbest_position = position
21 self.gbest_position = position
22 self.pbest_fitness = 0
23 self.gbest_fitness = 0
24
25 def evaluate(self, obj_function, steady, cost, model):
26 fitness = obj_function(self.position, steady, cost, model)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected