From 303c1b28ffc630cef282c1f661db637c2bee6683 Mon Sep 17 00:00:00 2001 From: Pascal Sauer <156898545+pascal-sauer@users.noreply.github.com> Date: Thu, 16 May 2024 11:54:11 +0200 Subject: [PATCH] convergence documentation --- R/convergence.R | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/R/convergence.R b/R/convergence.R index 7f8817c0..ac2b631f 100644 --- a/R/convergence.R +++ b/R/convergence.R @@ -14,15 +14,16 @@ #' @param direction NULL, "up" or "down". NULL means normal convergence in both #' directions, "up" is only a convergence if originaim -#' @param type "smooth", "s", "linear" or "decay". Describes the type of -#' convergence: linear means a linear conversion , s is an s-curve which starts -#' from origin in start_year and reaches aim precisely in end_year. After 50 -#' percent of the convergence time, it reaches about the middle of the two -#' values. Its based on the function min(1, pos^4/(0.07+pos^4)*1.07) smooth is -#' a conversion based on the function x^3/(0.1+x^3). In the latter case only -#' 90\% of convergence will be reached in the end year, because full -#' convergence is reached in infinity. decay is a conversion based on the -#' function x/(1.5 + x)*2.5. +#' @param type "smooth", "s", "linear" or "decay". Describes the function used +#' for convergence (x starts at 0 and ends at 1): +#' "linear" means linear interpolation. +#' "s" is an s-curve which starts from origin in start_year and reaches aim +#' precisely in end_year. After 50\% of the convergence time, it reaches about +#' the middle of the two values. It's using the function x^4/(0.07+x^4)*1.07). +#' "smooth" is a conversion based on the function x^3/(0.1+x^3). With "smooth" +#' only 90\% of convergence will be reached in the end year, full +#' convergence is approached as x approaches infinity. +#' "decay" is a conversion based on the function x / (par + x) * (par + 1). #' @param par parameter value for convergence function; currently only used for #' type="decay" #' @return returns a time-series with the same timesteps as origin, which