Using code snippets in Gams: batinclude

One of the important rules of good programming is the DRY principle: Don’t Repeat Yourself. After repeating myself too often, I decided to start working with code snippets and macros for often used code. Here is an example of code I use very often. Suppose you want to aggregate your data from your input-output table to more aggregated version, for example, from 87 sectors to only 5 sectors, so you can test your model more easily). In GAMS you do this with a mapping, where you map the 87 sectors to the 5 sectors. This mapping can then be used
Read the rest “Using code snippets in Gams: batinclude”