Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hydroPSO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Senoner Samuel
hydroPSO
Commits
42e5bd09
Commit
42e5bd09
authored
12 years ago
by
Mauricio Zambrano-Bigiarini
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
DESCRIPTION
+2
-2
2 additions, 2 deletions
DESCRIPTION
NEWS
+5
-4
5 additions, 4 deletions
NEWS
R/PSO_v2012.R
+11
-6
11 additions, 6 deletions
R/PSO_v2012.R
man/hydroPSO-package.Rd
+3
-3
3 additions, 3 deletions
man/hydroPSO-package.Rd
with
21 additions
and
15 deletions
DESCRIPTION
+
2
−
2
View file @
42e5bd09
...
@@ -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-1
3
Date: 2012-06-1
4
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
...
...
This diff is collapsed.
Click to expand it.
NEWS
+
5
−
4
View file @
42e5bd09
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
...
...
This diff is collapsed.
Click to expand it.
R/PSO_v2012.R
+
11
−
6
View file @
42e5bd09
...
@@ -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 #
# 1
3
-Jun-2012 #
# 1
4
-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
...
...
This diff is collapsed.
Click to expand it.
man/hydroPSO-package.Rd
+
3
−
3
View file @
42e5bd09
...
@@ -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-5
5
\cr
Version: \tab 0.1-5
6
\cr
Date: \tab 2012-0
5
-1
1
\cr
Date: \tab 2012-0
6
-1
4
\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 ~~
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment