You use the wrong index for investments: in your table, it is indexed by “SI”, and in your model by “S-I”.

You should force GAMS to check your table on errors like these by defining SAM over the set of all SAM elements. E.g.:

set ac All SAM elements
/a_min, apetroil, a_ael, ane c_min, ... and the rest of the SAM elements /.
alias(ac, aac);
parameter sam(ac, aac);

If you now would read SAM from the excel sheet, GAMS would complain about using sam(“S-I”, …) as “S-I” is not an element of SAMELE

Furthermore, it is better to use the gdxxrw utility as it has many more possibilities. You could, for example, read the first row of your SAM table as a set and read the first column to add elements not part of the row. One of my main pieces of advice to GAMS users is to study the gdxxrw extensively as it can save you so much time.

If you read a SAM from a table you should always check if the table is consistent (e.g. sum of row = sum of column).