跳转至

RES templates

These tags declare the building blocks of the Reference Energy System: commodities, technologies, and the parameter values that connect them.

Getting started with the RES

These tags define the key elements - processes, commodities, topology, and core parameters. These tags don't support wild cards.

Commodity Definition Table (~FI_COMM)

The Commodity Definition Table (~FI_COMM) is used to declare the non-numerical characteristics of commodities in the model. Each commodity must be declared only once within these tables to avoid conflicts, such as inconsistent attributes (e.g., different time slice levels).

The ~FI_COMM table is supported in B-Y templates, SubRES files, and the SysSettings template. For large and complex models, a best practice is to centralize all commodity declarations in a single template, such as the SysSettings template, to maintain consistency and avoid duplication.

Valid column headers for the ~FI_COMM table are described in Table 1 below. Their order in the table can be changed.

Best Practice: Declare commodities only once in a single template location to prevent errors or conflicting definitions.

Warning

Critical: Multiple duplicate declarations

Avoid declaring the same Commodity or Process with conflicting attributes across multiple tables or scenarios.

When you run the model with different scenario combinations, the same commodity (e.g., ELC) or process may have different attributes in each run if it is declared with conflicting attributes—such as different Time Slice Levels (TSLVL) in the ~FI_Comm or ~FI_Process tags—across multiple scenarios. This makes debugging and interpreting the output of GAMS runs difficult.

Best Practice:

Always declare each commodity and process exactly once with consistent attributes across all templates and scenarios. This ensures that all GAMS runs use the same fundamental parameter definitions, allowing you to confidently analyze and compare results across different scenario combinations.

Table Layout and Usage

The ~FI_COMM table is used to declare commodities with their associated attributes and properties. Each commodity is declared once with its characteristics.

Valid Column Headers

The valid column headers for a ~FI_COMM table are listed below (see the Example Table section for a complete example):

Header Description
Csets The sets to which commodities belong. Valid entries are:
  • NRG (energy)
  • MAT (material)
  • DEM (demand service)
  • ENV (emissions)
- FIN (financial) Note: These declarations are inherited until the next entry is encountered.
Region Specifies the region. By default, it applies to all regions unless explicitly declared. Note: This column is used only in B-Y templates and is not allowed in SubRES files.
CommName The name of the commodity (e.g., COA for coal).
CommDesc A description of the commodity (e.g., "Solid Fuels").
Unit The unit associated with the commodity throughout the model (e.g., PJ). User Responsibility: Ensure unit consistency throughout the model.
LimType Defines the sense of the balance equation for the commodity. Valid entries:
  • LO (Production >= Consumption, default for all but MAT commodities)
  • FX (Production = Consumption, default for MAT commodities)
  • UP (Production <= Consumption)
CTSLvl Specifies the commodity time-slice tracking level. Valid entries:
  • ANNUAL (default)
  • SEASON
  • WEEKLY
  • DAYNITE
PeakTS Defines peak time slice monitoring. Valid entries:
  • ANNUAL (default)
  • Specific time slices defined in the SysSettings file (comma-separated).
CType Indicates electricity and heat commodities. Valid entries:
  • ELC (electricity)
  • HTHEAT (high-temperature heat)
  • LTHEAT (low-temperature heat)

Note: Comma-separated elements are allowed in fields like Csets and PeakTS.

Example Table

Below is an example of a ~FI_COMM table for commodity definitions:

~FI_COMM CommName CommDesc Csets Unit LimType CTSLvl
COA Solid Fuels NRG PJ LO ANNUAL
ELEC Electricity NRG PJ FX SEASON

In this example:

  • COA is defined as a solid fuel energy commodity, measured in petajoules (PJ), with a default limit type of LO and time-slice tracking at the ANNUAL level.
  • ELEC is defined as an electricity commodity with a balance equation of FX and time-slice tracking at the SEASON level.

Best Practices

  1. Declare each commodity only once to prevent conflicts. Tip: Centralize declarations in the SysSettings template for large models.
  2. Ensure consistent use of units across the model for all commodities.
  3. Verify attributes such as LimType and CTSLvl for correctness, particularly when working with complex time-slice structures.
  4. Use comma-separated entries cautiously and only where appropriate, such as for time-slice monitoring (PeakTS).

By adhering to these practices, users can efficiently manage commodity definitions and avoid potential modeling errors.

Note

The following commodities (climate module) can be used without being defined: BEOHMOD,CH4-ATM,CH4-GTC,CH4-LO,CH4-MT,CH4-PPB,CH4-PPM,CH4-PREIND,CH4-UP,CO2-ATM,CO2-GTC,CO2-LO,CO2-PPM,CO2-PREIND,CO2-UP,CS,DELTA-ATM, DELTA-LO,EXT-EOH,FORCING,GAMMA,LAMBDA,N2O-ATM,N2O-GTC,N2O-LO,N2O-MT,N2O-PPB,N2O-PPM,N2O-PREIND,N2O-UP,PHI-AT-UP,PHI-CH4,PHI-LO-UP,PHI-N2O,PHI-UP-AT,PHI-UP-LO, SIGMA1,SIGMA2,SIGMA3,TOTCH4,TOTN2O.

Process Definition Table (~FI_PROCESS)

The Process Definition Table (~FI_PROCESS) is used to declare the non-numerical characteristics of processes in Veda. Each process must be defined only once in this table, and it serves as the foundational structure for assigning essential attributes like process name, description, activity unit, capacity unit, and more. These tables are supported in both Base-Year (B-Y) Templates and SubRES files.

Note

The ~FI_PROCESS table provides a flexible layout: the column order can be changed, and valid entries for each header are well-defined.

Warning

Each process must be declared exactly once with consistent attributes across all templates. Like FI_COMM tags, FI_PROCESS tags are processed in parallel, which can cause non-deterministic results if duplicate or inconsistent declarations exist. See the parallel processing warning in the FI_COMM section above for details.

Key Features

  1. Process Declaration

    • Each process is declared only once using its name, description, and associated attributes.
    • Supported in B-Y Templates and SubRES files. However, region declarations are only valid in B-Y templates.
  2. Non-Numerical Attributes

    • This table focuses on defining process characteristics rather than numerical data.
  3. Flexible Layout

    • The order of columns is user-defined, as long as valid headers are used.
  4. Region-Specific Data

    • Region declarations can be used in B-Y Templates but are not allowed in SubRES files.

Valid Column Headers

The following are valid column headers for the ~FI_PROCESS table:

Header Description
Sets Sets to which processes belong, indicating the process type. Valid entries include:
  • ELE: Thermal or other power plant
  • CHP: Combined heat and power
  • PRE: Generic process
  • DMD: Demand device
  • IMP: Import process
  • EXP: Export process
  • MIN: Mining process
  • HPL: Heating plant
  • IPS: Inter-period storage
  • NST: Night storage device
  • STG: General timeslice storage
  • STS: Simultaneous DayNite/Weekly/Seasonal storage
  • STK: Combined DayNite/Weekly/Seasonal and inter-period storage.
Region Specifies the region(s) where the process exists (comma-separated entries allowed).
  • Default: Applied to all regions if not specified.
  • Valid only in B-Y templates (regional data for SubRES processes must be provided in SubRES_<sector>_Trans files).
TechName The name of the process (e.g., MINCOA1), up to 32 characters.
  • Recommendation: Limit to 27 characters to account for potential VEDA2.0 additions (e.g., for vintaging or dummy imports).
ProcessDesc A descriptive name for the process (e.g., Domestic supply of Solid Fuels Step 1), up to 255 characters.
Tact The activity unit of the process (e.g., PJ). Users must ensure unit consistency.
Tcap The capacity unit of the process. Users must ensure unit consistency.

Tslvl

The operational time-slice level of the process. Valid entries:

  • ANNUAL
  • SEASON
  • WEEKLY
  • DAYNITE

Default behavior:

  • DAYNITE for ELE, STGTSS, and STGIPS processes.
  • SEASON for CHP and HPL processes.
  • ANNUAL for all other process types.
PrimaryCG The Primary Commodity Group (PCG) of the process.
  • Normally, this is left unspecified as VEDA assigns a default PCG.
  • Specify only if overriding the default or creating a new PCG.
Vintage Indicates whether the process uses vintage tracking. Valid entries:
  • YES: Vintage tracking enabled.
  • NO (default): Vintage tracking disabled.

Note

Comma-separated entries are allowed for applicable columns (e.g., Region, Sets).

Example Layout

Below is an example of a ~FI_PROCESS table:

~FI_PROCESS Region TechName ProcessDesc Tact Tcap Tslvl
US MINCOA1 Domestic supply of coal PJ MW ANNUAL
US EXPCOA1 Export process for coal PJ MW DAYNITE

Best Practices

  • Consistency: Ensure consistency in units for activity (Tact) and capacity (Tcap).
  • Region-Specific Data: Use the Region column only in B-Y templates, and provide SubRES process regional data in appropriate SubRES transaction files.
  • Naming: Keep process names concise (maximum 27 characters recommended) to avoid issues with internal naming extensions in VEDA2.0.
  • Default Values: Allow defaults (e.g., Tslvl, PrimaryCG, Vintage) unless specific customizations are required.

By defining processes in the ~FI_PROCESS table, users create a robust framework for modeling non-numerical characteristics, ensuring clarity and consistency across the energy system model.

Flexible Import Table (~FI_T)

Preparing input data for models usually imposes a significant data processing burden on the modeler because the input is expected in a particular format, which is different from the format that is used to maintain the data.

The Flexible Import Table (~FI_T) is a versatile table used primarily to create the model topology, defining process inputs, outputs, and parameters in Base-Year (B-Y) templates and SubRES files. Its flexible structure allows users to specify parameters and their numerical values with minimal intervention. Data is imported as provided, without modification during the import process.

Key Features

  1. Flexible Structure

    • The table layout can be adapted to match source data, minimizing preprocessing efforts.
    • Indexes for attributes such as region, year, and timeslice can be specified as either row identifiers or column headers.
  2. Direct Data Import

    • Data is not altered or expanded during import.
    • This behavior is consistent with the UC tables (see Section 2.4.7), making it ideal for precise, user-defined parameter definitions.
  3. Row and Column Organization

    • Row identifiers and column headers define the dimensions for data rows.
    • Numerical data is input directly into the corresponding cells.

Layout and Regions

The ~FI_T table consists of six distinct regions:

  1. Row ID Column Headers These columns define the dimensions for data rows. Valid headers are listed below (see Table 3 for details):

    • Region: Declares the region.
    • TechName: Declares the technology name.
    • Comm-IN / Comm-IN-A: Input commodities / Auxiliary input commodities.
    • Comm-OUT / Comm-OUT-A: Output commodities / Auxiliary output commodities.
    • Attribute: Defines the attribute (e.g., DEMAND, ACT_BND).
    • Year: Specifies the year(s); comma-separated values are allowed.
    • TimeSlice: Specifies time slices; comma-separated values are allowed.
    • LimType: Specifies limit types (UP, LO, FX, N).
    • CommGrp: User-defined commodity group.
    • Curr: Currency declaration.
    • Stage / SOW: Multi-stage decision points and states of the world for stochastic models.
    • Other_Indexes: Special dimensions required by certain attributes (e.g., EnvLimit attributes).

    Note: Comma-separated elements are allowed in these headers.

  2. Row Identifiers The specific elements for the dimensions defined in the row ID column headers.

  3. Data Area Column Headers Columns define additional dimensions for the data. These can include:

    • Attribute
    • Year
    • TimeSlice
    • LimType
    • Commodity
    • CommGrp (internal VEDA groups only: DEMO, DEMI, NRGO, etc.)
    • Region
    • Currency

    Multiple dimensions can be combined in column headers, separated by a ~.

  4. Data Numerical values that correspond to the row and column dimensions.

  5. Table-Level Declarations Global declarations in the table header (following a colon :) apply to all data without an explicit index value. Example: ~FI_T: DEMAND assigns DEMAND as the attribute for all rows lacking a specific attribute.

  6. Comments Comment rows can be identified by:

    • A * character at the beginning of any cell in the row.
    • A \I: prefix, which is safer and avoids confusion with wildcard or operation symbols.

Example Layout

~FI_T Region TechName Comm-IN Attribute 2020~UP
US PowerPlant1 Coal ACT_BND 500
US PowerPlant1 NaturalGas ACT_BND 200

In this example:

  • The table defines activity bounds (ACT_BND) for the PowerPlant1 process in the US region for the year 2020.
  • Coal has an upper bound of 500, and Natural Gas has an upper bound of 200.

Best Practices

  • Ensure row and column dimensions are clearly defined and consistent.
  • Use the ~FI_T placement correctly, preceding the first data column to allow for flexible row identifiers.
  • Use table-level declarations to simplify repetitive data entries.
  • Avoid using * for comments when it might conflict with wildcard usage; prefer \I: for clarity.

By leveraging the flexibility of the ~FI_T table, users can efficiently configure process inputs, outputs, and parameters, aligning the model structure with source data seamlessly.