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\) |
|
|
model periods prior to the beginning of the optimization time horizon |
\(\text{P}^f\) |
|
|
model periods within the optimization time horizon |
\({}^*\text{P}^o\) |
|
|
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}\) |
|
|
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}\) |
|
|
intraday time divisions; each entry carries an |
\(\text{S}\) |
|
|
intra-annual divisions (e.g. seasons or representative days); each entry carries a |
|
|
superimposed sequential seasons used for seasonal storage and inter-season ramping; only required when |
The sets in the table below define Temoa’s representation of regions.
Set |
Database Table |
Model Element |
Notes |
|---|---|---|---|
\(\text{R}\) |
|
|
distinct geographical regions |
|
|
set of all the possible combinations of interregional exchanges plus original region 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}\) |
|
|
all technologies to be modeled (in v4, all technologies are production-type: \(T = T^p\)) |
\(\text{T}^p\) |
|
|
all production technologies, including baseload and storage (\({T}^b \cup {T}^s \subset {T}^p\)) |
\(\text{T}^b\) |
|
|
baseload electric generators, which have constant output across intraday time segments (\({T}^b \subset T\)) |
\(\text{T}^s\) |
|
|
all storage technologies (\({T}^s \subset T\)) |
\(\text{T}^a\) |
|
|
technologies that produce constant annual output (\({T}^a \subset T\)) |
\(\text{T}^{res}\) |
|
|
electric generators contributing to the reserve margin requirement (\({T}^{res} \subset T\)) |
\(\text{T}^c\) |
|
|
technologies with curtailable output and no upstream cost (\({T}^c \subset (T - T^{res})\)) |
\(\text{T}^f\) |
|
|
technologies producing excess commodity flows (\({T}^f \subset T\)) |
\(\text{T}^x\) |
|
|
technologies used for interregional commodity flows (\({T}^x \subset T\)) |
\(\text{T}^{ur}\) |
|
|
electric generators with a ramp up hourly rate limit; derived from |
\(\text{T}^{dr}\) |
|
|
electric generators with a ramp down hourly rate limit; derived from |
\(\text{T}^{ret}\) |
|
|
technologies allowed to retire before end of life (\({T}^{ret} \subset (T - T^{u})\)) |
\(\text{T}^u\) |
|
|
technologies that have no bound on capacity (\({T}^u \subset (T - T^{res})\)) |
\(\text{T}^{ss}\) |
|
|
seasonal storage technologies; requires both storage flag and seas_stor column (\({T}^{ss} \subset T^s\)) |
|
|
named groups for use in group constraints |
|
|
|
each technology belonging to each group |
|
\(\text{T}^e\) |
|
|
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\) |
|
|
end-use demand commodities, representing the final consumer demands |
\(\text{C}^e\) |
|
|
emission commodities (e.g., \(\text{CO}_\text{2}\) \(\text{NO}_\text{x}\)); filtered by flag |
\(\text{C}^p\) |
|
|
superset of physical, source, annual, and their waste variants; includes all non-demand, non-emission commodities |
\(\text{C}^w\) |
|
|
commodity whose production can be greater than its consumption; can be physical, annual, or neither (not balanced, all wasted) |
\(\text{C}^a\) |
|
|
commodities whose flows are only balanced over each period, not per-timeslice (\(\text{C}^a \subset \text{C}^p\)) |
\({}^*\text{C}^l\) |
|
derived set of commodities produced by a flex technology (\(\text{C}^l \subset \text{C}^p\)); auto-populated from |
|
\(\text{C}^s\) |
|
|
primary source commodities, not balanced by |
\({}^*\text{C}^c\) |
|
union of physical, demand, and waste commodities, (\(\text{C}_p \cup \text{C}_d \cup \text{C}^w\)) |
|
\({}^*\text{C}\) |
|
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 |
|---|---|---|---|
|
|
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 |
|---|---|---|
|
technologies eligible for capacitization; computed as tech_all - tech_uncap |
|
|
technologies or groups combined; union of tech_group_names | tech_all |
|
\({}^*\text{C}^c\) |
|
physical energy carriers and end-use demands; union of physical, demand, and waste commodities |
\({}^*\text{C}\) |
|
union of all commodity sets; union of carrier and emissions commodities |
\(\text{T}^e\) |
|
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_loansactive_flow_rpsditvo,active_flow_rpitvoVarious vintage and operational tracking dictionaries
Time sequencing dictionaries (
time_next,time_next_sequential)