Skip to content

Commit

Permalink
Merge pull request #1728 from orichters/modelsum
Browse files Browse the repository at this point in the history
fix tax convergence reporting in modelSummary
  • Loading branch information
orichters authored Jul 5, 2024
2 parents 4462196 + 4007b97 commit a3244b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/start/modelSummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ modelSummary <- function(folder = ".", gams_runtime = NULL) {
message("No failed markets in fulldata.gdx.")
}
failedtaxes <- quitte::as.quitte(readGDX(file.path(folder, "fulldata.gdx"), "p80_convNashTaxrev_iter"))
failedtaxes <- droplevels(dplyr::filter(failedtaxes, !!rlang::sym("value") == 1))
failedtaxes <- droplevels(dplyr::filter(failedtaxes, as.numeric(!!rlang::sym("iteration")) == max_iter_fd, abs(!!rlang::sym("value")) > 0.001))
if (nrow(failedtaxes) > 0) {
message("Failed tax convergence in fulldata.gdx:")
for (r in levels(failedtaxes$region)) {
rf <- failedtaxes$period[failedtaxes$region == r]
message(" - ", r, ": ", paste0(rf[1:mif(length(rf), 10)], collapse = ", "), if (length(rf) > 10) " ...")
message(" - ", r, ": ", paste0(rf[1:min(length(rf), 10)], collapse = ", "), if (length(rf) > 10) " ...")
}
} else {
message("No failed tax convergence in fulldata.gdx.")
Expand Down

0 comments on commit a3244b3

Please sign in to comment.