Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute_Pbest - compute gbest weird behavior #501

Open
K1one44 opened this issue Sep 6, 2022 · 0 comments
Open

compute_Pbest - compute gbest weird behavior #501

K1one44 opened this issue Sep 6, 2022 · 0 comments

Comments

@K1one44
Copy link

K1one44 commented Sep 6, 2022

Hello,
thanks for that job.
i encounter an issue in usage:
I prepare my own optimization loops and an issu eoccurs in gbest computing the output value is not the minimum value.

i modify and try directly using GlobalBestPSO or GeneralOptimizerPSO and both return me that error at the end of first iterations run :
"mask_cost = swarm.current_cost < swarm.pbest_cost
TypeError: '>' not supported between instances of 'float' and 'NoneType' "

resulting code stop i guess it look like at first run the swarm.pbest_cost not been initialize

i am on
Win 10
Python 3.9.6
Pywswarms 1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant