diff --git a/NAMESPACE b/NAMESPACE index 32482d05..d135f18a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -51,7 +51,7 @@ export(getPlaylist) export(getVariantCommands) export(is_antares_v7) export(is_antares_v820) -export(list_polluants_values) +export(list_pollutants_values) export(mockSimulationAPI) export(nodalOptimizationOptions) export(propertiesLinkOptions) diff --git a/NEWS.md b/NEWS.md index edbef061..65c2bdfd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,7 +6,7 @@ * `createArea()` integrate "st-storage". * `removeArea()` integrate "st-storage". * `writeInputTS()` integrate "mingen" data and dependency between "mod.txt" and "mingen.txt" data. -* `createCluster()` / `editCluster()` have new parameter `list_polluants` for list of pollutants. +* `createCluster()` / `editCluster()` have new parameter `list_pollutants` for list of pollutants. NEW FEATURES (Antares v8.6) : diff --git a/R/createCluster.R b/R/createCluster.R index 13dbd219..6deb3998 100644 --- a/R/createCluster.R +++ b/R/createCluster.R @@ -13,7 +13,7 @@ #' @param ... Parameters to write in the Ini file. Careful! #' Some parameters must be set as `integers` to avoid warnings in Antares, for example, #' to set `unitcount`, you'll have to use `unitcount = 1L`. -#' @param list_polluants `list` named with specific polluants (only for Antares version >= 860) +#' @param list_pollutants `list` named with specific pollutants (only for Antares version >= 860) #' @param time_series the "ready-made" 8760-hour time-series available for simulation purposes. #' @param prepro_data Pre-process data, a `data.frame` or `matrix`, #' default is a matrix with 365 rows and 6 columns. @@ -36,7 +36,7 @@ #' @importFrom data.table setcolorder year yday month setnames #' #' @note -#' Parameter `list_polluants` is only available for Antares studies >= v8.6.0. +#' Parameter `list_pollutants` is only available for Antares studies >= v8.6.0. #' #' You must provide named `list` (numerical values or NULL ) : #' @@ -156,7 +156,7 @@ createCluster <- function(area, cluster_name, group = "Other", ..., - list_polluants = list_polluants_values(), + list_pollutants = list_pollutants_values(), time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -167,25 +167,25 @@ createCluster <- function(area, assertthat::assert_that(inherits(opts, "simOptions")) # static name of list parameters of pulluants - name_list_param_poll <- names(list_polluants_values()) + name_list_param_poll <- names(list_pollutants_values()) # check v860 # check list pulluants parameters if(opts$antaresVersion >= 860){ - if(!is.null(list_polluants) & !assert_that(inherits(list_polluants, "list"))) - stop("Parameter 'list_polluants' must be a 'list'") + if(!is.null(list_pollutants) & !assert_that(inherits(list_pollutants, "list"))) + stop("Parameter 'list_pollutants' must be a 'list'") - if(!all(names(list_polluants) %in% name_list_param_poll)) - stop(append("Parameter 'list_polluants' must be named with the following elements: ", + if(!all(names(list_pollutants) %in% name_list_param_poll)) + stop(append("Parameter 'list_pollutants' must be named with the following elements: ", paste0(name_list_param_poll, collapse= ", "))) # check if all elements are NULL => replace by NULL # API (only) can't create with NULL values - all_null <- lapply(list_polluants, is.null) + all_null <- lapply(list_pollutants, is.null) all_null <- all(unlist(all_null)) if(all_null) - list_polluants <- NULL + list_pollutants <- NULL } @@ -212,7 +212,7 @@ createCluster <- function(area, cluster_name = cluster_name, group = group, ..., - list_polluants = list_polluants, + list_pollutants = list_pollutants, time_series = time_series, prepro_data = prepro_data, prepro_modulation = prepro_modulation, @@ -270,7 +270,7 @@ createClusterRES <- function(area, .createCluster <- function(area, cluster_name, ..., - list_polluants = NULL, + list_pollutants = NULL, time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -302,9 +302,9 @@ createClusterRES <- function(area, cluster_name <- paste(area, cluster_name, sep = "_") params_cluster$name <- cluster_name - # v860 polluants + # v860 pollutants if(opts$antaresVersion >= 860) - params_cluster <- append(params_cluster, list_polluants) + params_cluster <- append(params_cluster, list_pollutants) # API block if (is_api_study(opts)) { @@ -463,7 +463,7 @@ createClusterRES <- function(area, # ) -#' Output polluants list for thermal clusters +#' Output pollutants list for thermal clusters #' #' @param multi_values put values to init list values, default as `NULL` #' @@ -471,8 +471,8 @@ createClusterRES <- function(area, #' @export #' #' @examples -#' list_polluants_values() -list_polluants_values <- function(multi_values = NULL) { +#' list_pollutants_values() +list_pollutants_values <- function(multi_values = NULL) { list("nh3"= multi_values, "nox"= multi_values, "pm2_5"= multi_values, diff --git a/R/createClusterST.R b/R/createClusterST.R index 2a8dfdfb..c8cb48f8 100644 --- a/R/createClusterST.R +++ b/R/createClusterST.R @@ -317,7 +317,7 @@ createClusterST <- function(area, } } -#' Output polluants list for thermal clusters +#' Output pollutants list for thermal clusters #' #' #' @return a named list diff --git a/R/editCluster.R b/R/editCluster.R index 0a3c0465..a287bcef 100644 --- a/R/editCluster.R +++ b/R/editCluster.R @@ -12,7 +12,7 @@ #' @seealso [createCluster()] or [createClusterRES()] to create new clusters, [removeCluster()] or [removeClusterRES()] to remove clusters. #' #' @note -#' Parameter `list_polluants` is only available for Antares studies >= v8.6.0. +#' Parameter `list_pollutants` is only available for Antares studies >= v8.6.0. #' #' You must provide named `list` (numerical values or NULL ) : #' @@ -44,7 +44,7 @@ editCluster <- function(area, cluster_name, ..., - list_polluants = NULL, + list_pollutants = NULL, time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -54,7 +54,7 @@ editCluster <- function(area, area = area, cluster_name = cluster_name, ..., - list_polluants = list_polluants, + list_pollutants = list_pollutants, time_series = time_series, prepro_data = prepro_data, prepro_modulation = prepro_modulation, @@ -90,7 +90,7 @@ editClusterRES <- function(area, .editCluster <- function(area, cluster_name, ..., - list_polluants = NULL, + list_pollutants = NULL, time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -108,9 +108,9 @@ editClusterRES <- function(area, if (add_prefix) cluster_name <- paste(area, cluster_name, sep = "_") - # v860 polluants + # v860 pollutants if(opts$antaresVersion >= 860) - params_cluster <- append(params_cluster, list_polluants) + params_cluster <- append(params_cluster, list_pollutants) # Handle case sensitivity in name of clusters API clusters <- names(readIni(file.path("input", cluster_type, "clusters", area, "list"), diff --git a/docs/articles/Antares_new_features_v860.html b/docs/articles/Antares_new_features_v860.html index 0f931fc2..13be0475 100644 --- a/docs/articles/Antares_new_features_v860.html +++ b/docs/articles/Antares_new_features_v860.html @@ -182,7 +182,7 @@

Create “st-storage”#> x being coerced from class: matrix to data.table #> x being coerced from class: matrix to data.table #> x being coerced from class: matrix to data.table -

Now you can see information in simulation options.

+

Now you can see informations in simulation options.

 opts <- simOptions()
 opts$areasWithSTClusters
@@ -328,18 +328,18 @@ 

Remove st-storageThermal pollutants parameters

Antares version 8.6.0 now provide pollutants parameters for thermal clusters. You can see the documentation on thermal clusters here.

-

You have global list of pollutants given by function list_polluants_values() (nh3, nox, pm2_5, pm5, pm10, nmvoc, so2, op1, op2, op3, op4, op5, co2). By default, parameters are set to NULL, you can initialize all parameters with value or customize parameters.

+

You have global list of pollutants given by function list_pollutants_values(). By default, parameters are set to NULL, you can initialize all parameters with value or customize parameters.

 # create cluster with pollutants
 
 # pollutants
-all_param_pollutants <- list_polluants_values(multi_values = 0.25)
+all_param_pollutants <- list_pollutants_values(multi_values = 0.25)
 
 createCluster(area = "fr", 
               cluster_name = "test_pollutant", 
               unitcount = 1L, 
               marginal_cost = 50,
-              list_polluants = all_param_pollutants, 
+              list_pollutants = all_param_pollutants, 
               time_series = matrix(rep(c(0, 8000), each = 24*364), ncol = 2),
               prepro_modulation = matrix(rep(c(1, 1, 1, 0), each = 24*365), ncol = 4) 
               )
@@ -355,22 +355,19 @@

Thermal pollutants parameters
 # editing
-edit_param_pollutants <- list_polluants_values()[c("nh3", "nox", "pm2_5")]
-edit_param_pollutants$nh3 <- 0.3
-edit_param_pollutants$nox <- 0.4
-edit_param_pollutants$pm2_5 <- 0.5
+edit_param_pollutants <- list_pollutants_values(multi_values = 0.3)[1:3]
 
 editCluster(area = "fr", 
             cluster_name = "test_pollutant",
             unitcount = 2L, 
-            list_polluants = edit_param_pollutants)
+            list_pollutants = edit_param_pollutants)
 
 # read parameters
 param_th_cluster <- readClusterDesc()
 rmarkdown::paged_table(param_th_cluster)

@@ -383,8 +380,8 @@

Hydro - MINGEN filewriteInputTS(). We will see further information for values checks.

Values checks :

Checks depends of values of parameters in hydro.ini file.

-

-

+

+

After creating study, .txt files containing time series are empty. We will describe steps to edit mingen.txt.

Initial values :

diff --git a/docs/news/index.html b/docs/news/index.html
index dcde40ba..bcf19122 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -82,7 +82,7 @@ 

Breaking c
  • writeInputTS() integrate “mingen” data and dependency between “mod.txt” and “mingen.txt” data.
  • -createCluster() / editCluster() have new parameter list_polluants for list of pollutants.
  • +createCluster() / editCluster() have new parameter list_pollutants for list of pollutants.

    NEW FEATURES (Antares v8.6) :

    • New function activateST() Activate “st-storage” in an Antares study.
    • New functions createClusterST(), editClusterST(), removeClusterST() (“st-storage” family of functions for a study in “input” mode)
    • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index f1267576..b15d22e8 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -7,5 +7,5 @@ articles: api-variant-management: api-variant-management.html renewables-energy-sources: renewables-energy-sources.html scenario-builder: scenario-builder.html -last_built: 2023-09-15T13:30Z +last_built: 2023-09-19T13:55Z diff --git a/docs/reference/createCluster.html b/docs/reference/createCluster.html index 908b723a..1106724b 100644 --- a/docs/reference/createCluster.html +++ b/docs/reference/createCluster.html @@ -82,7 +82,7 @@

      Create a cluster

      cluster_name, group = "Other", ..., - list_polluants = list_polluants_values(), + list_pollutants = list_pollutants_values(), time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -125,8 +125,8 @@

      Arguments

      to set unitcount, you'll have to use unitcount = 1L.

      -
      list_polluants
      -

      list named with specific polluants (only for Antares version >= 860)

      +
      list_pollutants
      +

      list named with specific pollutants (only for Antares version >= 860)

      time_series
      @@ -164,7 +164,7 @@

      Value

    Note

    -

    Parameter list_polluants is only available for Antares studies >= v8.6.0.

    +

    Parameter list_pollutants is only available for Antares studies >= v8.6.0.

    You must provide named list (numerical values or NULL ) :

    list( "nh3"= 0.25, "nox"= 0.45, "pm2_5"= 0.25, "pm5"= 0.25, "pm10"= 0.25, "nmvoc"= 0.25, "so2"= 0.25, "op1"= 0.25, "op2"= 0.25, "op3"= 0.25, "op4"= 0.25, "op5"= NULL, "co2"= NULL)

    diff --git a/docs/reference/editCluster.html b/docs/reference/editCluster.html index 68f584da..74260602 100644 --- a/docs/reference/editCluster.html +++ b/docs/reference/editCluster.html @@ -81,7 +81,7 @@

    Edit an existing cluster

    area, cluster_name, ..., - list_polluants = NULL, + list_pollutants = NULL, time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -115,8 +115,8 @@

    Arguments

    to set unitcount, you'll have to use unitcount = 1L.

    -
    list_polluants
    -

    list named with specific polluants (only for Antares version >= 860)

    +
    list_pollutants
    +

    list named with specific pollutants (only for Antares version >= 860)

    time_series
    @@ -150,7 +150,7 @@

    Value

    Note

    -

    Parameter list_polluants is only available for Antares studies >= v8.6.0.

    +

    Parameter list_pollutants is only available for Antares studies >= v8.6.0.

    You must provide named list (numerical values or NULL ) :

    list( "nh3"= 0.25, "nox"= 0.45, "pm2_5"= 0.25, "pm5"= 0.25, "pm10"= 0.25, "nmvoc"= 0.25, "so2"= 0.25, "op1"= 0.25, "op2"= 0.25, "op3"= 0.25, "op4"= 0.25, "op5"= NULL, "co2"= NULL)

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 77a87787..96a8aa89 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -249,9 +249,9 @@

    All functions

    Get the type of control to execute between mingen data and maxpower data

    -

    list_polluants_values()

    +

    list_pollutants_values()

    -

    Output polluants list for thermal clusters

    +

    Output pollutants list for thermal clusters

    mockSimulationAPI()

    @@ -320,7 +320,7 @@

    All functions

    storage_values_default()

    -

    Output polluants list for thermal clusters

    +

    Output pollutants list for thermal clusters

    updateAdequacySettings()

    diff --git a/docs/reference/list_pollutants_values.html b/docs/reference/list_pollutants_values.html new file mode 100644 index 00000000..9f2eaa37 --- /dev/null +++ b/docs/reference/list_pollutants_values.html @@ -0,0 +1,161 @@ + +Output pollutants list for thermal clusters — list_pollutants_values • antaresEditObject + + +
    +
    + + + +
    +
    + + +
    +

    Output pollutants list for thermal clusters

    +
    + +
    +
    list_pollutants_values(multi_values = NULL)
    +
    + +
    +

    Arguments

    +
    multi_values
    +

    put values to init list values, default as NULL

    + +
    +
    +

    Value

    + + +

    a named list

    +
    + +
    +

    Examples

    +
    list_pollutants_values()
    +#> $nh3
    +#> NULL
    +#> 
    +#> $nox
    +#> NULL
    +#> 
    +#> $pm2_5
    +#> NULL
    +#> 
    +#> $pm5
    +#> NULL
    +#> 
    +#> $pm10
    +#> NULL
    +#> 
    +#> $nmvoc
    +#> NULL
    +#> 
    +#> $so2
    +#> NULL
    +#> 
    +#> $op1
    +#> NULL
    +#> 
    +#> $op2
    +#> NULL
    +#> 
    +#> $op3
    +#> NULL
    +#> 
    +#> $op4
    +#> NULL
    +#> 
    +#> $op5
    +#> NULL
    +#> 
    +#> $co2
    +#> NULL
    +#> 
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.0.6.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/storage_values_default.html b/docs/reference/storage_values_default.html index 42fe630c..4358be74 100644 --- a/docs/reference/storage_values_default.html +++ b/docs/reference/storage_values_default.html @@ -1,5 +1,5 @@ -Output polluants list for thermal clusters — storage_values_default • antaresEditObjectOutput pollutants list for thermal clusters — storage_values_default • antaresEditObject @@ -65,13 +65,13 @@
    -

    Output polluants list for thermal clusters

    +

    Output pollutants list for thermal clusters

    diff --git a/docs/sitemap.xml b/docs/sitemap.xml index c706fd1a..7c3b470e 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -180,6 +180,9 @@ /reference/list_polluants_values.html + + /reference/list_pollutants_values.html + /reference/mockSimulationAPI.html diff --git a/man/createCluster.Rd b/man/createCluster.Rd index d24d884b..96f157b5 100644 --- a/man/createCluster.Rd +++ b/man/createCluster.Rd @@ -10,7 +10,7 @@ createCluster( cluster_name, group = "Other", ..., - list_polluants = list_polluants_values(), + list_pollutants = list_pollutants_values(), time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -45,7 +45,7 @@ createClusterRES( Some parameters must be set as \code{integers} to avoid warnings in Antares, for example, to set \code{unitcount}, you'll have to use \code{unitcount = 1L}.} -\item{list_polluants}{\code{list} named with specific polluants (only for Antares version >= 860)} +\item{list_pollutants}{\code{list} named with specific pollutants (only for Antares version >= 860)} \item{time_series}{the "ready-made" 8760-hour time-series available for simulation purposes.} @@ -71,7 +71,7 @@ An updated list containing various information about the simulation. Create a new thermal or RES (renewable energy source) cluster. } \note{ -Parameter \code{list_polluants} is only available for Antares studies >= v8.6.0. +Parameter \code{list_pollutants} is only available for Antares studies >= v8.6.0. You must provide named \code{list} (numerical values or NULL ) : diff --git a/man/editCluster.Rd b/man/editCluster.Rd index 07a2e508..44e667e7 100644 --- a/man/editCluster.Rd +++ b/man/editCluster.Rd @@ -9,7 +9,7 @@ editCluster( area, cluster_name, ..., - list_polluants = NULL, + list_pollutants = NULL, time_series = NULL, prepro_data = NULL, prepro_modulation = NULL, @@ -35,7 +35,7 @@ editClusterRES( Some parameters must be set as \code{integers} to avoid warnings in Antares, for example, to set \code{unitcount}, you'll have to use \code{unitcount = 1L}.} -\item{list_polluants}{\code{list} named with specific polluants (only for Antares version >= 860)} +\item{list_pollutants}{\code{list} named with specific pollutants (only for Antares version >= 860)} \item{time_series}{the "ready-made" 8760-hour time-series available for simulation purposes.} @@ -59,7 +59,7 @@ An updated list containing various information about the simulation. Edit parameters, pre-process data and time series of an existing cluster, thermal or RES (renewable energy source). } \note{ -Parameter \code{list_polluants} is only available for Antares studies >= v8.6.0. +Parameter \code{list_pollutants} is only available for Antares studies >= v8.6.0. You must provide named \code{list} (numerical values or NULL ) : diff --git a/man/list_polluants_values.Rd b/man/list_pollutants_values.Rd similarity index 52% rename from man/list_polluants_values.Rd rename to man/list_pollutants_values.Rd index 9f48674d..aaacf211 100644 --- a/man/list_polluants_values.Rd +++ b/man/list_pollutants_values.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/createCluster.R -\name{list_polluants_values} -\alias{list_polluants_values} -\title{Output polluants list for thermal clusters} +\name{list_pollutants_values} +\alias{list_pollutants_values} +\title{Output pollutants list for thermal clusters} \usage{ -list_polluants_values(multi_values = NULL) +list_pollutants_values(multi_values = NULL) } \arguments{ \item{multi_values}{put values to init list values, default as \code{NULL}} @@ -13,8 +13,8 @@ list_polluants_values(multi_values = NULL) a named list } \description{ -Output polluants list for thermal clusters +Output pollutants list for thermal clusters } \examples{ -list_polluants_values() +list_pollutants_values() } diff --git a/man/storage_values_default.Rd b/man/storage_values_default.Rd index 1c7639fc..5c2646aa 100644 --- a/man/storage_values_default.Rd +++ b/man/storage_values_default.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/createClusterST.R \name{storage_values_default} \alias{storage_values_default} -\title{Output polluants list for thermal clusters} +\title{Output pollutants list for thermal clusters} \usage{ storage_values_default() } @@ -10,7 +10,7 @@ storage_values_default() a named list } \description{ -Output polluants list for thermal clusters +Output pollutants list for thermal clusters } \examples{ storage_values_default() diff --git a/tests/testthat/test-createCluster.R b/tests/testthat/test-createCluster.R index 038e2229..68f5ea41 100644 --- a/tests/testthat/test-createCluster.R +++ b/tests/testthat/test-createCluster.R @@ -88,7 +88,7 @@ sapply(studies, function(study) { setup_study_860(sourcedir860) opts_test <- antaresRead::setSimulationPath(study_temp_path, "input") -test_that("Create cluster with polluants params (new feature v8.6)",{ +test_that("Create cluster with pollutants params (new feature v8.6)",{ test_that("Create cluster default call (new feature v8.6)",{ @@ -101,15 +101,15 @@ test_that("Create cluster with polluants params (new feature v8.6)",{ res_cluster_default <- res_cluster[cluster %in% paste0(getAreas()[1], "_cluster_default"),] - polluants_names <- names(antaresEditObject::list_polluants_values()) + pollutants_names <- names(antaresEditObject::list_pollutants_values()) - values_default <- res_cluster_default[, .SD, .SDcols = polluants_names] + values_default <- res_cluster_default[, .SD, .SDcols = pollutants_names] # check default values testthat::expect_equal(all(is.na(values_default)), TRUE) }) - polluants_params <- list( + pollutants_params <- list( "nh3"= 0.25, "nox"= 0.45, "pm2_5"= 0.25, "pm5"= 0.25, "pm10"= 0.25, "nmvoc"= 0.25, "so2"= 0.25, "op1"= 0.25, "op2"= 0.25, "op3"= 0.25, @@ -118,14 +118,14 @@ test_that("Create cluster with polluants params (new feature v8.6)",{ createCluster( area = getAreas()[1], - cluster_name = "mycluster_polluant", + cluster_name = "mycluster_pollutant", group = "Other", unitcount = 1, nominalcapacity = 8000, `min-down-time` = 0, `marginal-cost` = 0.010000, `market-bid-cost` = 0.010000, - list_polluants = polluants_params, + list_pollutants = pollutants_params, time_series = matrix(rep(c(0, 8000), each = 24*364), ncol = 2), prepro_modulation = matrix(rep(c(1, 1, 1, 0), each = 24*365), ncol = 4), opts = opts_test @@ -134,13 +134,13 @@ test_that("Create cluster with polluants params (new feature v8.6)",{ res_cluster <- antaresRead::readClusterDesc() # check if cluster is created - testthat::expect_true(paste(getAreas()[1], "mycluster_polluant", sep = "_") %in% + testthat::expect_true(paste(getAreas()[1], "mycluster_pollutant", sep = "_") %in% levels(res_cluster$cluster)) - names_polluants <- names(polluants_params) + names_pollutants <- names(pollutants_params) - # check if polluants is read well - testthat::expect_true(all(names_polluants %in% + # check if pollutants is read well + testthat::expect_true(all(names_pollutants %in% names(res_cluster))) # remove temporary study diff --git a/tests/testthat/test-editCluster.R b/tests/testthat/test-editCluster.R index cc4acaf0..a5f6a8b7 100644 --- a/tests/testthat/test-editCluster.R +++ b/tests/testthat/test-editCluster.R @@ -56,9 +56,9 @@ sapply(studies, function(study) { setup_study_860(sourcedir860) opts_test <- antaresRead::setSimulationPath(study_temp_path, "input") -test_that("Edit cluster with polluants params (new feature v8.6)",{ +test_that("Edit cluster with pollutants params (new feature v8.6)",{ - polluants_params <- list( + pollutants_params <- list( "nh3"= 0.25, "nox"= 0.45, "pm2_5"= 0.25, "pm5"= 0.25, "pm10"= 0.25, "nmvoc"= 0.25, "so2"= 0.25, "op1"= 0.25, "op2"= 0.25, "op3"= 0.25, @@ -67,14 +67,14 @@ test_that("Edit cluster with polluants params (new feature v8.6)",{ opts_test <- createCluster( area = getAreas()[1], - cluster_name = "mycluster_polluant", + cluster_name = "mycluster_pollutant", group = "Other", unitcount = 1, nominalcapacity = 8000, `min-down-time` = 0, `marginal-cost` = 0.010000, `market-bid-cost` = 0.010000, - list_polluants = polluants_params, + list_pollutants = pollutants_params, time_series = matrix(rep(c(0, 8000), each = 24*364), ncol = 2), prepro_modulation = matrix(rep(c(1, 1, 1, 0), each = 24*365), ncol = 4), opts = opts_test @@ -85,7 +85,7 @@ test_that("Edit cluster with polluants params (new feature v8.6)",{ # NULL as to effect to delete parameters opts_test <- editCluster(area = getAreas()[1], cluster_name = levels(res_cluster$cluster)[1], - list_polluants = list( + list_pollutants = list( "nh3"= 0.07, "nox"= 0.07, "pm2_5"= 0.07, diff --git a/vignettes/Antares_new_features_v860.Rmd b/vignettes/Antares_new_features_v860.Rmd index 165aa266..ebb81b51 100644 --- a/vignettes/Antares_new_features_v860.Rmd +++ b/vignettes/Antares_new_features_v860.Rmd @@ -76,7 +76,7 @@ createClusterST(area = "it", ``` -Now you can see information in simulation options. +Now you can see informations in simulation options. ```{r study options} opts <- simOptions() @@ -173,19 +173,19 @@ Parameters and data concerning this cluster in this area are removed. Antares version 8.6.0 now provide pollutants parameters for thermal clusters. You can see the documentation on thermal clusters [here](https://rte-antares-rpackage.github.io/antaresEditObject/articles/antaresEditObject.html#create-a-new-cluster). -You have global `list` of pollutants given by function `list_polluants_values()` (`r names(list_polluants_values())`). By default, parameters are set to NULL, you can initialize all parameters with value or customize parameters. +You have global `list` of pollutants given by function `list_pollutants_values()`. By default, parameters are set to NULL, you can initialize all parameters with value or customize parameters. ```{r} # create cluster with pollutants # pollutants -all_param_pollutants <- list_polluants_values(multi_values = 0.25) +all_param_pollutants <- list_pollutants_values(multi_values = 0.25) createCluster(area = "fr", cluster_name = "test_pollutant", unitcount = 1L, marginal_cost = 50, - list_polluants = all_param_pollutants, + list_pollutants = all_param_pollutants, time_series = matrix(rep(c(0, 8000), each = 24*364), ncol = 2), prepro_modulation = matrix(rep(c(1, 1, 1, 0), each = 24*365), ncol = 4) ) @@ -197,19 +197,16 @@ param_th_cluster <- readClusterDesc() rmarkdown::paged_table(param_th_cluster) ``` -Let's see how to edit 3 parameters **`r names(list_polluants_values())[1:3]`**. +Let's see how to edit 3 parameters **`r names(list_pollutants_values())[1:3]`**. ```{r edit pollutants} # editing -edit_param_pollutants <- list_polluants_values()[c("nh3", "nox", "pm2_5")] -edit_param_pollutants$nh3 <- 0.3 -edit_param_pollutants$nox <- 0.4 -edit_param_pollutants$pm2_5 <- 0.5 +edit_param_pollutants <- list_pollutants_values(multi_values = 0.3)[1:3] editCluster(area = "fr", cluster_name = "test_pollutant", unitcount = 2L, - list_polluants = edit_param_pollutants) + list_pollutants = edit_param_pollutants) # read parameters param_th_cluster <- readClusterDesc() @@ -229,11 +226,11 @@ Full documentation is available in the function `writeInputTS()`. We will see fu Checks depends of values of parameters in `hydro.ini` file. -```{r schema combinatoire , echo=FALSE, fig.cap="", out.width = '40%', fig.align='center'} +```{r schema combinatoire , echo=FALSE, fig.cap="", out.width = '50%', fig.align='center'} knitr::include_graphics("schemas/mingen_hydro_rules.png") ``` -```{r schema, echo=FALSE, fig.cap="", out.width = '80%', fig.align='center'} +```{r schema, echo=FALSE, fig.cap="", out.width = '75%', fig.align='center'} # path_image <- sourcedir860 <- system.file("doc/schemas", package = "antaresEditObject") # knitr::include_graphics(file.path(path_image,"mingen.png")) knitr::include_graphics("schemas/mingen_draw.png")