Set definition#
It is important to understand how sets are defined in the EPM model, as they are crucial for the model’s structure and data handling. Sets in GAMS are collections of elements that can be used to index parameters, variables, and equations.
Set definition#
Sets are declared at the beginning of the base.gms file. Example:
Sets
g 'generators or technology-fuel types'
f 'fuels'
tech 'technologies'
y 'years'
q 'quarters or seasons'
d 'day types'
t 'hours of day'
z 'zones'
c 'countries'
zext 'external zones'
hh 'Hydrogen production units'
;
These sets are populated in main.gms, either by reading them directly (e.g. y from y.csv) or implicitly through data parameters.
An implicit definition is identified by the < syntax in the parameter declaration:
Parameter
* Generator data
pGenDataInput(g<,z,tech<,f<,*) 'Generator data from Excel input'
This implies that the fuel set f is defined by all the sets that appear in the file pGenDataInput
Set definition in EPM#
We discuss here where the main sets are being defined:
q (season): defined in
pHoursd (days): defined in
pHourst (hours): defined in
pHoursz (zones): defined in
zcmapc (countries): defined in
zcmapg (generators): defined in
pGenDataInputf (fuels): defined in
pGenDataInputtech (techs): defined in
pGenDataInput