Skip to content
Snippets Groups Projects
Commit 42e5bd09 authored by Mauricio Zambrano-Bigiarini's avatar Mauricio Zambrano-Bigiarini
Browse files

changed 'reltol' stopping criterion: 'abs(reltol) <= abs(best.pbest[iter] - best.pbest[iter-1])'

parent 14cd5f8a
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ Package: hydroPSO ...@@ -2,7 +2,7 @@ Package: hydroPSO
Type: Package Type: Package
Title: Model-Independent Particle Swarm Optimisation for Environmental Models Title: Model-Independent Particle Swarm Optimisation for Environmental Models
Version: 0.1-56 Version: 0.1-56
Date: 2012-06-13 Date: 2012-06-14
Author: Mauricio Zambrano-Bigiarini [aut, cre] and Rodrigo Rojas [ctb] Author: Mauricio Zambrano-Bigiarini [aut, cre] and Rodrigo Rojas [ctb]
Author@R: c(person("Mauricio", "Zambrano-Bigiarini", email = "mzb.devel@gmail.com", role=c("aut", "cre") ), person("Rodrigo", "Rojas", email = "Rodrigo.RojasMujica@gmail.com", role=c("ctb") ) ) Author@R: c(person("Mauricio", "Zambrano-Bigiarini", email = "mzb.devel@gmail.com", role=c("aut", "cre") ), person("Rodrigo", "Rojas", email = "Rodrigo.RojasMujica@gmail.com", role=c("ctb") ) )
Maintainer: Mauricio Zambrano-Bigiarini <mzb.devel@gmail.com> Maintainer: Mauricio Zambrano-Bigiarini <mzb.devel@gmail.com>
...@@ -10,7 +10,7 @@ Description: This package implements a state-of-the-art version of the Particle ...@@ -10,7 +10,7 @@ Description: This package implements a state-of-the-art version of the Particle
License: GPL (>=2) License: GPL (>=2)
Depends: R (>= 2.10.0) Depends: R (>= 2.10.0)
Imports: Hmisc, sp, lattice, grid Imports: Hmisc, sp, lattice, grid
Suggests: hydroGOF, hydroTSM, lhs, zoo, multicore, scatterplot3d, vioplot Suggests: hydroGOF(>= 0.3-3), hydroTSM(>= 0.3-0), 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 URL: http://www.rforge.net/hydroPSO, http://cran.r-project.org/web/packages/hydroPSO
Classification: optimisation, optimization, calibration, environment, environmental sciences, hydrology, PSO Classification: optimisation, optimization, calibration, environment, environmental sciences, hydrology, PSO
LazyLoad: yes LazyLoad: yes
......
NEWS/ChangeLog for hydroPSO NEWS/ChangeLog for hydroPSO
-------------------------- --------------------------
0.1-56 14-Jun-2012
0.1-56 13-Jun-2012
o 'hydroPSO' : -) much less memory consumption for large values of 'maxit' and/or 'npart'. o 'hydroPSO' : -) much less memory consumption for large values of 'maxit' and/or 'npart'.
The files 'BestParamPerIter.txt', 'PbestPerIter.txt', 'LocalBestPerIter.txt', 'Velocities.txt' are now written at the end of The files 'BestParamPerIter.txt', 'PbestPerIter.txt', 'LocalBestPerIter.txt', 'Velocities.txt' are now written at the end of
each iteration, and not at the end of the main algorithm (so the corresponding local variables were removed) each iteration, and not at the end of the main algorithm (so the corresponding local variables were removed)
-) the convergence of the algorithm controlled by 'reltol' is now defined by : reltol <= normalised swarm radius, -) the convergence of the algorithm controlled by 'reltol' is now defined by : abs(reltol) <= abs(best.pbest[iter] - best.pbest[iter-1]),
instead of reltol <= [ gbest(iter) / ( gbest(iter-1) +reltol ) ] instead of reltol <= [ gbest(iter) / ( gbest(iter-1) +reltol ) ]
-) 'PbestPerIter.txt' output file: now it has an additional first column labelled "Iter", with the iteration number -) 'PbestPerIter.txt' output file: now it has an additional first column labelled "Iter", with the iteration number
-) 'LocalBestPartPerIter.txt' output file: now it has an additional first column labelled "Iter", with the iteration number -) 'LocalBestPartPerIter.txt' output file: now it has an additional first column labelled "Iter", with the iteration number
...@@ -15,7 +14,9 @@ NEWS/ChangeLog for hydroPSO ...@@ -15,7 +14,9 @@ NEWS/ChangeLog for hydroPSO
(just after the new 'Iter' column) (just after the new 'Iter' column)
-) minor change: 'gbest.fit.prior' is now initialized in 'gbest.fit' instead of 'gbest.fit + 10*reltol' -) minor change: 'gbest.fit.prior' is now initialized in 'gbest.fit' instead of 'gbest.fit + 10*reltol'
o 'plot_results': -) 'drty.out' is now checked for existence before reading the results. o 'plot_results': -) 'drty.out' is now checked for existence before reading the results.
o Specific version numbers were added for the following suggested packages:
hydroGOF(>=0.3-3), hydroTSM(>= 0.3-0), zoo(>=1.7-2), xts(>=0.8-2)
0.1-55 11-May-2012 0.1-55 11-May-2012
o 'hydromod' : -) 'sim' and 'obs' are now checked for time attributes when 'gof.Ini' and/or 'gof.Fin' is/are used o 'hydromod' : -) 'sim' and 'obs' are now checked for time attributes when 'gof.Ini' and/or 'gof.Fin' is/are used
......
...@@ -1104,7 +1104,7 @@ Random.Topology.Generation <- function(npart, K, ...@@ -1104,7 +1104,7 @@ Random.Topology.Generation <- function(npart, K,
# Updates: Dec-2010 # # Updates: Dec-2010 #
# May-2011 ; 28-Oct-2011 ; 14-Nov-2011 ; 23-Nov-2011 ; # # May-2011 ; 28-Oct-2011 ; 14-Nov-2011 ; 23-Nov-2011 ; #
# 15-Jan-2012 ; 23-Jan-2012 ; 30-Jan-2012 ; 23-Feb-2012 ; 23-Mar-2012 # # 15-Jan-2012 ; 23-Jan-2012 ; 30-Jan-2012 ; 23-Feb-2012 ; 23-Mar-2012 #
# 13-Jun-2012 # # 14-Jun-2012 #
################################################################################ ################################################################################
# 'lower' : minimum possible value for each parameter # 'lower' : minimum possible value for each parameter
# 'upper' : maximum possible value for each parameter # 'upper' : maximum possible value for each parameter
...@@ -2126,10 +2126,10 @@ hydroPSO <- function( ...@@ -2126,10 +2126,10 @@ hydroPSO <- function(
x.best= X.best.part x.best= X.best.part
) )
pbest.fit <- tmp[["pbest"]] pbest.fit <- tmp[["pbest"]]
X.best.part <- tmp[["x.best"]] X.best.part <- tmp[["x.best"]]
gbest.fit <- tmp[["gbest.fit"]] gbest.fit <- tmp[["gbest.fit"]]
gbest.pos <- tmp[["gbest.pos"]] gbest.pos <- tmp[["gbest.pos"]]
} # IF end } # IF end
...@@ -2388,7 +2388,12 @@ hydroPSO <- function( ...@@ -2388,7 +2388,12 @@ hydroPSO <- function(
ifelse(MinMax=="max", abstol.conv <- gbest.fit >= abstol, ifelse(MinMax=="max", abstol.conv <- gbest.fit >= abstol,
abstol.conv <- gbest.fit <= abstol ) abstol.conv <- gbest.fit <= abstol )
reltol.conv <- ( NormSwarmRadius <= reltol ) if (reltol==0) {
reltol.conv <- FALSE
} else {
tmp <- abs(pbest.fit.iter.prior - pbest.fit.iter)
ifelse(tmp==0, reltol.conv <- FALSE, reltol.conv <- tmp <= abs(reltol) )
} # ELSE end
pbest.fit.iter.prior <- pbest.fit.iter pbest.fit.iter.prior <- pbest.fit.iter
......
...@@ -23,11 +23,11 @@ The default control arguments in hydroPSO implements the Standard PSO 2007 - SPS ...@@ -23,11 +23,11 @@ The default control arguments in hydroPSO implements the Standard PSO 2007 - SPS
\tabular{ll}{ \tabular{ll}{
Package: \tab hydroPSO\cr Package: \tab hydroPSO\cr
Type: \tab Package\cr Type: \tab Package\cr
Version: \tab 0.1-55\cr Version: \tab 0.1-56\cr
Date: \tab 2012-05-11\cr Date: \tab 2012-06-14\cr
License: \tab GPL (>=2)\cr License: \tab GPL (>=2)\cr
LazyLoad: \tab yes\cr LazyLoad: \tab yes\cr
Packaged: \tab Fri May 11 13:57:44 CEST 2012; MZB \cr Packaged: \tab Thu Jun 14 09:43:49 CEST 2012; MZB \cr
BuiltUnder: \tab R version 2.15.0 (2012-03-30); x86_64-redhat-linux-gnu (64-bit) \cr BuiltUnder: \tab R version 2.15.0 (2012-03-30); x86_64-redhat-linux-gnu (64-bit) \cr
} }
%%~~ An overview of how to use the package, including the most important functions ~~ %%~~ An overview of how to use the package, including the most important functions ~~
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment