createClusterST: Create a short-term storage cluster

View source: R/createClusterST.R

createClusterSTR Documentation

Create a short-term storage cluster

Description

Antares API OK

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

Usage

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. The values are float between 0 and 1.

PMAX_withdrawal

modulation of discharging capacity on an 8760-hour basis. The values are float between 0 and 1.

inflows

imposed withdrawals from the stock for other uses, The values are integer.

lower_rule_curve

This is the lower limit for filling the stock imposed each hour. The values are float between 0 and 1.

upper_rule_curve

This is the upper limit for filling the stock imposed each hour. The values are float between 0 and 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 six parameters for cluster st-storage. See example section.

To write data (.txt file), you have parameter for each output file :

  • PMAX-injection.txt

  • PMAX-withdrawal.txt

  • inflows.txt

  • lower-rule-curve.txt

  • upper-rule-curve.txt

See Also

editClusterST() to edit existing clusters, readClusterSTDesc() to read cluster, removeClusterST() to remove clusters.

Examples

## Not run: 

# 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
my_parameters <- storage_values_default()
my_parameters$efficiency <- 0.5
my_parameters$reservoircapacity <- 10000


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)

## End(Not run)


antaresEditObject documentation built on Oct. 4, 2023, 1:06 a.m.