From 37c64a55c1f24c9585e8fead767a53ff259ad978 Mon Sep 17 00:00:00 2001
From: Delaigue Olivier <olivier.delaigue@irstea.priv>
Date: Tue, 28 Aug 2018 14:05:08 +0200
Subject: [PATCH] v1.0.12.0 Calibration_Michel is now faster during the
 grid-screening step #5323

---
 DESCRIPTION            | 4 ++--
 NEWS.rmd               | 7 +++++++
 R/Calibration_Michel.R | 4 +++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 501042c6..cd123566 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.11.1
-Date: 2018-08-09
+Version: 1.0.12.0
+Date: 2018-08-28
 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 a984602f..351ad22b 100644
--- a/NEWS.rmd
+++ b/NEWS.rmd
@@ -14,6 +14,13 @@ output:
 
 
 
+### 1.0.12.0 Release Notes (2018-08-28) 
+
+#### Major user-visible changes
+
+- <code>Calibration_Michel()</code> is now faster during the grid-screening step when a parameter is set using <code>FixedParam</code> in <code>CreateCalibOptions</code>.
+
+
 ### 1.0.11.0 Release Notes (2018-07-18) 
 
 
diff --git a/R/Calibration_Michel.R b/R/Calibration_Michel.R
index f5433f50..691d1134 100644
--- a/R/Calibration_Michel.R
+++ b/R/Calibration_Michel.R
@@ -119,7 +119,9 @@ Calibration_Michel <- function(InputsModel, RunOptions, InputsCrit, CalibOptions
 
     ##Definition_of_the_function_creating_all_possible_parameter_sets_from_different_values_for_each_parameter
     ProposeCandidatesGrid <- function(DistribParam) {
-      Output <- list(NewCandidates = expand.grid(lapply(seq_len(ncol(DistribParamR)), function(x) DistribParam[, x])))
+      NewCandidates <- expand.grid(lapply(seq_len(ncol(DistribParamR)), function(x) DistribParam[, x]))
+      NewCandidates <- unique(NewCandidates) # to avoid duplicates when a parameter is set
+      Output <- list(NewCandidates = NewCandidates)
     }    
 
 
-- 
GitLab