Hi @aliasgharheidaricom , thank you for sharing the code for FATA.
While studying the implementation, I noticed a potential issue in the particle reset mechanism (Line [89] in FATA.m).
The Issue:
The current code uses:
Flight(i,:) = (ub-lb).*rand+lb;
In MATLAB, rand returns a scalar. This causes the same random value to be broadcasted to all dimensions of Flight(i,:). As a result, the particle updates identically across all dimensions (moving diagonally), which severely restricts the exploration capability of the algorithm.
We can observe it from a two-dimensional perspective
snap1 (x=y)
Suggested Fix:
It should likely generate a random vector matching the dimension size:
Flight(i,:) = (ub-lb).*rand(1,dim)+lb;
snap2 (random)
Verification:
I tested both versions. The original code generates correlated coordinates, while the fixed version ensures independent randomization for each dimension.
Thanks again for your great work!
Hi @aliasgharheidaricom , thank you for sharing the code for FATA.
While studying the implementation, I noticed a potential issue in the particle reset mechanism (Line [89] in
FATA.m).The Issue:
The current code uses:
In MATLAB,
randreturns a scalar. This causes the same random value to be broadcasted to all dimensions ofFlight(i,:). As a result, the particle updates identically across all dimensions (moving diagonally), which severely restricts the exploration capability of the algorithm.We can observe it from a two-dimensional perspective
snap1 (x=y)
Suggested Fix:
It should likely generate a random vector matching the dimension size:
snap2 (random)
Verification:
I tested both versions. The original code generates correlated coordinates, while the fixed version ensures independent randomization for each dimension.
Thanks again for your great work!