diff --git a/DESCRIPTION b/DESCRIPTION index 4a96bb05c2068f41688339dc2e0c1387e3d647bd..4b22ecb57e4cc000e8476ab3b6b0f0f7c6bc3c9d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.0.13.7 -Date: 2018-08-29 +Version: 1.0.13.8 +Date: 2018-08-30 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Charles", "Perrin", role = c("aut", "ths"), comment = c(ORCID = "0000-0001-8552-1881")), diff --git a/NEWS.rmd b/NEWS.rmd index 617d0fe49ad493147f5801d29e98aab61cbe51cc..0c75d1dd44fb35b423e2c3830b6e469610be6c92 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.0.13.7 Release Notes (2018-08-29) +### 1.0.13.8 Release Notes (2018-08-30) #### Deprectated and defunct @@ -32,6 +32,8 @@ output: - <code>CreateCalibOptions()</code> now returns an error when all the parameters are set and a warning message when all the parameters are not set <code>FixedParam</code> in the <code>FixedParam</code> argument. +- <code>CreateInputsCrit()</code> now returns an error when <code>epsilon</code is not positive. + #### Minor user-visible changes diff --git a/R/CreateInputsCrit.R b/R/CreateInputsCrit.R index 4c2d61c9a5ebf31f0fb5764593f93079b7763162..8a6aa1d157777cf7359e7d1d6653be0556258734 100644 --- a/R/CreateInputsCrit.R +++ b/R/CreateInputsCrit.R @@ -89,9 +89,8 @@ CreateInputsCrit <- function(FUN_CRIT, } if (!is.null(epsilon)) { - if (!is.vector(epsilon) | - length(epsilon) != 1 | !is.numeric(epsilon)) { - stop("epsilon must be single numeric value \n") + if (!is.vector(epsilon) | length(epsilon) != 1 | !is.numeric(epsilon) | any(epsilon <= 0)) { + stop("epsilon must a be single positive value \n") return(NULL) } epsilon = as.double(epsilon)