Antares API OK

Create a new ST-storage cluster for >= v8.6.0 Antares studies.

createClusterST(
  area,
  cluster_name,
  group = "Other1",
  storage_parameters = storage_values_default(),
  PMAX_injection = NULL,
  PMAX_withdrawal = NULL,
  inflows = NULL,
  lower_rule_curve = NULL,
  upper_rule_curve = NULL,
  add_prefix = TRUE,
  overwrite = FALSE,
  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.

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).

add_prefix

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

overwrite

Logical, overwrite the cluster or not.

opts

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

Value

An updated list containing various information about the simulation.

Note

To write parameters to the list.ini file. You have function storage_values_default() who is called by default. This function return list containing properties according study version for cluster st-storage.

Study version >= "8.6.0" :

  • efficiency = 1 (numeric {0;1})

  • reservoircapacity = 0 (integer >= 0)

  • initiallevel = 0 (numeric {0;1})

  • withdrawalnominalcapacity = 0 (integer >= 0)

  • injectionnominalcapacity = 0 (integer >= 0)

  • initialleveloptim = FALSE (logical TRUE/FALSE)

Study version >= "8.8.0" (update + new parameter) :

  • initiallevel = 0.5 (numeric {0;1})

  • enabled = TRUE (logical TRUE/FALSE)

By default, these values don't allow you to have an active cluster (See example section.)

See also

All the functions needed to manage a storage cluster, antaresRead::readClusterSTDesc(), editClusterST(), removeClusterST().

Examples

if (FALSE) { # \dontrun{

# list for cluster parameters : 
storage_values_default()

# create a cluster by default (with default parameters values + default data values):
createClusterST(area = "my_area", 
               "my_cluster") 
  
# Read cluster in study                            
 # by default, cluster name is prefixed 
 # by the area name
levels(readClusterSTDesc()$cluster)
# > "my_area_my_cluster"

# create cluster with custom parameter and data
  # use the function to create your own list of parameters (no Antares optim)
  # if you want optim (my_parameters$initialleveloptim <- TRUE)
my_parameters <- storage_values_default()
my_parameters$efficiency <- 0.5
my_parameters$initiallevel <- 10
my_parameters$withdrawalnominalcapacity <- 100
my_parameters$injectionnominalcapacity <- 1000
my_parameters$reservoircapacity <- 10000

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

createClusterST(area = "my_area", 
                "my_cluster",
                storage_parameters = my_parameters,
                PMAX_withdrawal = ratio_data, 
                inflows = inflow_data, 
                PMAX_injection = ratio_data, 
                lower_rule_curve = ratio_data, 
                upper_rule_curve = ratio_data)
} # }