© Scott McDonald & Karen Thierfelder
An aggregation of a SAM requires that the database is (simultaneously) aggregated in at least two dimensions, i.e., the income and expenditure accounts are simultaneously aggregated to reduce the number commodities/activities, factors, trade partners and associated transactions, and if the database has different regions then also across regions. GAMS is an extremely efficient medium for implementing the calculations required to aggregate a large SAM, but setting up the sets and (set) mappings to control the aggregation is potentially time consuming and subject to errors. One method for reducing the time costs involved in setting up a new aggregation, and simultaneously reducing the time required to configure the sets and other data needed to implement a version of GLOBE or STAGE with a new aggregation, is to use the SAMgator software (PROVIDE, 2004).
SAMgator is a Visual Basic for Applications (VBA) programme implemented using Microsoft (MS) Excel. The user declares, describes and defines the new (aggregated) sectors (commodities and activities), factors and regions in an Excel template, identifies the source and destination data files and then runs GAMS remotely from within the Excel programme . The SAMgator programme generates the set and mapping files, checks to ensure that all the mappings are ‘legal’ and then generates the GAMS programme file.
SAMGator was coded by Melt van Schoor under the auspices of the PROVIDE project that was run by Cecilia Punt at Elsenberg in the Western Cape of South Africa.
As Excel evolves/changes so there are changes in VBA.