diff --git a/DESCRIPTION b/DESCRIPTION index 969e8f1d909e51c6f30553a56150eb93d90610d1..b9ee9f8d7d09fb75dd833f2a0f400f5ab0e95beb 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,7 +7,7 @@ Authors@R: c(person("Mauricio", "Zambrano-Bigiarini", email="mzb.devel@gmail.com Maintainer: Mauricio Zambrano-Bigiarini <mzb.devel@gmail.com> Description: This package implements a state-of-the-art version of the Particle Swarm Optimisation (PSO) algorithm (SPSO-2011 and SPSO-2007 capable), with a special focus on the calibration of environmental models. hydroPSO is model-independent, allowing the user to easily interface any model code with the calibration engine (PSO). It includes a series of controlling options and PSO variants to fine-tune the performance of the calibration engine to different calibration problems. An advanced sensitivity analysis function together with user-friendly plotting summaries facilitate the interpretation and assessment of the calibration results. Bugs reports/comments/questions are very welcomed. License: GPL (>=2) -Depends: R (>= 2.10.0) +Depends: R (>= 2.13.0) Imports: Hmisc, sp, lattice, zoo, grid Suggests: hydroGOF(>= 0.3-5), hydroTSM(>= 0.3-6), zoo(>= 1.7-2), xts(>= 0.8-2), lhs, scatterplot3d, vioplot, multicore URL: http://www.rforge.net/hydroPSO, http://cran.r-project.org/web/packages/hydroPSO diff --git a/NEWS b/NEWS index d4d216d09b7bd3c9170a5bd76948b50eb0cb6d64..5e130866e62ffa83f7ffe63dc01abd9afb56131d 100755 --- a/NEWS +++ b/NEWS @@ -9,7 +9,7 @@ NEWS/ChangeLog for hydroPSO * optional normalisation of parameter values -) improved performance: ~ 33% faster for 32-bit machines and 38% faster for 64-bit machines. - Tested on 10-, 20- and 30-D benchmark functions with 'write2disk=FALSE'. + Tested on 10-, 20- and 30-D benchmark functions with 'write2disk=FALSE'. -) 'fn' argument now can be any R function or a character. In the latter case, it can be "hydromod" or the name of a valid R function. In previous versions of 'hydroPSO' only a character type was accepted. -) now it handles models with sub-daily time step and with sub-daily observations (thanks to O. Rakovec !). @@ -54,6 +54,8 @@ NEWS/ChangeLog for hydroPSO -) when the control argument 'out.with.fit.iter' (not used so far) is set to TRUE, the number of iterations returned correspond to the effective number of iterations carried out, not the maximum defined by 'maxit' -) now it is able to correctly write the observed values for sub-daily models + -) the package now depends on R >= 2.13.0, not 2.10.0 as in previous releases, in order to be consistent with the + byte-compiler setting of the package -) fixed some (very unlikely) error when 'IW.type="aiwf"' diff --git a/R/PSO_v2012.R b/R/PSO_v2012.R index 7514704c2c959e4dabdc08edda71cc41967d7038..a0083519a17f38845a36ee16236d4669a5a467c0 100755 --- a/R/PSO_v2012.R +++ b/R/PSO_v2012.R @@ -1159,6 +1159,11 @@ RegroupingSwarm <- function(x, # Making sure that the new range for each dimension is no larger than the original one Lnew <- pmin(Lmax, Lnew) + + message("Lmax:") + print(Lmax) + message("Lnew:") + print(Lnew) # Re-initializing particle's positions around gbest for (part in 1:npart) { @@ -1175,6 +1180,7 @@ RegroupingSwarm <- function(x, xmax <- gbest + 0.5*Lnew xMinMax <- cbind(xmin, xmax) + #x <- InitializateX(npart=npart, x.MinMax=x.Range, x.ini.type=xini.type) v <- InitializateV(npart=npart, x.MinMax=x.Range, v.ini.type=vini.type, Xini=x) #v <- InitializateV(npart=npart, x.MinMax=xMinMax, v.ini.type=vini.type, Xini=x)