diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-02-20 22:31:55 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-02-20 22:31:55 +0100 |
commit | df733ceeb044e41922930f89be437e2def92e804 (patch) | |
tree | e85de0047d0b9a55765357c8101d606d95516a9e /R/mkinfit.R | |
parent | bac02db46d5e332f3663f0b137c6bc4da7c73d8d (diff) |
Add termination message to mkinfit, prepare release
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r-- | R/mkinfit.R | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R index 08622f9c..b0df6e8c 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -376,6 +376,9 @@ mkinfit <- function(mkinmod, observed, fit$message)
warning(fit$warning)
}
+ else {
+ if(!quiet) cat("Optimisation by method", method.modFit, "successfully terminated.\n")
+ }
}
if (method.modFit %in% c("Port", "SANN", "Nelder-Mead", "BFGS", "CG", "L-BFGS-B")) {
if (fit$convergence != 0) {
@@ -385,11 +388,16 @@ mkinfit <- function(mkinmod, observed, ifelse(is.null(fit$message), "",
paste0("\nMessage is ", fit$message)))
warning(fit$warning)
+ } else {
+ if(!quiet) cat("Optimisation by method", method.modFit, "successfully terminated.\n")
}
}
# Return number of iterations for SANN method
- if (method.modFit == "SANN") fit$iter = maxit.modFit
+ if (method.modFit == "SANN") {
+ fit$iter = maxit.modFit
+ if(!quiet) cat("Termination of the SANN algorithm does not imply convergence.\n")
+ }
# We need to return some more data for summary and plotting
fit$solution_type <- solution_type
|