Skip to content

Commit

Permalink
Treat enable_first_step property as disabled in API and disk mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
kemihak committed Nov 29, 2024
1 parent 266e29c commit bb7ba72
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions R/updateAdequacySettings.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ updateAdequacySettings <- function(include_adq_patch = NULL,
if (opts[["antaresVersion"]] < 830) {
stop("This function is only available for studies v8.3 or higher.")
}
api_study <- is_api_study(opts)

new_params <- list(
"include_adq_patch" = include_adq_patch,
Expand All @@ -78,10 +77,11 @@ updateAdequacySettings <- function(include_adq_patch = NULL,
new_params <- new_params[!names(new_params) %in% properties_850]
}

if (opts[["antaresVersion"]] < 860 | (opts[["antaresVersion"]] >= 860 & api_study)) {
# enable_first_step is necessary only for desktop application. Not used in API mode.
properties_860 <- c("enable_first_step")
new_params <- new_params[!names(new_params) %in% properties_860]
if (opts[["antaresVersion"]] >= 860) {
if ("enable_first_step" %in% names(new_params) & new_params[["enable_first_step"]]) {
message("Property enable_first_step is disabled for the moment. Set to FALSE.\n")
new_params[["enable_first_step"]] <- FALSE
}
}

new_params <- lapply(X = new_params, FUN = .format_ini_rhs)
Expand All @@ -93,8 +93,6 @@ updateAdequacySettings <- function(include_adq_patch = NULL,
}




#' @title Read adequacy patch config.yml into Antares (v8.5+)
#'
#' @description
Expand Down

0 comments on commit bb7ba72

Please sign in to comment.