From 2c87026dc76125d1fcfaa841a61512b199d0c85e Mon Sep 17 00:00:00 2001
From: Olivier Delaigue <olivier.delaigue@irstea.fr>
Date: Thu, 14 Apr 2016 17:07:08 +0200
Subject: [PATCH] Renommage des fonctions avec le suffixe HBAN

---
 R/CreateCalibOptions.R | 59 ++----------------------------------------
 1 file changed, 2 insertions(+), 57 deletions(-)

diff --git a/R/CreateCalibOptions.R b/R/CreateCalibOptions.R
index a06caea6..7142a5a8 100644
--- a/R/CreateCalibOptions.R
+++ b/R/CreateCalibOptions.R
@@ -1,59 +1,4 @@
-#*************************************************************************************************
-#' Creation of the CalibOptions object required to the Calibration functions.
-#'
-#' Users wanting to use FUN_MOD, FUN_CALIB or FUN_TRANSFO functions that are not included in 
-#' the package must create their own CalibOptions object accordingly.
-#*************************************************************************************************
-#' @title  Creation of the CalibOptions object required to the Calibration functions
-#' @author Laurent Coron (June 2014)
-#' @seealso \code{\link{Calibration}}, \code{\link{RunModel}}
-#' @example tests/example_Calibration.R
-#' @encoding UTF-8
-#' @export
-#_FunctionInputs__________________________________________________________________________________
-#' @param  FUN_MOD             [function] hydrological model function (e.g. RunModel_GR4J, RunModel_CemaNeigeGR4J)
-#' @param  FUN_CALIB           (optional) [function] calibration algorithm function (e.g. Calibration_HBAN, Calibration_optim), default=Calibration_HBAN
-#' @param  FUN_TRANSFO         (optional) [function] model parameters transformation function, if the FUN_MOD used is native in the package FUN_TRANSFO is automatically defined
-#' @param  OptimParam          (optional) [boolean] vector of booleans indicating which parameters must be optimised (NParam columns, 1 line) 
-#' @param  FixedParam          (optional) [numeric] vector giving the values to allocate to non-optimised parameter values (NParam columns, 1 line)
-#' @param  SearchRanges        (optional) [numeric] matrix giving the ranges of real parameters (NParam columns, 2 lines)
-#'                             \tabular{llllll}{
-#'                                           \tab [X1]   \tab [X2]   \tab [X3]   \tab [...]   \tab [Xi] \cr
-#'                                  [1,]     \tab    0   \tab   -1   \tab    0   \tab  ...    \tab  0.0 \cr
-#'                                  [2,]     \tab 3000   \tab   +1   \tab  100   \tab  ...    \tab  3.0 \cr
-#'                             }
-#' @param  StartParam          (optional) [numeric] vector of parameter values used to start global search calibration procedure (this argument is used by Calibration_optim but not by Calibration_HBAN)
-#'                             \tabular{llllll}{
-#'                                           \tab [X1]   \tab [X2]   \tab [X3]   \tab [...]   \tab [Xi] \cr
-#'                                           \tab 1000   \tab -0.5   \tab   22   \tab  ...    \tab  1.1 \cr
-#'                             }
-#' @param  StartParamList      (optional) [numeric] matrix of parameter sets used for grid-screening calibration procedure (values in columns, sets in line) (this argument is used by Calibration_HBAN but not by Calibration_optim)
-#'                             \tabular{llllll}{
-#'                                           \tab [X1]   \tab [X2]   \tab [X3]   \tab [...]   \tab [Xi] \cr
-#'                                  [set1]   \tab  800   \tab -0.7   \tab   25   \tab  ...    \tab  1.0 \cr
-#'                                  [set2]   \tab 1000   \tab -0.5   \tab   22   \tab  ...    \tab  1.1 \cr
-#'                                  [...]    \tab  ...   \tab  ...   \tab  ...   \tab  ...    \tab  ... \cr
-#'                                  [set n]  \tab  200   \tab -0.3   \tab   17   \tab  ...    \tab  1.0 \cr
-#'                             }
-#' @param  StartParamDistrib   (optional) [numeric] matrix of parameter values used for grid-screening calibration procedure (values in columns, percentiles in line) \cr
-#'                             \tabular{llllll}{
-#'                                           \tab [X1]   \tab [X2]   \tab [X3]   \tab [...]   \tab [Xi] \cr
-#'                                  [value1] \tab  800   \tab -0.7   \tab   25   \tab  ...    \tab  1.0 \cr
-#'                                  [value2] \tab 1000   \tab   NA   \tab   50   \tab  ...    \tab  1.2 \cr
-#'                                  [value3] \tab 1200   \tab   NA   \tab   NA   \tab  ...    \tab  1.6 \cr
-#'                             }
-#_FunctionOutputs_________________________________________________________________________________
-#' @return  [list] object of class \emph{CalibOptions} containing the data required to evaluate the model outputs; it can include the following:
-#'          \tabular{ll}{
-#'          \emph{$OptimParam       }  \tab   [boolean] vector of booleans indicating which parameters must be optimised \cr
-#'          \emph{$FixedParam       }  \tab   [numeric] vector giving the values to allocate to non-optimised parameter values \cr
-#'          \emph{$SearchRanges     }  \tab   [numeric] matrix giving the ranges of real parameters \cr
-#'          \emph{$StartParam       }  \tab   [numeric] vector of parameter values used to start global search calibration procedure \cr
-#'          \emph{$StartParamList   }  \tab   [numeric] matrix of parameter sets used for grid-screening calibration procedure \cr
-#'          \emph{$StartParamDistrib}  \tab   [numeric] matrix of parameter values used for grid-screening calibration procedure \cr
-#'          }
-#**************************************************************************************************
-CreateCalibOptions <- function(FUN_MOD,FUN_CALIB=Calibration_HBAN,FUN_TRANSFO=NULL,OptimParam=NULL,FixedParam=NULL,SearchRanges=NULL,
+CreateCalibOptions <- function(FUN_MOD,FUN_CALIB=Calibration_Michel,FUN_TRANSFO=NULL,OptimParam=NULL,FixedParam=NULL,SearchRanges=NULL,
                                StartParam=NULL,StartParamList=NULL,StartParamDistrib=NULL){
 
 
@@ -75,7 +20,7 @@ CreateCalibOptions <- function(FUN_MOD,FUN_CALIB=Calibration_HBAN,FUN_TRANSFO=NU
 
   ##check_FUN_CALIB
     BOOL <- FALSE;
-    if(identical(FUN_CALIB,Calibration_HBAN  )){ ObjectClass <- c(ObjectClass,"HBAN"  ); BOOL <- TRUE; }
+    if(identical(FUN_CALIB,Calibration_Michel)){ ObjectClass <- c(ObjectClass,"HBAN"  ); BOOL <- TRUE; }
     if(identical(FUN_CALIB,Calibration_optim )){ ObjectClass <- c(ObjectClass,"optim" ); BOOL <- TRUE; }
     if(!BOOL){ stop("incorrect FUN_CALIB for use in CreateCalibOptions \n"); return(NULL); } 
 
-- 
GitLab