From 986f0c79dfa5e6606d91f712eacfdc8c3d9299a7 Mon Sep 17 00:00:00 2001 From: MANSOURI Assil Ext Date: Fri, 31 Mar 2023 18:00:18 +0200 Subject: [PATCH] fix writeEconomicOptions API + hydro doc --- R/writeEconomicOptions.R | 4 ++-- man/writeHydroValues.Rd | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/writeEconomicOptions.R b/R/writeEconomicOptions.R index 0a71e4fe..2fb47eaa 100644 --- a/R/writeEconomicOptions.R +++ b/R/writeEconomicOptions.R @@ -104,11 +104,11 @@ writeEconomicOptions <- function(x, } ) - if (!is.null(x$spread_unsupplied_energy_cost)) { + if (!is.null(x$average_unsupplied_energy_cost)) { cmd <- api_command_generate( action = "update_config", target = "input/thermal/areas/unserverdenergycost", - data = setNames(as.list(x$spread_unsupplied_energy_cost), x$area) + data = setNames(as.list(x$average_unsupplied_energy_cost), x$area) ) api_command_register(cmd, opts = opts) `if`( diff --git a/man/writeHydroValues.Rd b/man/writeHydroValues.Rd index 0b386ef4..4a177b87 100644 --- a/man/writeHydroValues.Rd +++ b/man/writeHydroValues.Rd @@ -17,7 +17,7 @@ writeHydroValues( \item{type}{Type of hydro file, it can be "waterValues", "reservoir", "maxpower", "inflowPattern" or "creditmodulations".} -\item{data}{The data must have specific dimension depending on the type of file. +\item{data}{The data must have specific dimension depending on the type of file : \itemize{ \item{waterValues}{: a 365x101 numeric matrix: marginal values for the stored energy based on date (365 days) @@ -39,12 +39,12 @@ ascending day, ascending level.} \description{ \ifelse{html}{\figure{badge_api_ok.svg}{options: alt='Antares API OK'}}{Antares API: \strong{OK}} -Write water, reservoirLevels, maxpower, inflowPattern and creditModulations values for a given area. +Write waterValues, reservoirLevels, maxpower, inflowPattern and creditModulations data for a given area. } \examples{ \dontrun{ -writeValues("fictive_area", data = matrix(rep(0, 365*101), nrow = 365)) +writeHydroValues("fictive_area", type = "inflowPattern", data = matrix(rep(0, 365*1), nrow = 365)) } }