You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed while extending pyswarms for epsilon constrained optimization that the value passed to mean_neighbor_cost in the SwarmOptimizer.ToHistory Tuple (the hist tuple which is then passed to SwarmOptimizer._populate_history method as an argument) is just self.swarm.best_cost. Did I misunderstand the way that this works since swarm.best_cost comes from the topology's implementation of compute_gbest method, or should this be a mean of the neighboring costs not a max/best global cost? I noticed that it is indeed the mean in local_best so I figured that this is either unintentional although the code works or I need to better understand the implementation and how mean_neighbor_cost is used because it makes sense that there would be this kind of difference but I couldn't seem to track down where it is used in the code. I understand that it is then appended to mean_neighbor_history, but I couldn't find any references to this variable that used it. Thank you for your help, I hope to contribute a constrained implementation of the pyswarms library soon based off of Takahama et al 2005 epsilon approach.
It is on line 261 of general_optimizer.py, line 221 on global_best.py, line 249 of local_best.py in pyswarms/single folder.
The text was updated successfully, but these errors were encountered:
I noticed while extending pyswarms for epsilon constrained optimization that the value passed to
mean_neighbor_cost
in the SwarmOptimizer.ToHistory Tuple (the hist tuple which is then passed to SwarmOptimizer._populate_history method as an argument) is just self.swarm.best_cost. Did I misunderstand the way that this works since swarm.best_cost comes from the topology's implementation of compute_gbest method, or should this be a mean of the neighboring costs not a max/best global cost? I noticed that it is indeed the mean in local_best so I figured that this is either unintentional although the code works or I need to better understand the implementation and how mean_neighbor_cost is used because it makes sense that there would be this kind of difference but I couldn't seem to track down where it is used in the code. I understand that it is then appended to mean_neighbor_history, but I couldn't find any references to this variable that used it. Thank you for your help, I hope to contribute a constrained implementation of the pyswarms library soon based off of Takahama et al 2005 epsilon approach.It is on line 261 of general_optimizer.py, line 221 on global_best.py, line 249 of local_best.py in pyswarms/single folder.
The text was updated successfully, but these errors were encountered: