I am trying to define some sets dynamically with set operations (in my case the "-" operation). However, the "-" operation seems to apply only during the execution phase, and when using this set when defining other sets, gams fails with the following error: 644 set.ident or #.ident has undefined data. I believe the issue is that the set defined with the minus operation does not get created until the execution phase.
I could not find a solution to create the set during the compilation phase. Any help appreciated, with a minimal reproducible example below.
set alphabet /
"a"
"b"
"c"
/;
set a(alphabet) /
"a"
/;
sets bc(alphabet);
bc(alphabet) = alphabet(alphabet) - a(alphabet);
set test1(alphabet)
/
#a
/;
set test2(alphabet)
/
#a
#bc
/;
set test3(alphabet)
/
set.a
/;
set test4(alphabet)
/
set.a
set.bc
/;