Skip to content

Commit

Permalink
Merge pull request #171 from pik-piam/patch
Browse files Browse the repository at this point in the history
convergence documentation
  • Loading branch information
tscheypidi authored Jun 28, 2024
2 parents 6c0be2e + 303c1b2 commit 190e84f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions R/convergence.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
#' @param direction NULL, "up" or "down". NULL means normal convergence in both
#' directions, "up" is only a convergence if origin<aim, "down" means only a
#' convergence if origin>aim
#' @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
Expand Down

0 comments on commit 190e84f

Please sign in to comment.