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

params2ecdf.R:removed some un-necessary 'paste' commands

parent eeb6be60
No related branches found
No related tags found
No related merge requests found
...@@ -100,12 +100,15 @@ NEWS/ChangeLog for hydroPSO ...@@ -100,12 +100,15 @@ NEWS/ChangeLog for hydroPSO
o 'plot_particles' : -) new argument 'do.pairs' (by default 'do.pairs=FALSE'), to control if the correlation matrix among parameters has to be plotted or not o 'plot_particles' : -) new argument 'do.pairs' (by default 'do.pairs=FALSE'), to control if the correlation matrix among parameters has to be plotted or not
(up to hydroPSO <=0.1.58 it was always plotted) (up to hydroPSO <=0.1.58 it was always plotted)
-) arguments 'MinMax' and 'beh.thr' are now passed to 'plot_NparOF'
o 'plot_results' : -) new argument 'do.pairs' (by default 'do.pairs=FALSE'), to control if the correlation matrix among parameters has to be plotted or not o 'plot_results' : -) new argument 'do.pairs' (by default 'do.pairs=FALSE'), to control if the correlation matrix among parameters has to be plotted or not
(up to hydroPSO <=0.1.58 it was always plotted) (up to hydroPSO <=0.1.58 it was always plotted)
o 'plot_out' : -) argument 'MinMax' is not required any more! o 'plot_out' : -) argument 'MinMax' is not required any more!
-) argument 'sim' may also be 'integer' (before it had to be 'numeric', which does not allow 'integer' objects !) -) argument 'sim' may also be 'integer' (before it had to be 'numeric', which does not allow 'integer' objects !)
o 'plot_NparOF' : -) new argument 'beh.thr' to allow selecting only behavioral parameter sets
o new function 'pest2hydroPSO' for importing PEST input files into hydroPSO o new function 'pest2hydroPSO' for importing PEST input files into hydroPSO
o new function 'hydroPSO2pest' for exporting hydroPSO input files to PEST o new function 'hydroPSO2pest' for exporting hydroPSO input files to PEST
......
...@@ -68,12 +68,12 @@ params2ecdf.default <- function(params, ...@@ -68,12 +68,12 @@ params2ecdf.default <- function(params,
# Checking 'param.names' # Checking 'param.names'
if (length(param.names) != nparam) if (length(param.names) != nparam)
stop(paste("Invalid argument: 'length(param.names) = ", length(param.names), " != ", nparam, " = nparam'", sep="")) stop("Invalid argument: 'length(param.names) = ", length(param.names), " != ", nparam, " = nparam'")
# checking that the user provided 1 weight for each behavioural parameter set # checking that the user provided 1 weight for each behavioural parameter set
if ( !is.null(weights) ) { if ( !is.null(weights) ) {
if (length(weights) != NROW(params) ) if (length(weights) != NROW(params) )
stop( paste("Invalid argument: 'length(w) != nrow(params)' (", length(weights), "!=", nrow(params), ")", sep="") ) stop("Invalid argument: 'length(w) != nrow(params)' (", length(weights), "!=", nrow(params), ")" )
} # IF end } # IF end
# creating the final output, a list with the ECDFs # creating the final output, a list with the ECDFs
...@@ -143,12 +143,12 @@ params2ecdf.default <- function(params, ...@@ -143,12 +143,12 @@ params2ecdf.default <- function(params,
char2 <- "ECDF" char2 <- "ECDF"
} # ELSE end } # ELSE end
if (verbose) message( paste("[ Computing the ", char1, " for '", if (verbose) message("[ Computing the ", char1, " for '",
format(param.names[p], width=ncharmax), format(param.names[p], width=ncharmax),
"' , ", p, "/", nparam.bak, " => ", "' , ", p, "/", nparam.bak, " => ",
format(round(100*i/nparam.bak, 2), width=5, format(round(100*i/nparam.bak, 2), width=5,
nsmall=2, justify="left"), nsmall=2, justify="left"),
"% ]", sep= "") ) "% ]" )
# Weighted ECDF for the "i-th" desired quantile, where the unweighted # Weighted ECDF for the "i-th" desired quantile, where the unweighted
# 'i-th' quantile of each behavioural parameter set is now weighted by the # 'i-th' quantile of each behavioural parameter set is now weighted by the
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# 'plot_particles' # # 'plot_particles' #
# Author : Mauricio Zambrano-Bigiarini & Rodrigo Rojas # # Author : Mauricio Zambrano-Bigiarini & Rodrigo Rojas #
# Started: 08-Nov-2011, # # Started: 08-Nov-2011, #
# Updates: 02-Feb-2012 ; 17-Feb-2012 ; 09-Mar-2012 ; 12-Nov-2012 # # Updates: 02-Feb-2012 ; 17-Feb-2012 ; 09-Mar-2012 ; 12-Nov-2012 ; 19-Nov-2012 #
################################################################################ ################################################################################
# This function plots the contents of the 'Particles.txt' ouput file of # # This function plots the contents of the 'Particles.txt' ouput file of #
# hydroPSO, with the position and fitness value of all the particles in the # # hydroPSO, with the position and fitness value of all the particles in the #
...@@ -350,13 +350,16 @@ plot_particles <- function(##################################################### ...@@ -350,13 +350,16 @@ plot_particles <- function(#####################################################
params=params, params=params,
gofs=gofs, gofs=gofs,
param.names=dp3D.names, param.names=dp3D.names,
MinMax=MinMax,
beh.thr=beh.thr,
nrows=nrows, nrows=nrows,
gof.name=gof.name, gof.name=gof.name,
main=main, main=main,
GOFcuts=GOFcuts, GOFcuts=GOFcuts,
colorRamp= colorRamp, colorRamp= colorRamp,
points.cex=points.cex,
alpha=alpha, alpha=alpha,
points.cex=points.cex, #axis.rot=axis.rot,
verbose=FALSE verbose=FALSE
) )
if (do.png) dev.off() if (do.png) dev.off()
......
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