Gams makes aggregating tables quite easy. Imagine you a table with data for 100 sectors but you want to run your model in the testing phase for an aggregation of these sectors (e.g. an aggregate the 100 sectors to the three sector groups “agriculture”, “industry”, and “services”). This is a typical situation in CGE (computable general equilibrium modeling): you have a social accounting matrix for your country and you want to start with a simple model having only a few sectors, one household, no taxes, and no government).
In Gams you simply introduce a mapping that maps the 100 sectors … Read the rest “Aggregating tables in Gams in a flexible way using mappings and compile-time variables”