hzambran / hydroPSO

Model-Independent Particle Swarm Optimisation for Environmental Models
https://cran.r-project.org/package=hydroPSO
GNU General Public License v2.0
36 stars 18 forks source link

Error in Xt.fitness[iter, ] : incorrect number of dimensions #21

Closed CPTBTPTP-bit closed 3 years ago

CPTBTPTP-bit commented 4 years ago

out <- hydroPSO(fn="BGCM.basic", lower=lower, upper=upper, method="spso2011", control=list(write2disk=TRUE, MinMax="max", npart=10, maxit=50, normalise=TRUE, REPORT=1, #parallel="parallelWin", reltol=1E-10) )

I write a function, run the model, and compare the results. The whole structure is similar to the example in tutorial for using hydropso to calibrate tuwmodel. However, when 10-npart done.

================================================================================ [ Running PSO ... ]

[1] "Done" [1] "Done" [1] "Done" [1] "Done" [1] "Done" [1] "Done" [1] "Done" [1] "Done" [1] "Done" [1] "Done" Error in Xt.fitness[iter, ] : incorrect number of dimensions

CPTBTPTP-bit commented 4 years ago

I'm sincerely appreciating your help! Thank you very much! Looking forward to your reply!

hzambran commented 3 years ago

Dear CPTBTPTP-bit

Could you confirm that you are using hydroPSO 0.5-1?

CPTBTPTP-bit commented 3 years ago

Dear CPTBTPTP-bit

Could you confirm that you are using hydroPSO 0.5-1?

I changed to the latest version and there is no such problem. Thank you very much.

hzambran commented 3 years ago

thanks !