How do I create a set to whose elements were added the first 4 letters of another set and the first 2 letters of the elements of another set? For example, I have 2 sets: one is composed of years and the other of quarters:
SET TY /2019`*`2040/;
`SET TQ /Q1`*`Q4/;
And I need another set that is the Cartesian product of both, but in a single value for each element:
SET T /2019Q1*2019Q4,2020Q1*2020Q4… 2040Q1*2040Q4/;
In Stata for example, I would do this:
Global year “2019 2020 2021 … 2040 “
Global quarter “Q1 Q2 Q3 Q4”
Foreach y of global year {
Foreach q of global quarter{
Global T = ‘y’ ‘q’
…
}}
How can I did this in GAMS?