Contents

In a mathematical model like Temoa, sets are used to index parameters and variables. To enable the modeler to translate between the algebraic formulation, input database, and model code, we provide the mathematical notation used in the model formulation, as well as the associated names in the Python code and database schema in the tables below. The code representation is more verbose than the algebraic version, using full words.

Our discussion of sets is broken down into several logical categories to make it easier to parse. The first group of sets pertains to Temoa’s treatment of time, as shown below. Note: Some entries in the “Database Table” column are comma-separated. In those cases, the first element refers to the name of the database table, and the second refers to specific column within the database table used to identify a specific subset. For example, in the first table below, time_period is the master set and time_exist is a subset that defines the user-defined model time periods to define historical technology vintages that exist prior to the model’s time horizon for optimization.

Set

Database Table

Model Element

Notes

\(\text{P}^e\)

time_period, flag = e

time_exist

model periods prior to the beginning of the optimization time horizon

\(\text{P}^f\)

time_period, flag = f

time_future

model periods within the optimization time horizon

\({}^*\text{P}^o\)

time_period

time_optimize

model time periods to optimize, (\(\text{P}^f - \text{max}(\text{P}^f)\)); the last time period is removed as it represents the end of the final period

\({}^*\text{V}\)

time_period

vintage_exist, vintage_optimize, vintage_all

tech vintages, (\(\text{P}^e \cup \text{P}^o\)), derived from time period set and used to track technology vintages across time periods

\(\text{D}\)

time_of_day

time_of_day

intraday time divisions; each entry carries an hours value (default 1) specifying how many hours it represents

\(\text{S}\)

time_season

time_season

intra-annual divisions (e.g. seasons or representative days); each entry carries a segment_fraction giving its share of the year; ordered by sequence column

time_season_sequential

time_season_sequential, ordered_season_sequential

superimposed sequential seasons used for seasonal storage and inter-season ramping; only required when time_sequencing = 'representative_periods'

The sets in the table below define Temoa’s representation of regions.

Set

Database Table

Model Element

Notes

\(\text{R}\)

region

regions

distinct geographical regions

region

regional_indices

set of all the possible combinations of interregional exchanges plus original region indices

regional_global_indices

set of all used combinations of interregional exchanges plus original region indices and groups

The sets below define how technologies are represented within Temoa. Because technologies can serve many different functions across an energy system, we need to define a large number of technology subsets.

Set

Database Table

Model Element

Notes

\({}^*\text{T}\)

technology

tech_all

all technologies to be modeled (in v4, all technologies are production-type: \(T = T^p\))

\(\text{T}^p\)

technology, flag LIKE 'p%'

tech_production

all production technologies, including baseload and storage (\({T}^b \cup {T}^s \subset {T}^p\))

\(\text{T}^b\)

technology, flag = pb

tech_baseload

baseload electric generators, which have constant output across intraday time segments (\({T}^b \subset T\))

\(\text{T}^s\)

technology, flag = ps

tech_storage

all storage technologies (\({T}^s \subset T\))

\(\text{T}^a\)

technology, annual = 1

tech_annual

technologies that produce constant annual output (\({T}^a \subset T\))

\(\text{T}^{res}\)

technology, reserve = 1

tech_reserve

electric generators contributing to the reserve margin requirement (\({T}^{res} \subset T\))

\(\text{T}^c\)

technology, curtail = 1

tech_curtailment

technologies with curtailable output and no upstream cost (\({T}^c \subset (T - T^{res})\))

\(\text{T}^f\)

technology, flex = 1

tech_flex

technologies producing excess commodity flows (\({T}^f \subset T\))

\(\text{T}^x\)

technology, exchange = 1

tech_exchange

technologies used for interregional commodity flows (\({T}^x \subset T\))

\(\text{T}^{ur}\)

ramp_up_hourly

tech_upramping

electric generators with a ramp up hourly rate limit; derived from ramp_up_hourly table (\({T}^{ur} \subset T\))

\(\text{T}^{dr}\)

ramp_down_hourly

tech_downramping

electric generators with a ramp down hourly rate limit; derived from ramp_down_hourly table (\({T}^{dr} \subset T\))

\(\text{T}^{ret}\)

technology, retire = 1

tech_retirement

technologies allowed to retire before end of life (\({T}^{ret} \subset (T - T^{u})\))

\(\text{T}^u\)

technology, unlim_cap = 1

tech_uncap

technologies that have no bound on capacity (\({T}^u \subset (T - T^{res})\))

\(\text{T}^{ss}\)

technology, flag = 'ps' AND seas_stor = 1

tech_seasonal_storage

seasonal storage technologies; requires both storage flag and seas_stor column (\({T}^{ss} \subset T^s\))

tech_group

tech_group_names

named groups for use in group constraints

tech_group_member

tech_group_members

each technology belonging to each group

\(\text{T}^e\)

existing_capacity

tech_exist

existing technologies with a past vintage (\({T}^e \subset T\))

The sets below define commodities that are consumed and produced by different energy technologies.

Set

Database Table

Model Element

Notes

\(\text{C}^d\)

commodity, flag = d

commodity_demand

end-use demand commodities, representing the final consumer demands

\(\text{C}^e\)

commodity, flag = e

commodity_emissions

emission commodities (e.g., \(\text{CO}_\text{2}\) \(\text{NO}_\text{x}\)); filtered by flag

\(\text{C}^p\)

commodity, flag IN (p, wp, s, a, wa)

commodity_physical

superset of physical, source, annual, and their waste variants; includes all non-demand, non-emission commodities

\(\text{C}^w\)

commodity, flag IN (w, wa , wp)

commodity_waste

commodity whose production can be greater than its consumption; can be physical, annual, or neither (not balanced, all wasted)

\(\text{C}^a\)

commodity, flag IN (a, wa)

commodity_annual

commodities whose flows are only balanced over each period, not per-timeslice (\(\text{C}^a \subset \text{C}^p\))

\({}^*\text{C}^l\)

commodity_flex

derived set of commodities produced by a flex technology (\(\text{C}^l \subset \text{C}^p\)); auto-populated from tech_flex outputs

\(\text{C}^s\)

commodity, flag = s

commodity_source

primary source commodities, not balanced by CommodityBalance_constraint

\({}^*\text{C}^c\)

commodity_carrier

union of physical, demand, and waste commodities, (\(\text{C}_p \cup \text{C}_d \cup \text{C}^w\))

\({}^*\text{C}\)

commodity_all

union of all commodity sets; union of carrier and emissions commodities

There is an additional set that defines operators (=, <, >). While not strictly necessary, defining these operators as a set allows modelers to express constraints more efficiently.

Set

Database Table

Model Element

Notes

operator

operator

constraint operators

As indicated below, there are additional sets that are derived within the model code and thus do not appear in the database schema.

Set

Model Element

Notes

tech_with_capacity

technologies eligible for capacitization; computed as tech_all - tech_uncap

tech_or_group

technologies or groups combined; union of tech_group_names | tech_all

\({}^*\text{C}^c\)

commodity_carrier

physical energy carriers and end-use demands; union of physical, demand, and waste commodities

\({}^*\text{C}\)

commodity_all

union of all commodity sets; union of carrier and emissions commodities

\(\text{T}^e\)

tech_exist

technologies with existing capacity; derived from existing_capacity table

There are also python dictionaries and sets used to specify internal data structures during model construction and are not considered formal model elements:

  • process_inputs, process_outputs, process_loans

  • active_flow_rpsditvo, active_flow_rpitvo

  • Various vintage and operational tracking dictionaries

  • Time sequencing dictionaries (time_next, time_next_sequential)