— WORK IN PROGRESS —

Solving SPAMc

The General Algebraic Modeling System (GAMS) Release 25.0 (GAMS Development Corporation 2019) was used to solve SPAMc. To solve the inconsistencies, we start by inspecting the data for common errors (e.g. data entry errors in the subnational statistics) and, if needed, repair them. If there are still problems, we adjusted the data adopting a hierarchy of ‘credibility’ in the following decreasing order of importance:

  1. Agricultural statistics
  2. Cropland
  3. Irrigated area

The agricultural statistics were not changed, except when the model proved to be infeasible and after all other modification options were exhausted. If there are inconsistencies with cropland and irrigated area, values are scaled up so that they match with the statistical totals reported for the smallest available administrative unit, while at the same time, checking that the corresponding totals at higher administrative units also continue to align Wood-Sichra, Joglekar, and You (2016) presents more details about the various procedures.

Slacks are needed to distribute the crops that belong to the subsistence farming system in the maximize score mnodel. The equation that fixes the allocation of these crops proportional to rural population density will almost never be within the bounds of the model solution that are set by the other constraints. To ensure a feasible solution, a slack variable is essential.

How to deal with slack

Model dimensions

Number of crops

SPAMc models 40 different crop (and crop groups) that together cover the full agricultural sector and are each identified by a four letter code (Table 1).1 The main reason for this classification is the limited availability of crop-specific biophysical suitability maps, which form a key element in the crop allocation process (see spatial data for more information). It would be relatively easy to add new crops by splitting them off from broader crop groups (e.g. tropical and temperate fruits, and vegetables) if appropriate agricultural statistics and suitability maps would be available. We plan to add an example on how to do this in future updates. The actual number of crops in the model is determined by the number of crops that are actually grown in the target country and identified by the availability of national statistics.

# Add 40 crop table

Number of farming systems

Also similar to global SPAM, SPAMc distinguises between four different farming systems:

  • Rainfed subsistence
  • Rainfed low-input
  • Rainfed high-input
  • Irrigated

References

GAMS Development Corporation. 2019. “General Algebraic Modeling System (GAMS).” Fairfax, VA. www.gams.com.

Wood-Sichra, Ulrike, Alison B. Joglekar, and Liangzhi You. 2016. “Spatial Producion Allocation Model (SPAM) 2005: Technical Documentation.” Harvest Choice Working Paper. Washington, D.C.: International Food Policy Research (IFPRI).


  1. Global SPAM uses 42 different crops because it includes two types of millet and two types of coffee (Wood-Sichra, Joglekar, and You 2016). As this level of detail is not supported by most national statistics and FAOSTAT, the have been merged into millet and coffee, respectively.↩︎