Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convergence documentation #171

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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