Commit 1f275390 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.0.13.8 CreateInputsCrit returns an error when epsilon <= 0

Showing with 7 additions and 6 deletions
+7 -6
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.13.7 Version: 1.0.13.8
Date: 2018-08-29 Date: 2018-08-30
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), 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")), person("Charles", "Perrin", role = c("aut", "ths"), comment = c(ORCID = "0000-0001-8552-1881")),
......
...@@ -14,7 +14,7 @@ output: ...@@ -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 #### Deprectated and defunct
...@@ -32,6 +32,8 @@ output: ...@@ -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>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 #### Minor user-visible changes
......
...@@ -89,9 +89,8 @@ CreateInputsCrit <- function(FUN_CRIT, ...@@ -89,9 +89,8 @@ CreateInputsCrit <- function(FUN_CRIT,
} }
if (!is.null(epsilon)) { if (!is.null(epsilon)) {
if (!is.vector(epsilon) | if (!is.vector(epsilon) | length(epsilon) != 1 | !is.numeric(epsilon) | any(epsilon <= 0)) {
length(epsilon) != 1 | !is.numeric(epsilon)) { stop("epsilon must a be single positive value \n")
stop("epsilon must be single numeric value \n")
return(NULL) return(NULL)
} }
epsilon = as.double(epsilon) epsilon = as.double(epsilon)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment