modulation: Compute the modulation of cluster units

View source: R/modulation.R

modulationR Documentation

Compute the modulation of cluster units

Description

This function computes the modulation of cluster units or of sectors.

Usage

modulation(
  x,
  timeStep = "annual",
  synthesis = FALSE,
  by = c("cluster", "sector"),
  clusterDesc = NULL,
  opts = NULL
)

Arguments

x

An antaresData object created with readAntares. It must contain the hourly detailed results for clusters if by = "cluster" or for areas and/or districts if by = "sector"

timeStep

Desired time step for the result.

synthesis

If TRUE, average surpluses are returned. Else the function returns surpluses per Monte-Carlo scenario.

by

Should modulations computed by cluster or by sector? Possible values are "sector" and "cluster".

clusterDesc

A table created with the function readClusterDesc. If is this parameter is set to NULL (the default), then the function attempts to read the needed data in the same study as x.

opts

opts where clusterDesc will be read if null based on data

Value

A data.table of class antaresDataTable or a list of such tables with the following columns:

area

Area name. If byDistrict=TRUE, this column is replaced by column district.

cluster

Cluster name. If by="sector", this column is replaced by column sector.

timeId

Time id and other time columns.

upwardModulation

Maximal absolute modulation of a cluster unit or of the sector, if timeStep is hourly.

downwardModulation

Maximal absolute modulation of a cluster unit or of the sector, if timeStep is hourly.

absoluteModulation

Maximal absolute modulation of a cluster unit or of the sector, if timeStep is hourly.

avg_upwardModulation

Average upward modulation of a cluster unit or of the sector, if timeStep is not hourly.

avg_downwardModulation

Average downward modulation of a cluster unit or of the sector, if timeStep is not hourly.

avg_absoluteModulation

Average absolute modulation of a cluster unit or of the sector, if timeStep is not hourly.

max_upwardModulation

Maximal upward modulation of a cluster unit or of the sector, if timeStep is not hourly.

max_downwardModulation

Maximal downward modulation of a cluster unit or of the sector, if timeStep is not hourly.

max_absoluteModulation

Maximal absolute modulation of a cluster unit or of the sector, if timeStep is not hourly.

Notice that if by="cluster", the function computes the modulation per unit, i.e. the modulation of a cluster divided by the number of units of the cluster. On the opposite, if by="sector", the function returns the modulation of the global production of the sector. Moreover, if parameter x contains area and district data, the function returns a list with components areas and districts.

Examples

## Not run: 
# data required by the function
showAliases("modulation")

mydata <- readAntares(select="modulation")

# Modulation of cluster units
modulation(mydata)

# Aggregate Monte-Carlo scenarios
modulation(mydata, synthesis = TRUE)

# Modulation of sectors
modulation(mydata, by = "sector")

# Modulation of sectors per district
modulation(mydata, by = "sector")

## End(Not run)


antaresProcessing documentation built on June 25, 2024, 5:07 p.m.