createCluster {antaresEditObject} | R Documentation |
Create a cluster
Description
(thermal clusters only)
Create a new thermal or RES (renewable energy source) cluster.
Usage
createCluster(
area,
cluster_name,
group = "Other",
...,
list_pollutants = NULL,
time_series = NULL,
prepro_data = NULL,
prepro_modulation = NULL,
add_prefix = TRUE,
overwrite = FALSE,
opts = antaresRead::simOptions()
)
createClusterRES(
area,
cluster_name,
group = "Other RES 1",
...,
time_series = 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 |
group |
Group of the cluster, depends on cluster type:
|
... |
Parameters to write in the Ini file. Careful!
Some parameters must be set as |
list_pollutants |
|
time_series |
the "ready-made" 8760-hour time-series available for simulation purposes. |
prepro_data |
Pre-process data, a |
prepro_modulation |
Pre-process modulation, a |
add_prefix |
If |
overwrite |
Logical, overwrite the cluster or not. |
opts |
List of simulation parameters returned by the function
|
Value
An updated list containing various information about the simulation.
Note
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)
See Also
editCluster()
or editClusterRES()
to edit existing clusters, removeCluster()
or removeClusterRES()
to remove clusters.
Examples
## Not run:
library(antaresRead)
library(antaresEditObject)
# Create a cluster :
createCluster(
area = "fr",
cluster_name = "my_cluster",
group = "other",
unitcount = 1L, # or as.integer(1)
marginal_cost = 50
)
# by default, cluster name is prefixed
# by the area name
levels(readClusterDesc()$cluster)
# > "fr_my_cluster"
# To prevent this, use `add_prefix`
createCluster(
area = "fr",
cluster_name = "my_cluster",
add_prefix = FALSE,
group = "other",
marginal_cost = 50
)
levels(readClusterDesc()$cluster)
# > "my_cluster"
# Create a RES cluster :
createClusterRES(
area = "fr",
cluster_name = "my_cluster_res",
group = "other",
unitcount = 1L, # or as.integer(1)
nominalcapacity = 50,
ts_interpretation = "power-generation"
)
# You can also specify that the Time-Series of the RES cluster are
# production factors :
createClusterRES(
area = "fr",
cluster_name = "my_cluster_res",
group = "other",
unitcount = 1L, # or as.integer(1)
nominalcapacity = 50,
ts_interpretation = "production-factor"
)
# Pre-process data :
# this is the default data :
createCluster(
area = "fr",
cluster_name = "my_cluster",
prepro_data = matrix(
data = c(rep(1, times = 365 * 2),
rep(0, times = 365 * 4)),
ncol = 6
)
)
# with a data.frame
createCluster(
area = "fr",
cluster_name = "my_cluster",
prepro_data = data.frame(
v1 = rep(7, 365), # column name does not matter
v2 = rep(27, 365),
v3 = rep(0.05, 365),
v4 = rep(0.12, 365),
v5 = rep(0, 365),
v6 = rep(1, 365)
)
)
# Pre-process modulation :
# this is the default data
createCluster(
area = "fr",
cluster_name = "my_cluster",
prepro_modulation = matrix(
data = c(rep(1, times = 365 * 24 * 3),
rep(0, times = 365 * 24 * 1)),
ncol = 4
)
)
# with a data.frame
createCluster(
area = "fr",
cluster_name = "my_cluster",
prepro_modulation = data.frame(
var1 = rep(0, 8760), # column name does not matter
var2 = rep(1, 8760),
var3 = rep(0, 8760),
var4 = rep(1, 8760)
)
)
## End(Not run)