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

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

parent d7162e4f
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")),
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
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