Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan committed Jan 8, 2024
1 parent fcf2019 commit 63ad773
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion algorithm/Cso.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def optimum(self, localVal, chromosome):


def updatePosition1(self, population):
current_position = self._current_position[:]
current_position = np.copy(self._current_position)
populationSize = self._populationSize
u, v = np.random.randn(populationSize) * self._σu, np.random.randn(populationSize) * self._σv
S = u / (np.abs(v) ** (1 / self._beta))
Expand Down
2 changes: 1 addition & 1 deletion algorithm/GaQpso.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def gaussian(x, sigma):

def updatePosition(self, population):
mBest = np.zeros(self._chromlen, dtype=float)
current_position = self._current_position[:]
current_position = np.copy(self._current_position)
populationSize = self._populationSize

for i in range(populationSize):
Expand Down

0 comments on commit 63ad773

Please sign in to comment.