editClusterST: Edit a short-term storage cluster

View source: R/editClusterST.R

editClusterSTR Documentation

Edit a short-term storage cluster

Description

Antares API OK

Edit parameters and time series of an existing st-storage cluster (Antares studies >= v8.6.0).

Usage

editClusterST(
  area,
  cluster_name,
  group = NULL,
  storage_parameters = NULL,
  PMAX_injection = NULL,
  PMAX_withdrawal = NULL,
  inflows = NULL,
  lower_rule_curve = NULL,
  upper_rule_curve = NULL,
  cost_injection = NULL,
  cost_withdrawal = NULL,
  cost_level = NULL,
  cost_variation_injection = NULL,
  cost_variation_withdrawal = NULL,
  add_prefix = TRUE,
  opts = antaresRead::simOptions()
)

Arguments

area

The area where to create the cluster.

cluster_name

Name for the cluster, it will prefixed by area name, unless you set add_prefix = FALSE.

group

Group of the cluster, one of : PSP_open, PSP_closed, Pondage, Battery, Other. It corresponds to the type of stockage (dynamic name for Antares version >= 9.2).

storage_parameters

list Parameters to write in the Ini file (see Note).

PMAX_injection

Modulation of charging capacity on an 8760-hour basis. numeric {0;1} (8760*1).

PMAX_withdrawal

Modulation of discharging capacity on an 8760-hour basis. numeric {0;1} (8760*1).

inflows

Algebraic deviation of the state of charge of the storage, which does not induce any power generation or consumption on the system numeric {<0;>0} (8760*1).

lower_rule_curve

This is the lower limit for filling the stock imposed each hour. numeric {0;1} (8760*1).

upper_rule_curve

This is the upper limit for filling the stock imposed each hour. numeric {0;1} (8760*1).

cost_injection

Penalizes the injection flowrate at each hour (€/MWh) numeric {>0} (8760*1).

cost_withdrawal

Penalizes the withdrawal flowrate at each hour (€/MWh) numeric {>0} (8760*1).

cost_level

Penalizes the volume of stored energy at each hour (€/MWh) numeric {<0;>0} (8760*1).

cost_variation_injection

Penalizes injection flowrate variation every hour (€/MWh) numeric {>0} (8760*1).

cost_variation_withdrawal

Penalizes the withdrawal variation every hour (€/MWh) numeric {>0} (8760*1).

add_prefix

If TRUE (the default), cluster_name will be prefixed by area name.

opts

List of simulation parameters returned by the function antaresRead::setSimulationPath()

Value

An updated list containing various information about the simulation.

Note

Put only properties or TS value you want to edit (see examples section).

See Also

createClusterST(), removeClusterST()

Examples

## Not run: 
# study version >= "8.6.0"

# edit an existing cluster (see doc approved groups)
name_group <- "Pondage"

editClusterST(area = "areaname", 
              cluster_name = "clustername", 
              group = name_group)

# edit properties
all_params <- storage_values_default()
all_params[["efficiency"]] <- 0.9
all_params[["reservoircapacity"]] <- 1000
all_params[["initiallevel"]] <- 0.5
all_params[["withdrawalnominalcapacity"]] <- 250
all_params[["injectionnominalcapacity"]] <- 200
all_params[["initialleveloptim"]] <- TRUE

editClusterST(area = "areaname", 
              cluster_name = "clustername", 
              storage_parameters = all_params)

# edit time series
inflow_data <- matrix(3, 8760)
ratio_data <- matrix(0.7, 8760)

editClusterST(area = "areaname", 
              cluster_name = "clustername",
              PMAX_withdrawal = ratio_data, 
              inflows = inflow_data, 
              PMAX_injection = ratio_data, 
              lower_rule_curve = ratio_data, 
              upper_rule_curve = ratio_data)

# study version >= "9.2" (new parameters and TS)

# edit group (dynamic)
name_group <- "MyOwnGroup"

editClusterST(area = "areaname", 
              cluster_name = "clustername", 
              group = name_group)

# edit properties
my_parameters <- storage_values_default()
my_parameters$efficiencywithdrawal <- 0.5
my_parameters$`penalize-variation-injection` <- TRUE
my_parameters$`penalize-variation-withdrawal` <- TRUE

editClusterST(area = "areaname", 
              cluster_name = "clustername", 
              storage_parameters = my_parameters)

# edit time series
ratio_data <- matrix(0.7, 8760)

editClusterST(area = "areaname", 
              cluster_name = "clustername",
              cost_injection = ratio_data, 
              cost_withdrawal = ratio_data, 
              cost_level = ratio_data, 
              cost_variation_injection = ratio_data, 
              cost_variation_withdrawal = ratio_data)

## End(Not run)

rte-antares-rpackage/antaresEditObject documentation built on June 10, 2025, 11:36 p.m.