User Tools

Site Tools


scenario_simulation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scenario_simulation [2020/04/25 06:57] matszscenario_simulation [2023/09/08 12:07] (current) – [Land use, land use change and forestry (LULUCF)] massfeller
Line 25: Line 25:
  
 **Figure 13: Link of modules in CAPRI** **Figure 13: Link of modules in CAPRI**
-{{::figure13.png?600|Source: CAPRI Modelling System. Note: the number of regions is outdated in December 2011}} +{{::figure_13.png?600|Source: CAPRI Modelling System. Note: the number of regions is outdated in December 2011}} 
  
 =====Module for agricultural supply at regional level===== =====Module for agricultural supply at regional level=====
Line 65: Line 65:
 ====Detailed discussion of the equations in the supply model==== ====Detailed discussion of the equations in the supply model====
  
-The definition of the supply model can be found in //‘supply\supply_model.gms’//+The definition of the supply model can be found in //‘supply/supply_model.gms’//
  
 ===Feed block=== ===Feed block===
Line 117: Line 117:
 Where “asym” is the land asymptote, i.e. the maximal amount of economically usable agricultural area in a region when the agricultural land rent goes towards infinity. For an application where the land market is used see Renwick et al. (2013). Where “asym” is the land asymptote, i.e. the maximal amount of economically usable agricultural area in a region when the agricultural land rent goes towards infinity. For an application where the land market is used see Renwick et al. (2013).
  
-Set aside policies have changed frequently during CAP reforms. The recent specification is covered in the context of the premium modelling in Section [[Premium module]]. The obligatory set-aside restriction introduced by the McSharry reform 1992 and valid until the implementation of the Luxembourg compromise of June 2003 has been explicitly modelled through this equation:+Set aside policies have changed frequently during CAP reforms. The recent specification is covered in the context of the premium modelling in Section [[scenario simulation#Premium module]]. The obligatory set-aside restriction introduced by the McSharry reform 1992 and valid until the implementation of the Luxembourg compromise of June 2003 has been explicitly modelled through this equation:
  
 \begin{align} \begin{align}
Line 269: Line 269:
 In the case of quotas (milk, for sugar beet) the sales to the market may be bounded (noting that NETTRD = v_netPutQuant in the code): In the case of quotas (milk, for sugar beet) the sales to the market may be bounded (noting that NETTRD = v_netPutQuant in the code):
  
-{{::code_p_150.png?600|}}+{{::code_p_150.png?600}}
  
 As described in the data base chapter, the concept of the EAA requires a distinction between young animals as inputs and outputs, where only the net trade is valued in the EAA on the output side. Consequently, the remonte expressed as demand for young animals on the input side must be mapped into equivalent ‘net import’ of young animals on the output side: As described in the data base chapter, the concept of the EAA requires a distinction between young animals as inputs and outputs, where only the net trade is valued in the EAA on the output side. Consequently, the remonte expressed as demand for young animals on the input side must be mapped into equivalent ‘net import’ of young animals on the output side:
Line 337: Line 337:
 \end{matrix} \end{matrix}
 \right] \right]
- 
 \end{split} \end{split}
 \end{align} \end{align}
Line 351: Line 350:
 \end{align} \end{align}
  
-The scaling factor to map from the legal quota legalquotA (as the B quota has been eliminated in the sugar reform, it holds that \(q^A = q^{A+B}\)to the behavioural quota qA depends on the projected sugar beet sales quantity in the calibration point \(NETTRD_{SUGB}^{cal} : For a country with a high over quota production (say 40%) we would obtain a scaling factor of 1.31, such that this producer will behave like a moderate C-sugar producer: responsive to both the C-beet prices as well as to the quota beet price (and the legal quotas). Without this scaling factor, producers with significant over quota p   roduction, like France and Germany, would not show any sizeable response to a 10% cut of either the legal quotas or the quota price (at empirically observed coefficients of variation). As it is likely that the profitability of ethanol beets benefit from cross-subsidisation from the quota beets such a zero responsiveness was considered implausible.+The scaling factor to map from the legal quota legalquotA (as the B quota has been eliminated in the sugar reform, it holds that \(q^A = q^{A+B} \)to the behavioural quota qA depends on the projected sugar beet sales quantity in the calibration point \( NETTRD_{SUGB}^{cal} \) : For a country with a high over quota production (say 40%) we would obtain a scaling factor of 1.31, such that this producer will behave like a moderate C-sugar producer: responsive to both the C-beet prices as well as to the quota beet price (and the legal quotas). Without this scaling factor, producers with significant over quota p   roduction, like France and Germany, would not show any sizeable response to a 10% cut of either the legal quotas or the quota price (at empirically observed coefficients of variation). As it is likely that the profitability of ethanol beets benefit from cross-subsidisation from the quota beets such a zero responsiveness was considered implausible. 
  
 ===Update note=== ===Update note===
Line 357: Line 357:
 A number of recent developments are not covered in the previous exposition of supply model equations A number of recent developments are not covered in the previous exposition of supply model equations
  
-  -A series of projects have added a distinction of rainfed and irrigated varieties of most crop activities which is the core of the so-called “CAPRI-water” version of the system((A more complete presentation is given in [[https://ec.europa.eu/jrc/en/publication/eur-scientific-and-technical-research-reports/extension-capri-model-irrigation-sub-module]].)). +   - A series of projects have added a distinction of rainfed and irrigated varieties of most crop activities which is the core of the so-called “CAPRI-water” version of the system 
-  -Several projects have added endogenous GHG mitigation options((These are most completely included in the “trunk” version of the CAPRI system. For details, see, for example, [[http://publications.jrc.ec.europa.eu/repository/bitstream/JRC101396/jrc101396_ecampa2_final_report.pdf]].))  +  - Several projects have added endogenous GHG mitigation options 
-  -Several new equations serve to explicitly represent environmental constraints deriving from the Nitrates Directive and the NEC directive((These are most completely included in the “trunk” version of the CAPRI system but developments are still ongoing.)).  +  - Several new equations serve to explicitly represent environmental constraints deriving from the Nitrates Directive and the NEC directive
-  -A complete area balance monitoring the land use changes according to the six UNFCCC land use types (cropland, grassland, forest land, wetland, settlements, residual land) has been introduced for carbon accounting+
  
 ====Calibration of the regional programming models====   ====Calibration of the regional programming models====  
Line 393: Line 392:
 Y_{j,t}=Y_{j,t-1}^{[\epsilon_jlog \frac{p_o,t-1}{p_t}]} Y_{j,t}=Y_{j,t-1}^{[\epsilon_jlog \frac{p_o,t-1}{p_t}]}
 \end{equation} \end{equation}
 +
 +
 +==== LULUCF in the supply model of CAPRI ====
 +
 +=== Introduction ===
 +
 +This technical paper explains how the most aggregate level of the CAPRI area allocation in the context of the supply models has been re-specified in the TRUSTEE ((https://www.trustee-project.eu/
 +)) and SUPREMA ((https://www.suprema-project.eu/)) projects and subsequently adopted in the CAPRI trunk. The former specification for land supply and transformation functions focused on agricultural land use and the transformation of agricultural land between arable land and grass land.
 +
 +During the subsequent period, CAPRI was increasingly adapted to analyses of greenhouse gas (GHG) emission studies. Examples include CAPRI-ECC, GGELS, ECAMPA-X, AgCLim50-X, (European Commission, Joint Research Centre), ClipByFood (Swedish Energy Board), SUPREMA (H2020). This vein of research is very likely to gain in importance in the future.
 +
 +In order to improve land related climate gas modelling within CAPRI, it was deemed appropriate to (1) extend the land use modelled to //all// available land in the EU (i.e. not only agriculture), and (2) to explicitly model //transitions// between land use classes. The pioneering work was carried out within the TRUSTEE project((https://www.trustee-project.eu/
 +)), but as always, an operational version emerged only after integrating efforts by researchers in several projects working at various institutions. Within the SUPREMA project another important change in the depiction of land use change was made: the Markov chain approach was replaced by prespecifying the total land transitions as average transitions per year times the projection. This paper focusses on the theory applied while data and technical implementation are only briefly covered.
 +
 +
 +=== A simple theory of land supply ===
 +
 +Recall the dual methodological changes attempted in this paper:
 +
 +  - Extend land use modelling to the entire land area, and
 +  - Explicitly model transitions between each pair of land uses
 +
 +In order to keep things as simple as possible, we opted for a theory where the decision of how much land to allocate to each use is independent of the explicit transitions between classes. This separation of decisions is simplifying the theoretical derivations, but also seem to have some support in theory: land use transitions show a good deal of stability over time. We would like to remind sceptics of this assumption that the converse is not implied: land transitions are certainly strongly depending on the land use requirements.
 +
 +The land supply and transformation model developed here is a bilevel optimization model. At the higher level (sometimes termed the //outer problem//), the land owner decides how much land to allocate to each aggregate land use based on the rents earned in each use and a set of parameters capturing the costs required in order to ensure that the land is available to the intended use. At the lower level (sometimes termed the //inner problem//), the transitions between land classes are modelled, with the condition that the total land needs of the outer problem are satisfied. The inner problem is modelled as a stochastic process involving no explicit economic model.
 +
 +For the outer problem, i.e. the land owner’s problem, we propose a quadratic objective function that maximizes the sum of land rents minus a dual cost function. The parameters of the dual cost function were specified in two steps:
 +
 +  - A matrix of land supply elasticities was estimated (by TRUSTEE partner Jean Saveur Ay, CESEAR, Dijon (JSA). This estimation might be updated in future work or replaced with other sources for elasticities.
 +  - The parameters of the dual cost function are specified so that the supply behaviour replicates the estimated elasticities as closely as possible while exactly replicating observed/estimated land use and land rents.
 +
 +The model is somewhat complicated by the fact that land use classes in CAPRI are defined somewhat differently compared to the UNFCCC accounting and also in the land transition data set. Therefore, some of the land classes used in the land transitions are different from the ones used in the land supply model. In particular, “Other land”, “Wetlands” and “Pasture” are differently defined. To reconcile the differences, we assumed constant shares of the intersections of the different sets, as explained below.
 +
 +=== Inner model – transitions ===
 +
 +A vector of supply of land of various types could result from a wide range of different transitions. The inner model determines the matrix of land transitions that is “most likely”. The concept of “most likely” is formalized by assuming a joint density function for the land transitions, based on the historically observed transitions. The model then is to find the transition matrix that maximizes the joint density function.
 +
 +== Gamma density ==
 +
 +Since each transition is non-negative, but in principle unlimited upwards, we opted for a gamma density function, that has the support $\lbrack 0,\infty\rbrack$. For those that cannot immediately recall what the gamma density function looks like, and as entertainment for those that can, Figure 1 shows the graph of the density function for different parameters, all derived from an assumed mode of “1” and different assumed ratios “mode/standard deviations” (that we called “acc” for “accuracy” in the figure).
 +
 +{{:wiki:gamma_dens_land.png?nolink|}}
 +
 +Figure 1: Gamma density graph for mode=1 and various standard deviations. “acc”="mode/standard deviation".
 +
 +Let $i$ denote land use classes in CAPRI definition, whereas //l// and //k// are land uses in UNFCCC classification. Let $\text{LU}_{k}$ be total land use after transitions and $\text{LU}_{l}^{\text{initial}}$ be land use before transitions. Furthermore, let $T_{\text{lk}}$ denote the transition of land from use $l$ to use $k$. Noting that it is simpler and fully equivalent to maximize a sum of logged densities than a product of densities, the likelihood maximization problem can be written (with //f// being the gamma density function)
 +
 +$${\max_{T_{\text{lk}}}{\log{\prod_{\text{lk}}^{}{f\left( T_{\text{lk}}|\alpha_{\text{lk}},\beta_{\text{lk}} \right)}}}}{= \max_{T_{\text{lk}}}{\sum_{\text{lk}}^{}{\log{f\left( T_{\text{lk}}|\alpha_{\text{lk}},\beta_{\text{lk}} \right)}}}}$$
 +
 +$$\Rightarrow \max_{T_{\text{lk}}}\sum_{\text{lk}}^{}\left\lbrack \left( \alpha_{\text{lk}} - 1 \right)\log T_{\text{lk}} - \beta_{\text{lk}}T_{\text{lk}} \right\rbrack$$
 +
 +subject to
 +
 +$$\text{LU}_{k} - \sum_{l}^{}T_{\text{lk}} = 0 \; \left\lbrack \tau_{k} \right\rbrack$$
 +
 +$$\text{LU}_{l}^{\text{initial}} - \sum_{k}^{}T_{\text{lk}} = 0\;\left\lbrack \tau_{l}^{\text{initial}} \right\rbrack$$
 +
 +$$\text{LU}_{k} - \sum_{i}^{}{\text{shar}e_{\text{ki}}\text{LEV}L_{i}} = 0$$
 +
 +The last equation is needed to convert land use in UNFCCC classification to land use in CAPRI classification, using a fixed linear transformation matrix $\text{shar}e_{\text{ki}}$. This discrepancy between land class accounts will be expanded on in a subsequent section. Forming the Lagrangian function and taking the derivatives with respect to land transitions gives the following first-order optimality conditions:
 +
 +$$\ \left( \alpha_{\text{lk}} - 1 \right)T_{\text{lk}}^{- 1} - \beta_{\text{lk}} + \tau_{k}^{} + \tau_{l}^{\text{initial}} = 0$$
 +
 +The parameters $\alpha$ and $\beta$ of the gamma density function were computed by assuming that (i) the observed transitions are the mode of the density, and (ii) the standard deviation equals the mode. Then the parameters are obtained by solving the following quadratic system:
 +
 +$$\text{mode} = \frac{\alpha - 1}{\beta}$$
 +
 +$$\text{variance} = \frac{\alpha}{\beta^{2}}$$
 +
 +== Annual transitions via Marcov chain in basic model ==
 +
 +The implementation in CAPRI differs from the above general framework in that it explicitly identifies the //annual// transitions in year t $T_{\text{lk}}^{t}$ from the initial $\text{LU}_{l}^{\text{initial}}$ land use to the final land use $\text{LU}_{k}$. This is necessary to identify the annual carbon effects occurring only in the final year in order to add them to the current GHG emissions, say from mineral fertiliser application in the final simulation year. If the initial year is the base year = 2008 and projection is for 2030, then the carbon effects related to the change from the 2008 $\text{LU}_{l}^{\text{initial}}$ to the final land use $\text{LU}_{k}$ (=$T_{\text{lk}}$in the above notation, without time index) refer to a period of 22 years that cannot reasonably be aggregated with the “running” non-CO2 effects from the final year 2030. Furthermore the historical time series used to determine the mode of the gamma density for the transitions also refer to annual transitions.
 +
 +Initially the problem to link total to annual transitions has been solved by assuming a linear time path from the initial to the final period, but this was criticised as being an inconsistent time path (by FW). Ultimately the time path has been computed therefore in the supply model in line with a static Markov chain with constant probabilities $P_{\text{lk}}$ such that both land use $\text{LU}_{l}^{t}$ as well as transitions $T_{\text{lk}}^{t}$ in absolute ha require a time index (e_luOverTime in supply_model.gms).
 +
 +$$\text{LU}_{k}^{t} - \sum_{l}^{}{P_{\text{lk}}\text{LU}_{l}^{t - 1}} = 0\ ,\ t = \{ 1,\ldots s\}$$
 +
 +Where $\text{LU}_{k}^{s}$ is the final land use in the simulation year s and $\text{LU}_{k}^{0} = \text{LU}_{k}^{\text{iniital}}$ is the initial land use. The transitions in ha in any year may be recovered from previous years land use and the annual (and constant) transition probabilities (e_LUCfromMatrix in supply_model.gms).
 +
 +$$T_{\text{lk}}^{t} = P_{\text{lk}}*\text{LU}_{l}^{t - 1}$$
 +
 +The absolute transitions may enter the carbon accounting (ignored here) and if we substitute the last period’s transitions we are back to the condition for consistent land balancing in the final period from above:
 +
 +$$\text{LU}_{k}^{s} = \sum_{l}^{}{P_{\text{lk}}\text{LU}_{l}^{s - 1}} = \sum_{l}^{}T_{\text{lk}}^{s}$$
 +
 +When using the transition probabilities in the consistency condition for initial land use we obtain
 +
 +$$\text{LU}_{l}^{\text{initial}} - \sum_{k}^{}T_{\text{lk}}^{1} = 0$$
 +
 +$$\Longleftrightarrow \text{LU}_{l}^{\text{initial}} = \sum_{k}^{}{P_{\text{lk}}^{}\text{LU}}_{l}^{\text{iniital}}$$
 +
 +$$\Leftrightarrow 1 = \sum_{k}^{}P_{\text{lk}}$$
 +
 +So the simple condition is that probabilities have to add up to one (e_addUpTransMatrix in supply_model.gms). 
 +
 +== Annual transitions if SUPREMA is active ==
 +
 +As the use of the Marcov-chain approach allows the annual transitions to be explicit model variables that could be used to compute annual carbon effects but leads to computational limitations especially in the market model a new approach was developed under SUPREMA (i.e. if %supremaSup% == on) by re-specifying the total land transitions as average transitions per year times the projection horizon and by considering for the remaining class without land use change (on the diagonal of the land transition matrix) only the annual carbon effects per ha, relevant for the case of gains via forest management.
 +
 +The new accounting in the CAPRI global supply model may be explained as follows, starting from a calculation of the total GHG effects G over horizon h = t-s from total land transitions L<sub>lk</sub> and carbon effects per ha for the whole period e<sub>lk</sub>:
 +
 +$$G = Γ*h = \sum_{i,l}^{}{e_{\text{il}}^{}\text{L}}_{il}^{}$$
 +
 +Where Γ collects the annual GHG effects that correspond to the total GHG effects divided by the time horizon G / h. These annual effects may be calculated as based on average annual transitions and annual effects for the remaining class as follows:
 +
 +$$Γ= \sum_{i,l}^{}{e_{\text{il}}^{}\text{L}}_{il}^{}/h = \sum_{i≠l}^{}{e_{\text{il}}^{}\text{Λ}}_{il}^{}
 ++ \sum_{i}^{}{ε_{\text{ii}}^{}\text{L}}_{ii}^{} $$
 +
 +Where Λ<sub>il</sub> = L<sub>il</sub> / h is the average land use change per year and ε<sub>ii</sub> is the annual carbon effect on a remaining class (relevant might be an annual increase due to growing forests while this will be zero for most effects based on IPCC default assumptions).
 +
 +Using these average annual transitions for true (off-diagonal) LUC we may compute the final classes as follows:
 +
 +$$ \text{LU}_{k,t} = \sum_{l}^{}{L_{\text{lk}}^{}\text{}}_{}^{} = \sum_{l≠k}^{}{Λ_{\text{lk}}^{}*h +\text{LU}_{kk}\text{}}_{}^{}$$
 +
 +While adding up of shares (or probabilities) of LUC from class I to k over all receiving classes k continues to hold as stated above. It should be highlighted that the land use accounting implemented under SUPREMA avoids the need to explicitly trace the annual transitions in the form of a Markov chain and thereby economised on equations and variables.
 +
 +
 +
 +=== Outer model – land supply ===
 +The outer problem is defined as a maximization of the sum of land rents minus a quadratic cost term, subject to the first order optimality conditions of the inner problem:
 +
 +$$\max{\sum_{i}^{}{\text{LEV}L_{i}r_{i}} - \sum_{i}^{}{\text{LEV}L_{i}c_{i}} - \frac{1}{2}\sum_{\text{ij}}^{}{\text{LEV}L_{i}D_{\text{ij}}\text{LEV}L_{j}}}$$
 +
 +subject to,
 +
 +$$\text{LU}_{k} - \sum_{i}^{}{\text{shar}e_{\text{ki}}\text{LEV}L_{i}} = 0$$
 +
 +$$\text{LU}_{k} - \sum_{l}^{}T_{\text{lk}} = 0\;\left\lbrack \tau_{k} \right\rbrack$$
 +
 +$$\text{LU}_{l}^{\text{initial}} - \sum_{k}^{}T_{\text{lk}} = 0\;\left\lbrack \tau_{l}^{\text{initial}} \right\rbrack$$
 +
 +$$\ \left( \alpha_{\text{lk}} - 1 \right)T_{\text{lk}}^{- 1} - \beta_{\text{lk}} + \tau_{k}^{} + \tau_{l}^{\text{initial}} = 0$$
 +
 +The parameters of the inner model **α** and **β// //**may be determined as explained in the previous sections. For the outer model, we need to define the parameters **c** and **D**. We have a single data point of land use and land rent for each land use class. Since we have, for $N$ land classes, $N + N(N - 1)/2$ parameters, but only $N$ price-quantity pairs (one data point for each land class). This means that without any additional information, we could e.g. calibrate the model exactly by computing the **c** parameter, but have no information left for defining **D**//.// However, we have at our disposal prior estimates of the regional matrices of land supply elasticities that may be used to define prior densities for the elasticity matrix implied jointly by the **c** and **D** parameters and the inner problem. Another way of expressing this is that we compute a meta parameter matrix $\mathbf{\eta}\left( \mathbf{c},\mathbf{D},\mathbf{L}\mathbf{U}^{\text{initial}} \right)$ that is a function of the real parameters, and use the prior elasticity matrix as a prior for this meta parameter. If cast in this way, the problem becomes a Bayesian econometric estimation.
 +
 +There are a few methodological and numerical challenges to overcome. In particular, we need to (i) analytically derive $\mathbf{\eta}\left( \mathbf{c},\mathbf{D},\mathbf{L}\mathbf{U}^{\text{initial}} \right)$, and (ii) ensure that the resulting model has the appropriate curvature to ensure a unique interior solution – anything else would result in a rather useless model. We start by simplifying the problem by observing that all the constraints (the first order conditions of the inner problem) can be replaced with an ordinary land constraint:
 +
 +$$\sum_{i}^{}{\text{LEV}L_{i}} - \sum_{l}^{}{LU_{l}^{\text{initial}}} = 0$$
 +
 +Note that the second sum is a constant. This simplification is based on the observation that the land transitions don’t appear in the objective function of the outer problem, so that all solutions to the inner problems are equivalent from the perspective of the outer problem, and that any land use vector that preserves the initial land endowment is a feasible solution to the inner problem.
 +
 +Next, we formulate the first order condition (FOC) of the modified outer problem to obtain land use as an implicit function of the parameters, $F\left( LEVL,c,D,LU^{\text{initial}},r \right) = 0$. We can then use the implicit function theorem to compute the derivative of land supply $\text{LEV}L_{i}$ with respect to land rent $r_{j}$, which in turn can be used to define the elasticity matrix $\mathbf{\eta}$.
 +
 +The first order conditions, and the implicit function, become
 +
 +$$F\left( LEVL,\lambda,c,D,LU^{\text{initial}},r \right) = \begin{bmatrix}
 +\frac{\partial\mathcal{L}}{\partial LEVL_{i}} = & r_{i} - c_{i} - \sum_{j}^{}{D_{\text{ij}}\text{LEV}L_{j}} - \lambda & = 0 \\
 +\frac{\partial\mathcal{L}}{\partial\lambda} = & \sum_{i}^{}{\text{LEV}L_{i}} - \sum_{l}^{}{LU_{l}^{\text{initial}}} & = 0 \\
 +\end{bmatrix}$$
 +
 +In order to apply the implicit function theorem((Recall that the implicit function theorem states that if F(x,p) = 0, then dx/dp = -[dF/dx]<sup>-1</sup>[dF/dp]
 +)) we need to differentiate the FOC once w.r.t. the variables $\text{LEV}L_{i}$ and $\lambda$ and once with respect to the parameter of interest, $r_{j}$, invert the former and take the negative of the matrix product. If (currently) irrelevant parameter are omitted, the following matrix of $(N + 1) \times (N + 1)$ is obtained (the “+1” is the uninteresting derivative of total land rent $\lambda$ with respect to individual land class rent $r_{i}$)
 +
 +$$\left\lbrack \frac{\partial LEVL}{\partial r} \right\rbrack = - \left\lbrack D_{LEVL,\lambda}F(LEVL,\lambda,r) \right\rbrack^{- 1}D_{r}F(LEVL,\lambda,r)$$
 +
 +$$\begin{bmatrix}
 +\frac{\partial LEVL}{\partial r} \\
 +\frac{\partial\lambda}{\partial r} \\
 +\end{bmatrix} = - \begin{bmatrix}
 +\frac{\partial F}{\partial LEVL} & \frac{\partial F}{\partial\lambda} \\
 +\end{bmatrix}\left\lbrack \frac{\partial F}{\partial r} \right\rbrack$$
 +
 +Carrying out the differentiation specifically for land rent //r<sub>j</sub>//, we obtain:
 +
 +$$\begin{bmatrix}
 +\frac{\partial LEVL_{i}}{\partial r_{j}} \\
 +\frac{\partial\lambda}{\partial r_{j}} \\
 +\end{bmatrix} = - \begin{bmatrix}
 +\left\lbrack {- D}_{\text{ij}} \right\rbrack & - 1 \\
 + - 1' & 0 \\
 +\end{bmatrix}^{- 1}\begin{bmatrix}
 +I \\
 +0 \\
 +\end{bmatrix}$$
 +
 +Discarding the last row of the resulting $(N + 1) \times N$ matrix finally lets us compute the elasticity as
 +
 +$$\left\lbrack \eta_{\text{ij}} \right\rbrack = \left\lbrack \frac{\partial LEVL_{i}}{\partial r_{j}} \right\rbrack\left\lbrack \frac{r_{j}}{\text{LEV}L_{i}} \right\rbrack$$
 +
 +In the estimation, we assumed that the prior elasticity matrix is the mode of a density where each entry were independently distributed. Furthermore, the off-diagonal or any diagonal elements with negative priors were normally distributed, whereas the diagonal elements with positive priors (as required for a well-behaved curvature) were gamma distributed. For the standard deviation of elasticities we used either information from the prior estimates or some fall-back assumptions on standard deviations relative to the mode of elasticities. Denoting the prior elasticities with $e_{\text{ij}}$, we solved the following optimization problem, where parameters $\alpha$ and $\beta$ were already estimates as explained in the sections on the inner problem.
 +
 +$$\max_{\eta,c,D}{\sum_{ij \in normal(i,j)}^{}{- {\frac{1}{s_{\text{ij}}^{2}}\left( \eta_{\text{ij}} - e_{\text{ij}}^{\text{jsa}} \right)}^{2}} + \sum_{ij \in gamma(i,j)}^{}\left\lbrack \left( \alpha_{\text{ij}} - 1 \right)\log\eta_{\text{ij}} - \beta_{\text{ij}}\eta_{\text{ij}} \right\rbrack}$$
 +
 +subject to
 +
 +$$\left\lbrack \frac{\partial LEVL_{i}}{\partial r_{j}} \right\rbrack = - \begin{bmatrix}
 +\left\lbrack {- D}_{\text{ij}} \right\rbrack & - 1 \\
 + - 1' & 0 \\
 +\end{bmatrix}^{- 1}\begin{bmatrix}
 +I \\
 +0 \\
 +\end{bmatrix}$$
 +
 +$$\left\lbrack \eta_{\text{ij}} \right\rbrack = \left\lbrack \frac{\partial LEVL_{i}}{\partial r_{j}} \right\rbrack\left\lbrack \frac{r_{j}}{\text{LEV}L_{i}} \right\rbrack$$
 +
 +$$\begin{matrix}
 + & r_{i} - c_{i} - \sum_{j}^{}{D_{\text{ij}}\text{LEV}L_{j}} - \lambda & = 0 \\
 + & \sum_{i}^{}{\text{LEV}L_{i}} - \sum_{l}^{}{LU_{l}^{\text{initial}}} & = 0 \\
 +\end{matrix}$$
 +
 +and the curvature constraint using a stricter variant of the Cholesky factorization
 +
 +$$D_{\text{ij}}\left( 1 - \delta I_{\text{ij}} \right) = \sum_{k}^{}{U_{\text{ki}}U_{\text{kj}}}$$
 +
 +where $\delta$ is a small positive number and $I_{\text{ij}}$ entries of the identity matrix such that the factor $(1 - \delta I_{\text{ij}})$ shrinks the diagonal of the D-matrix, ensuring //strict// positive definiteness instead of //semi-//definiteness. We used $\delta = 0.05$. Furthermore, the Lagrange multiplier of the total land constraint, $\lambda$, was fixed at the weighted average of the rents $r_{i}$, i.e. $\lambda = \frac{\sum_{i}^{}{\text{LEV}L_{i}r_{i}}}{\sum_{i}^{}{\text{LEV}L_{i}}}$. Without the latter assumption, the parameters c and D are not uniquely identified.
 +
 +==Prior elasticities and area mappings==
 +
 +The empirical evidence obtained in the TRUSTEE project applied to prior elasticities for land categories based on Corine Land Cover (CLC) data. These categories are also covered in the CAPRI database based on various sources (see the database section in the CAPRI documentation):
 +
 +The introduction has mentioned already three systems of area categories that need to be distinguished. The first one is the set of area aggregates with good coverage in statistics that has been investigated recently by JS Ay (2016), in the following “JSA”:
 +
 +$$\text{LEVL} = \left\{ \text{ARAC},\ \text{FRUN},\ \text{GRAS},\ \text{FORE},\ \text{ARTIF},\text{OLND} \right\}$$
 +
 +Where
 +
 +ARAC = arable crops
 +
 +FRUN = perennial crops
 +
 +GRAS = permanent grassland
 +
 +FORE = forest
 +
 +ARTIF = artificial surfaces (settlements, traffic or industrial)
 +
 +OLND = other land
 +
 +The above categories are matching reasonably well with the definitions in JSA. A mismatch exists in the classification of paddy (part of ARAC in CAPRI but in the perennial group in JSA) and terrestrial wetlands (part of OLND in CAPRI and a separate category in JSA). Inland waters are considered exogenous in CAPRI and hence not included in the above set LEVL.
 +
 +For carbon accounting we need to identify the six LU classes from IPCC recommendations and official UNFCCC reporting:
 +
 +$$LU = \left\{ \text{CROP},\ \text{GRS}\text{LND},\ \text{FORE},\ \text{ARTIF},WETLND,RESLND \right\}$$
 +
 +which is typically indexed below with “l” or “k” ∈ LU and where
 +
 +CROP = crop land (= sum of arable crops and perennial crops)
 +
 +GRSLND = grassland in IPCC definition (includes some shrub land and other “nature land”, hence GRSLND>GRAS)
 +
 +WETLND = wetland (includes inland waters but also terrestrial wetlands)
 +
 +RESLND = residual land is that part of OLND not allocated to grassland or wetland, hence RESLND<OLND
 +
 +FORE = forest
 +
 +ARTIF = artificial surfaces
 +
 +In the CAPRI database, in particular for its technical base year, we have estimated an allocation of other land OLND into its components attributable to the UNFCCC classes GRSLND,WETLND, and RESLND:
 +
 +$$\text{OLND}^{0} = {\text{OLND}G}^{0} + {\text{OLND}W}^{0} + {\text{OLND}R}^{0}$$
 +
 +Lacking better options to make the link between sets LEVL (activity level aggregates) and LU (UNFCCC classes, technically in CAPRI code: set “LUclass”) we will assume that these shares are fixed and may estimate the “mixed” LU areas from activity level aggregates as follows
 +
 +^//GRSLND//^=^//GRAS + OLND · OLNDG<sup>0</sup>/OLND<sup>0</sup>//^
 +|WETLND    |=|//INLW + OLND · OLNDW<sup>0</sup>/OLND<sup>0</sup>//|
 +|RESLND    |=|//OLND · OLNDR<sup>0</sup>/OLND<sup>0</sup>//       |
 +
 +which means that the mapping from set LEVL to set LU only uses some fixed shares of LEVL areas that are mapped to a certain LU:
 +
 +$$LU_k=\sum_i{\text{share}_{\text{i,k}}\text{LEVL}_i}$$
 +
 +where 0 ≤ //share<sub>i,k</sub>// ≤ 1.
 +
 +===Technical implementation===
 +
 +The key equations corresponding to the approach explained above are collected in file supply_model.gms or the included files supply/declare_calibration_models_for_luc.gms and supply/declare_calibration_models_for_land_supply.gms. The declarations of parameters, variables, equations, models and even some sets only used in the calibration given in these files are included by the “supply_model.gms” only if “BASELINE==ON” or if it was a CAPREG base year task that was carried out. Loading of priors, initialisation of parameters and variables for the calibration as well as the organisation of solve attempts are handled in new sections of file “cal_land_nests.gms”, in turn called by the gams file “prep_cal.gms”. This implies that the land supply and land use change calibrations were inserted before the ordinary calibration of the supply models.
 +
 +//SupremaSup// should be active together with //trustee_land// to have smoother adjustments which may be set via the CAPRI GUI. In order to store the results of the calibration in a compact way that is compatible with the existing code, the existing parameter files “pmppar_XX.gdx” was used. The parameters of the land supply functions, called “c” and “D” above, were stored on two parameters “p_pmpCnstLandTypes” and “p_pmpQuadLandTypes”. As a new symbol (p_pmpCnstLandTypes) is introduced in an existing file, the first run of CAPRI after setting %trustee_land%==on may give errors if the file exists already but has been used with the previous land supply specification before. In this case it helps to delete or rename the old pmppar files.
 +
 +At this point, it should also be explained that rents for non-agricultural land types were entirely based on assumptions (a certain ratio to agricultural rents). As there were no plans to run scenarios with modified non-agricultural rents, these land rents //r// used in calibration for those land types were subtracted from the “c-paramter”, so that it is implicitly stored in p_pmpCnstLandTypes and enters the objective function through the PMP terms. This requires changes if the rents shall be modified or if non-agricultural production shall be included in some simplified form.
 +
 +Furthermore, the class Inland Waters (INLW) was given a special treatment: it is supposed to be entirely exogenous. For this purpose the special acronym “exogenousLandSupply” was introduced, and stored on the p_pmpCnstLandTypes and used to trigger an equation “e_exogenousLand “ in the supply model setting the variable to a constant. In that way, the fixity of INLW (or any land type, should it happen) is stored in the pmp terms and cannot be “forgotten”.
 +
 +More detailed explanations on the technical implementation are covered elsewhere, for example in the “Training material” included in the EcAMPA-4 deliverable D5.
 +
 +Concerning the improvements made under SUPREMA from a technical perspective, the changes are merged to the trunk. The approach is controlled by globals in capmod\set_global_variables.gms. If the global variable %supremaSup% == on, the yearly transition rate p_lucAnnualFac_sup is calculated. If it is %supremaSup% == off, the old approach using the Marcov chain is used with the respective variable v_luYearly. The FOC-approach to calculate LUC as described above is standard and independent from if the global variable supremaSup is on or off.
 +
 +=== Emission Equations ===
 +
 +Under EcAMPA 3 and partly in earlier projects (inter alia EcAMPA 2) new modelling outputs have been developed for indicators without matching reporting infrastructure helping users to organise the additional information. This applied for example to
 +
 +1) Additional CAPRI results on land use results related to the complete area coverage, mappings to UNFCCC area categories and their transitions;
 +
 +2) The carbon effects linked to these land transitions.
 +
 +Furthermore, additional non-CO2 and CO2 related mitigation measures had been included under EcAMPA 3.
 +
 +The scenarios including the emission equations are only run if %ghgabatement% == on, otherwise emissions are only calculated and not simulated.
 +
 +The following emission equations have been implemented:
 +
 +^**Code**          ^**Description**                                                                                                ^
 +|GWPA              |Agricultural emissions                                                                                         |
 +|CH4ENT            |Methane emissions from enteric fermentation                                                                    |
 +|CH4MAN            |Methane emissions from manure management                                                                       |
 +|CH4RIC            |Methane emissions from rice production                                                                         |
 +|N2OMAN            |Direct nitrous oxide emissions stemming from manure management (only housing and storage)                      |
 +|N2OAPP            |Direct nitrous oxide emissions stemming from manure application on soils except grazings per animal activity   |
 +|N2OGRA            |Direct nitrous oxide emissions stemming from manure managment on grazings                                      |
 +|N2OSYN            |Direct nitrous oxide emissions from anorganic fertilizer application                                           |
 +|N2OCRO            |Direct nitrous oxide emissions from crop residues                                                              |
 +|N2OAMM            |Indirect nitrous oxide emissions from ammonia volatilisation                                                   |
 +|N2OLEA            |Indirect nitrous oxide emissions from leaching                                                                 |
 +|N2OHIS            |Direct nitrous oxide emissions from cultivation of histosols                                                   |
 +|GLUC              |Emissions related to indirect land use changes                                                                 |
 +|CO2BIO            |Carbon dioxide emissions from land use change due to losses of carbon in biomass and litter                    |
 +|CO2SOI            |Carbon dioxide emissions from land use change due to soil carbon losses                                        |
 +|CO2HIS\\ \\ CH4HIS|Carbon dioxide emissions from the cultivation of histosols\\ \\ Methane emissions from cultivation of histosols|
 +|CO2LIM\\ \\ CO2BUR|Carbon dioxide emissions from limestone and dolomit\\ \\ Carbon dioxide emissions from burning                 |
 +|CH4BUR            |Methane emissions from burning                                                                                 |
 +|N2OBUR            |Nitrous oxide emissions from burning                                                                           |
 +|N2OSOI            |N2O emissions from land use change due to soil carbon losses                                                   |
 +|GPRD              |Emissions related to the production of non-agricultural inputs to agriculture                                  |
 +|N2OPRD            |Nitrous oxide emissions during fertilizer production                                                           |
 +|O2PRD             |Carbon Dioxide emissions during fertilizer production                                                          |
  
 =====Premium module===== =====Premium module=====
Line 440: Line 755:
   *ceilVal = Ceiling on the total budget (envelope) spent on the scheme   *ceilVal = Ceiling on the total budget (envelope) spent on the scheme
  
-In the basic setting, the ceilings work as the old Grandes Cultures payment: if the total quantity (hectares or amount) exceeds the ceiling, then the payment to each farmer is reduced so that the ceilings are respected. This means that the marginal payment is somewhat reduced but does not become zero. For some other schemes, such as the Basic Payment Scheme of the CAP 2014-2020, there is a hard limit on the number of payment entitlements, so that the marginal payment becomes zero if the ceiling is overshot. That behaviour can be triggered by including the payment scheme set element in a special set //PSDPAY_cutEndog//, as in the following example from “pol_input\mtr_until2013.gms”.+In the basic setting, the ceilings work as the old Grandes Cultures payment: if the total quantity (hectares or amount) exceeds the ceiling, then the payment to each farmer is reduced so that the ceilings are respected. This means that the marginal payment is somewhat reduced but does not become zero. For some other schemes, such as the Basic Payment Scheme of the CAP 2014-2020, there is a hard limit on the number of payment entitlements, so that the marginal payment becomes zero if the ceiling is overshot. That behaviour can be triggered by including the payment scheme set element in a special set //PSDPAY_cutEndog//, as in the following example from “pol_input/mtr_until2013.gms”.
  
  PSDPAY_cutEndog("DPSAPS" = YES; \\  PSDPAY_cutEndog("DPSAPS" = YES; \\
Line 452: Line 767:
 **Figure 14: Example of technical implementation of a premium scheme** **Figure 14: Example of technical implementation of a premium scheme**
  
-{{:figure14.png?600|}} \\ Source: CAPRI Modelling System. Note: The parameter PPDATA_E is now called p_premDataE.+{{:figure_14.png?600|Source: CAPRI Modelling System. Note: The parameter PPDATA_E is now called p_premDataE.}}
  
-The sets of payments, exemplified by DPGRCU in the figure, and the activity groups, exemplified by PGGRCU and PGPROT are defined in the file policy\policy_sets.gms. Since this is a “static” GAMS file used in any simulation, it contains the gross list of all policies that currently can be simulated, including legacy ones. In order to work efficiently with the acronyms which define the application types, these are converted to numerical attributes as shown below (//‘policy\policy.gms’)//:+The sets of payments, exemplified by DPGRCU in the figure, and the activity groups, exemplified by PGGRCU and PGPROT are defined in the file policy/policy_sets.gms. Since this is a “static” GAMS file used in any simulation, it contains the gross list of all policies that currently can be simulated, including legacy ones. In order to work efficiently with the acronyms which define the application types, these are converted to numerical attributes as shown below (//‘policy/policy.gms’)//:
  
-{{::code_p157.png?600|}}+{{::code_p157.png?600}}
  
-CAPRI also provides the possibility to incentivise extensification or intensification via the payments. Most production activities come in technological variants, by default one higher yielding and one lower yielding one, and those variants can be eligible to different rates of premium payments. This is used for instance in the implementation of agri-environmental schemes in the file policy\rd_logic.gms as shown in the figure below. The parameter p_technFact is the standard coefficient that modifies the technology of the production activities in CAPRI. In the figure below, the two statements change the rate of premium payments for the set of currently active regions (rs), for all model activities (MPACT), for all agri-environmental schemes (psdpay_ae) with different rates for technology T1 (high yield) and T2 (low yield) in the case where T2 exists. +0.5 for T2 means that the premium payment in the model becomes the nominal rate times (1 + 0.5), i.e. 50% higher, whereas the -0.5 for T1 means that the premium payment in the model becomes the nominal rate times (1 – 0.5), i.e. 50% lower. This approximates the stylized fact that agri-environmental schemes, which in reality consist of a wide range of measures, in general favour extensive technologies (see section on Pillar II payments below).+CAPRI also provides the possibility to incentivise extensification or intensification via the payments. Most production activities come in technological variants, by default one higher yielding and one lower yielding one, and those variants can be eligible to different rates of premium payments. This is used for instance in the implementation of agri-environmental schemes in the file policy/rd_logic.gms as shown in the figure below. The parameter p_technFact is the standard coefficient that modifies the technology of the production activities in CAPRI. In the figure below, the two statements change the rate of premium payments for the set of currently active regions (rs), for all model activities (MPACT), for all agri-environmental schemes (psdpay_ae) with different rates for technology T1 (high yield) and T2 (low yield) in the case where T2 exists. +0.5 for T2 means that the premium payment in the model becomes the nominal rate times (1 + 0.5), i.e. 50% higher, whereas the -0.5 for T1 means that the premium payment in the model becomes the nominal rate times (1 – 0.5), i.e. 50% lower. This approximates the stylized fact that agri-environmental schemes, which in reality consist of a wide range of measures, in general favour extensive technologies (see section on Pillar II payments below).
  
-{{:code_p158.png?600|}}+{{:code_p158.png?600}}
  
 The general flow of logic inside of CAPRI (inside the model file capmod.gms) as regards premiums is shown in the following figure. The process starts by loading baseline data, including calibrated behavioural parameters. That data set represents an equilibrium situation for the policy (premiums) that were used in the baseline generation process. The general flow of logic inside of CAPRI (inside the model file capmod.gms) as regards premiums is shown in the following figure. The process starts by loading baseline data, including calibrated behavioural parameters. That data set represents an equilibrium situation for the policy (premiums) that were used in the baseline generation process.
Line 473: Line 788:
 **Figure 15: General flow of logic of CAPRI model as regards premiums** **Figure 15: General flow of logic of CAPRI model as regards premiums**
  
-{{::fiugre15.png?600|}} \\ Source: own illustration+{{::figure_15.png?600|Source: own illustration}} 
  
-Generally, all attributes for a premium scheme are mapped down in space, e.g. from EU27 to EU 27 member states, from countries to NUTS1 regions inside the country, from there to the NUTS2 regions inside the NUTS1, and from NUTS2 regions to the farm types in a NUTS2 region (see //‘policy\policy.gms’//), e.g.+Generally, all attributes for a premium scheme are mapped down in space, e.g. from EU27 to EU 27 member states, from countries to NUTS1 regions inside the country, from there to the NUTS2 regions inside the NUTS1, and from NUTS2 regions to the farm types in a NUTS2 region (see //‘policy/policy.gms’//), e.g.
  
-{{:code_p159.png?600|}}+{{:code_p159.png?600}}
  
 In order to map the premium rate as defined in a legal text into one paid out on a per-activity basis, the relevant activity based attribute matching the application type is set to a premium modification factor (“Ap_premModfFactT”) as shown below: In order to map the premium rate as defined in a legal text into one paid out on a per-activity basis, the relevant activity based attribute matching the application type is set to a premium modification factor (“Ap_premModfFactT”) as shown below:
  
-{{:code_p159_2.png?600|}}+{{:code_p159_2.png?600}}
  
 The actually declared premium per activity unit (ha, [1000] [slaughtered] heads) is then the multiplication of the premium rate and that modification factor. For crops, the unit of the resulting entries are current € per ha, for animal, it depends on the exact definition of the activity level (per [1000] [slaughtered] heads). The actually declared premium per activity unit (ha, [1000] [slaughtered] heads) is then the multiplication of the premium rate and that modification factor. For crops, the unit of the resulting entries are current € per ha, for animal, it depends on the exact definition of the activity level (per [1000] [slaughtered] heads).
  
-{{::code_p160.png?600|}}+{{::code_p160.png?600}}
  
 These declared rates can hence be aggregated to higher regional units using the activity levels as weights, e.g. from farm types to NUTS2: These declared rates can hence be aggregated to higher regional units using the activity levels as weights, e.g. from farm types to NUTS2:
  
-{{:code_p160_2.png?600|}}+{{:code_p160_2.png?600}}
  
 Before the supply module is started between iterations, the current activity levels and premiums paid out are summed up for each scheme and regional level where ceilings in levels or value are defined. If one of the aggregated sums exceeds the ceilings, all premium rates for the scheme are cut proportionally to fit under the tighter of the two envelops: Before the supply module is started between iterations, the current activity levels and premiums paid out are summed up for each scheme and regional level where ceilings in levels or value are defined. If one of the aggregated sums exceeds the ceilings, all premium rates for the scheme are cut proportionally to fit under the tighter of the two envelops:
  
-{{:code_p160_3.png?600|}}+{{:code_p160_3.png?600}}
  
 From the declared rates and these cut factors, the actually paid premiums are defined: From the declared rates and these cut factors, the actually paid premiums are defined:
  
-{{:code_p160_4.png?600|}}+{{:code_p160_4.png?600}}
  
 The indivudal premiums from each premium scheme are then added up to arrive at one average rate for each activity which enters the objective function of the supply model, the data base and post-model reporting: The indivudal premiums from each premium scheme are then added up to arrive at one average rate for each activity which enters the objective function of the supply model, the data base and post-model reporting:
  
-{{:code_p160_5.png?600|}}+{{:code_p160_5.png?600}}
  
 ====An example of a payment with a ceiling==== ====An example of a payment with a ceiling====
  
-We explain the different elements and steps in the following based on an example of the slaughter premium for adult cattle of 80 EURO per slaughtered head in Latvia, defined in 2004. The following screen shot comes from the policy file gams\pol_input\mtr_until2013.gms, with some lines hidden.+We explain the different elements and steps in the following based on an example of the slaughter premium for adult cattle of 80 EURO per slaughtered head in Latvia, defined in 2004. The following screen shot comes from the policy file gams/pol_input/mtr_until2013.gms, with some lines hidden.
  
-{{:code_p160_6.png?600|}}+{{:code_p160_6.png?600}}
  
   -The application type defines the criterion upon which the payment depends, in the case of the slaughter premium it is defined per slaughtered head.   -The application type defines the criterion upon which the payment depends, in the case of the slaughter premium it is defined per slaughtered head.
Line 514: Line 829:
   -Regional ceiling, expressed in maximum number of premiums paid and/or total payment in EURO. In the example with the slaughter premiums, this is used to set a national ceiling limiting the total amount spent on slaughter premiums to 9.946 million euro. There can be additional ceilings at other regional levels, and the most strongly binding is always the one that limits payments.   -Regional ceiling, expressed in maximum number of premiums paid and/or total payment in EURO. In the example with the slaughter premiums, this is used to set a national ceiling limiting the total amount spent on slaughter premiums to 9.946 million euro. There can be additional ceilings at other regional levels, and the most strongly binding is always the one that limits payments.
  
-Those four pieces of information are generally easily accessible without further processing from the regulatory texts. Starting with PRMR and APPTYPE (information pieces 1 and 2 above), it is possible to calculate (3), PRMD, the amount of premium per head or hectare that would be paid if there were no (active) ceiling. These preparatory calculations, e.g. the hierarchical break down from higher to lower regional level and from activity groups to individual activities, as well as the calculations of PRMD from PRMR (using APPTYPE) is carried out in a file called ‘//policy\policy.gms//’ as shown above.+Those four pieces of information are generally easily accessible without further processing from the regulatory texts. Starting with PRMR and APPTYPE (information pieces 1 and 2 above), it is possible to calculate (3), PRMD, the amount of premium per head or hectare that would be paid if there were no (active) ceiling. These preparatory calculations, e.g. the hierarchical break down from higher to lower regional level and from activity groups to individual activities, as well as the calculations of PRMD from PRMR (using APPTYPE) is carried out in a file called ‘//policy/policy.gms//’ as shown above.
  
 For most premiums in CAP there are ceilings, which if they are binding decrease the average amount of premiums actually paid (effective premium, PRME) per head or hectare. As discussed, due to the different kind of ceilings, the reduction of premiums and the treatment of PRME can only be done endogenously during the simulations depending on the simuled production patterns. For most premiums in CAP there are ceilings, which if they are binding decrease the average amount of premiums actually paid (effective premium, PRME) per head or hectare. As discussed, due to the different kind of ceilings, the reduction of premiums and the treatment of PRME can only be done endogenously during the simulations depending on the simuled production patterns.
  
-How is this problem solved in CAPRI? The effective premium (PRME) is exogenous during the optimisation of the supply model((There are exemptions for that rule, see below for the section on entitlements.)), but adjusted iteratively between the main model iterations. So, for most premium schemes, the premium level is constant in the objective function and hence the model does not realise that the marginal premium payment is zero as soon as the ceiling is reached. Technically, the iterative adjustment of the effective premiums PRME is handled in a file called ‘//policy\premcut.gms//’ for “premium cut”. That reasoning is correct as long as the ceiling is not farm specific.+How is this problem solved in CAPRI? The effective premium (PRME) is exogenous during the optimisation of the supply model((There are exemptions for that rule, see below for the section on entitlements.)), but adjusted iteratively between the main model iterations. So, for most premium schemes, the premium level is constant in the objective function and hence the model does not realise that the marginal premium payment is zero as soon as the ceiling is reached. Technically, the iterative adjustment of the effective premiums PRME is handled in a file called ‘//policy/premcut.gms//’ for “premium cut”. That reasoning is correct as long as the ceiling is not farm specific.
  
 In each iteration, once all regional model are solved, the program adds up total number of premium units (hectares or heads for which it is paid) that belong to each ceiling. In most cases this simply means summing up number of animals or hectares of the activities for which each premium applies. This is also multiplied with the declared amount PRMD to get the total payment which would be paid if it would not be cut. For each premium this is compared to the ceilings defined (total level with the level ceiling and total amount with the value ceiling) and a “cut factor” is calculated, which defines how much the premium has to be reduced in order to fit under all ceilings. Then PRMD is multiplied by this factor to get the effective premium (PRME) for the next iteration. In each iteration, once all regional model are solved, the program adds up total number of premium units (hectares or heads for which it is paid) that belong to each ceiling. In most cases this simply means summing up number of animals or hectares of the activities for which each premium applies. This is also multiplied with the declared amount PRMD to get the total payment which would be paid if it would not be cut. For each premium this is compared to the ceilings defined (total level with the level ceiling and total amount with the value ceiling) and a “cut factor” is calculated, which defines how much the premium has to be reduced in order to fit under all ceilings. Then PRMD is multiplied by this factor to get the effective premium (PRME) for the next iteration.
Line 562: Line 877:
 **Figure 16: General way of SFP implementation in CAPRI** **Figure 16: General way of SFP implementation in CAPRI**
  
-{{::figure16.png?600|}} \\ Source: own illustration+{{::figure_16.png?600|Source: own illustration}}
  
 In opposite to the reforms until Agenda 2000, there are hence in most cases not longer premium rates or individual ceilings in hectares found in legal texts. Rather, these are calculated by the model itself from the decoupled part of the “old” Mac Sharry and Agenda 2000 premiums which introduces additional complexity in the model code. In opposite to the reforms until Agenda 2000, there are hence in most cases not longer premium rates or individual ceilings in hectares found in legal texts. Rather, these are calculated by the model itself from the decoupled part of the “old” Mac Sharry and Agenda 2000 premiums which introduces additional complexity in the model code.
  
-Only an overall budget envelop is given covering all pillar I premiums of the EU CAP (“old” MacSharry and Agenda 2000 premiums, SPS premiums, article 63/68/69 premiums, etc.) per Member State nad per year on the position p_premDataE(MS,SIMY,"DPMTR","CEILVAL") in ‘//pol_input\mtr_hc.gms//’. Here MS refers to member states and SIMY to a certain year.+Only an overall budget envelop is given covering all pillar I premiums of the EU CAP (“old” MacSharry and Agenda 2000 premiums, SPS premiums, article 63/68/69 premiums, etc.) per Member State nad per year on the position p_premDataE(MS,SIMY,"DPMTR","CEILVAL") in ‘//pol_input/mtr_hc.gms//’. Here MS refers to member states and SIMY to a certain year.
  
 **Single area payment scheme (SAPS)** **Single area payment scheme (SAPS)**
Line 574: Line 889:
 From a technical viewpoint, the single-area premium scheme (SAPS) is the easiest to implement: From a technical viewpoint, the single-area premium scheme (SAPS) is the easiest to implement:
  
-{{::code_p165.png?600|}}+{{::code_p165.png?600}}
  
 As it defines a flat rate premiums per ha of agricultural land. The ceilings in values and thus the application rates per ha are step wise increased over time: As it defines a flat rate premiums per ha of agricultural land. The ceilings in values and thus the application rates per ha are step wise increased over time:
  
-{{:code_p165_2.png?600|}}+{{:code_p165_2.png?600}}
  
 To reach their full level in 2013 (EU 10) or 2016 (Bulgaria and Romania). To reach their full level in 2013 (EU 10) or 2016 (Bulgaria and Romania).
Line 584: Line 899:
 During that transition period where not yet the full EU premiums were paid out, the Member States had the right to paid up to certain limits to so-called complementary national direct payments (the list of schemes used in CAPRI was shown above). They also edited in a tabular format: During that transition period where not yet the full EU premiums were paid out, the Member States had the right to paid up to certain limits to so-called complementary national direct payments (the list of schemes used in CAPRI was shown above). They also edited in a tabular format:
  
-{{:code_p166.png?600|}}+{{:code_p166.png?600}}
  
 These top-ups have to be reduced towards the end of the period where the the  Pillar I premiums are phased in: These top-ups have to be reduced towards the end of the period where the the  Pillar I premiums are phased in:
  
-{{:code_p166_2.png?600|}}+{{:code_p166_2.png?600}}
  
 **Non-SAPS implementation** **Non-SAPS implementation**
Line 594: Line 909:
 The non-SAPS implementation of the Mid-Term Review package is far more demanding. First of all, the countries could, at least in the earlier years of the reform, keep certain percentages of specific premium scheme still coupled to production. These coupling factors are stored on the parameter p_couplPercent_E: The non-SAPS implementation of the Mid-Term Review package is far more demanding. First of all, the countries could, at least in the earlier years of the reform, keep certain percentages of specific premium scheme still coupled to production. These coupling factors are stored on the parameter p_couplPercent_E:
  
-{{:code_p166_3.png?600|}}+{{:code_p166_3.png?600}}
  
 The amount of payments which is not kept coupled is then paid out to different implementations of the MTR: The amount of payments which is not kept coupled is then paid out to different implementations of the MTR:
   * Regional implementation where all arable crops (PGARAB) \\   * Regional implementation where all arable crops (PGARAB) \\
-{{::code_p167.png?600|}}+{{::code_p167.png?600}}
   * And permanent grass land (PGGRAS) is eligble \\   * And permanent grass land (PGGRAS) is eligble \\
-{{:code_p167_2.png?600|}}+{{:code_p167_2.png?600}}
   * The historic implementation \\   * The historic implementation \\
-{{:code_p167_3.png?600|}}+{{:code_p167_3.png?600}}
  
 The exact set member ship depends on the year. The distribution shares which map the decoupled part of the premiums received under the Agenda package (see above) to these implementation schemes are edited on the Table “p_premToDDTarget_E” The exact set member ship depends on the year. The distribution shares which map the decoupled part of the premiums received under the Agenda package (see above) to these implementation schemes are edited on the Table “p_premToDDTarget_E”
  
-{{:code_p167_4.png?600|}}+{{:code_p167_4.png?600}}
  
-That information is the basis to define regional premium envelops (= CEILVAL) for the different Member states. That is a rather complex program (‘//policy\calc_mtr.gms//’).+That information is the basis to define regional premium envelops (= CEILVAL) for the different Member states. That is a rather complex program (‘//policy/calc_mtr.gms//’).
 A first key statement defines the //remaining budget envelops for the still coupled payments//. It takes the minimum of the existing ceiling values for that scheme (CEILVAL) or the total payments paid out times the modulation factors and multiplies it with the coupling degree. A first key statement defines the //remaining budget envelops for the still coupled payments//. It takes the minimum of the existing ceiling values for that scheme (CEILVAL) or the total payments paid out times the modulation factors and multiplies it with the coupling degree.
  
-{{:code_p167_5.png?600|}}+{{:code_p167_5.png?600}}
  
 There two other factors: There two other factors:
Line 618: Line 933:
  
 The part which is not longer coupled goes into the decoupled schemes: The part which is not longer coupled goes into the decoupled schemes:
-{{:code_p168.png?600|}}+{{:code_p168.png?600}}
  
 The total budget for the new MTR schemes is derived from the summation of all the old Agenda premiums. The total payments under a scheme such as the Grandes Cultures schemes are corrected for any possible remaining coupled payments: The total budget for the new MTR schemes is derived from the summation of all the old Agenda premiums. The total payments under a scheme such as the Grandes Cultures schemes are corrected for any possible remaining coupled payments:
  
-{{:code_p168_2.png?400|}}+{{:code_p168_2.png?400}}
  
 After that, a possible share going into the greening payment (from 2014) is deducted: After that, a possible share going into the greening payment (from 2014) is deducted:
  
-{{:code_p168_3.png?400|}}+{{:code_p168_3.png?400}}
  
 And, finally, a factor is applied which lines up the total historic payments as defined from the CAPRI data and premium schemes in that Member State with the total MTR envelop: And, finally, a factor is applied which lines up the total historic payments as defined from the CAPRI data and premium schemes in that Member State with the total MTR envelop:
  
-{{:code_p168_4.png?400|}}+{{:code_p168_4.png?400}}
  
 That sum if then distributed to the relevant MTR implementation scheme according to the distribution keys defined above: That sum if then distributed to the relevant MTR implementation scheme according to the distribution keys defined above:
  
-{{:code_p168_5.png?600|}}+{{:code_p168_5.png?600}}
  
-These calculation require that first the total premiums received in the history period are calculated which is done in ‘//policy\calc_mtr_top.gms//’.+These calculation require that first the total premiums received in the history period are calculated which is done in ‘//policy/calc_mtr_top.gms//’.
  
 ===CAP 2014-2020=== ===CAP 2014-2020===
  
-From 2014 onwards, a new agricultural policy entered into force. The key elements of the policy were (i) convergence of payment rates between member states and farmers within member states, (ii) the expansion of the option to use coupled support beyond the previous articles 68/69, and (iii) the introduction of three “greening requirements”. These elements were introduced into CAPRI, and their use can be inspected in the commonly used baseline policy file “gams\pol_input\cap_after_2014\ref.gms”, the entire content of which is shown below:+From 2014 onwards, a new agricultural policy entered into force. The key elements of the policy were (i) convergence of payment rates between member states and farmers within member states, (ii) the expansion of the option to use coupled support beyond the previous articles 68/69, and (iii) the introduction of three “greening requirements”. These elements were introduced into CAPRI, and their use can be inspected in the commonly used baseline policy file “gams/pol_input/cap_after_2014/ref.gms”, the entire content of which is shown below:
  
-{{:code_p169.png?600|}}+{{:code_p169.png?600}}
  
-Since the mechanisms behind each of the three elements is somewhat complex, the file relies on include files to define each of the three components. The include files are stored in the scenario directory (gams\scen) of the CAPRI system, and which particular include files to use is indicated by the string variables ($setGlobal) in the first three code lines. The actual logic of the policy file, also the inclusion of the indicated three files, takes place in the file included in the final line, referred to as the base scenario file.+Since the mechanisms behind each of the three elements is somewhat complex, the file relies on include files to define each of the three components. The include files are stored in the scenario directory (gams/scen) of the CAPRI system, and which particular include files to use is indicated by the string variables ($setGlobal) in the first three code lines. The actual logic of the policy file, also the inclusion of the indicated three files, takes place in the file included in the final line, referred to as the base scenario file.
  
-//Convergence// between member states is set by adjusting the total budget of the CAP first pillar. Regarding the convergence of payment values per entitlement (IUVs, for Individual Unit Values) inside countries, the regulation allows ample room for national customization. Countries define the regions within which convergence occurs, the end year by which convergence shall be achieved, any remaining maximum span for the IUVs after convergence, and the mathematical formula to use for reducing high IUVs and increasing low ones. The file gams\scen\premiums\bps_convergence.gms defines the options chosen by member states in 2014.+//Convergence// between member states is set by adjusting the total budget of the CAP first pillar. Regarding the convergence of payment values per entitlement (IUVs, for Individual Unit Values) inside countries, the regulation allows ample room for national customization. Countries define the regions within which convergence occurs, the end year by which convergence shall be achieved, any remaining maximum span for the IUVs after convergence, and the mathematical formula to use for reducing high IUVs and increasing low ones. The file gams/scen/premiums/bps_convergence.gms defines the options chosen by member states in 2014.
  
-{{:code_p169_2.png?600|}}+{{:code_p169_2.png?600}}
  
 Two different uses of the convergence mechanism are illustrated by Austria and Greece, which apply very different models. Austria applies the full convergence using a linear model over time, with the same target payment rate in all of Austria. The convergence should be complete in 2019. This is obtained by assigning all Austrian regions to one generic “BPS-region”, for convenience the first one, called “rbps1”. Since the convergence mechanism later on works per member state, it is no problem that rbps1 is also used for e.g. the Netherlands. Then, the convergence option is set to “bps_linear” and the target year to 2019. Finally, the two parameters defining the rate of the final convergence are set, or, if you like, the width at the end of the convergence funnel and the handling of payments outside of that funnel. For Austria, the parameters are both set to “1”, which means that all farms will get exactly the same payments per hectare after convergence is complete in 2019. Two different uses of the convergence mechanism are illustrated by Austria and Greece, which apply very different models. Austria applies the full convergence using a linear model over time, with the same target payment rate in all of Austria. The convergence should be complete in 2019. This is obtained by assigning all Austrian regions to one generic “BPS-region”, for convenience the first one, called “rbps1”. Since the convergence mechanism later on works per member state, it is no problem that rbps1 is also used for e.g. the Netherlands. Then, the convergence option is set to “bps_linear” and the target year to 2019. Finally, the two parameters defining the rate of the final convergence are set, or, if you like, the width at the end of the convergence funnel and the handling of payments outside of that funnel. For Austria, the parameters are both set to “1”, which means that all farms will get exactly the same payments per hectare after convergence is complete in 2019.
  
-{{:code_p169_3.png?600|}}+{{:code_p169_3.png?600}}
  
 Greece applies different models for different types of regions, depending on the character of agriculture in the region. We approximate this in CAPRI by classifying the NUTS2-regions according to the shares of arable land, grass land and permanent crops in a historical year (2008). Based on those shares, three BPS-regions are created, within each of which the same convergence model is applied. The convergence is linear, but with the additional 30-percent-rule applied, defining that no farm (supply model region) should get more than 30 percent higher payments per hectare than the average of the BPS-region. Convergence proceeds up to the year 2019, and in each year, the lower limit for convergence, expressed as a share of the averge of the BPS-region, is set to 90%. The lower limit defines whether a farm needs convergence or not. Farms above the lower limit will get the same payments per unit as before, but for farms below the limit, the final option “p_bps_tunnel_gap_closure” kicks in, and defines what share of the gap to the lower convergence limit should be closed. For Greece, this value is set to 1/3, implying that for a farm receiving less than 90% of the average payment in the BPS-region, 1/3 of the gap shall be closed. The increased premiums are financed by a linear reduction of the payments to all farms with payments above the average payment, while also capping the highest premiums to be no more than 30% higher than the regional average. Greece applies different models for different types of regions, depending on the character of agriculture in the region. We approximate this in CAPRI by classifying the NUTS2-regions according to the shares of arable land, grass land and permanent crops in a historical year (2008). Based on those shares, three BPS-regions are created, within each of which the same convergence model is applied. The convergence is linear, but with the additional 30-percent-rule applied, defining that no farm (supply model region) should get more than 30 percent higher payments per hectare than the average of the BPS-region. Convergence proceeds up to the year 2019, and in each year, the lower limit for convergence, expressed as a share of the averge of the BPS-region, is set to 90%. The lower limit defines whether a farm needs convergence or not. Farms above the lower limit will get the same payments per unit as before, but for farms below the limit, the final option “p_bps_tunnel_gap_closure” kicks in, and defines what share of the gap to the lower convergence limit should be closed. For Greece, this value is set to 1/3, implying that for a farm receiving less than 90% of the average payment in the BPS-region, 1/3 of the gap shall be closed. The increased premiums are financed by a linear reduction of the payments to all farms with payments above the average payment, while also capping the highest premiums to be no more than 30% higher than the regional average.
  
-{{:code_p170.png?600|}}+{{:code_p170.png?600}}
  
-The code implementing the logic behind these various settings is generic and found in the file “gams\policy\implement_bps.gms”. The result is a payment per region, defined using the general premium mechanism of CAPRI, that is called “dp_bps” and with the eligible activity list “pgsaps”. The application type is “perLevl” and the budget is set on national level in the base scenario file “gams\scen\base_scenarios\cap_2014_2020.gms”.+The code implementing the logic behind these various settings is generic and found in the file “gams/policy/implement_bps.gms”. The result is a payment per region, defined using the general premium mechanism of CAPRI, that is called “dp_bps” and with the eligible activity list “pgsaps”. The application type is “perLevl” and the budget is set on national level in the base scenario file “gams/scen/base_scenarios/cap_2014_2020.gms”.
  
-//Voluntary Coupled Support// is defined using the standard premium mechanisms of CAPRI, based on notifications received from the European Commission. We have interpreted the notified target activities in terms of CAPRI activities, and set budget ceilings and nominal amounts in the file “gams\scen\premiums\coupling\cap_2013_2020_vcs.gms”.+//Voluntary Coupled Support// is defined using the standard premium mechanisms of CAPRI, based on notifications received from the European Commission. We have interpreted the notified target activities in terms of CAPRI activities, and set budget ceilings and nominal amounts in the file “gams/scen/premiums/coupling/cap_2013_2020_vcs.gms”.
  
-The //Greening Measures// can be steered by the modeller. Even though the greening in itself is complex in implementation, the choices open to the CAPRI modeller are limited. The standard greening policy switches can be inspected in the file “gams\scen\premiums\greening\cap_2013_2020_greening.gms”:+The //Greening Measures// can be steered by the modeller. Even though the greening in itself is complex in implementation, the choices open to the CAPRI modeller are limited. The standard greening policy switches can be inspected in the file “gams/scen/premiums/greening/cap_2013_2020_greening.gms”:
  
-{{:code_p171.png?600|}}+{{:code_p171.png?600}}
  
 The first statement defines the share of the national pillar 1 envelope that is dedicated to the “greening top-up”. By default, this is 30%. Then, a set of active greening measures is populated. There are three options available, and by default, they are all active: The first statement defines the share of the national pillar 1 envelope that is dedicated to the “greening top-up”. By default, this is 30%. Then, a set of active greening measures is populated. There are three options available, and by default, they are all active:
Line 672: Line 987:
   * A share of land must be allocated to certain activities counting as “ecological set-aside”.    * A share of land must be allocated to certain activities counting as “ecological set-aside”. 
  
-The shares of activities eligible as ecological set-aside is then defined in the concluding parameter definition in the file. The set-aside rate itself is defined as a string variable “$setglobal greening_setasiderate 5”, defining it to be 5% by default. The three greening restrictions are implemented as constraints in the supply models. The greening top-up is implemented as a standard CAPRI premium called DPGREEN. The logic behind the greening restrictions is activated in the include file “//policy\define_greening_limits.gms//”.+The shares of activities eligible as ecological set-aside is then defined in the concluding parameter definition in the file. The set-aside rate itself is defined as a string variable “$setglobal greening_setasiderate 5”, defining it to be 5% by default. The three greening restrictions are implemented as constraints in the supply models. The greening top-up is implemented as a standard CAPRI premium called DPGREEN. The logic behind the greening restrictions is activated in the include file “//policy/define_greening_limits.gms//”.
    
 The CAP 2014-2020 also contains three more payment schemes: Support to young farmers, support to smaller farms (first hectares) and support to areas with natural constraints (ANC). These payment schemes, with their associated budgets, are defined in the base scenario file. The CAP 2014-2020 also contains three more payment schemes: Support to young farmers, support to smaller farms (first hectares) and support to areas with natural constraints (ANC). These payment schemes, with their associated budgets, are defined in the base scenario file.
  
-The following figure summarizes the logic of the CAP 2014-2020 reference policy as implemented in the CAPRI policy module in the policy file //pol_input\cap_after_2014\ref.gms//.+The following figure summarizes the logic of the CAP 2014-2020 reference policy as implemented in the CAPRI policy module in the policy file //pol_input/cap_after_20147ref.gms//.
  
 **Figure 17: The logic of the CAP 2014-2020 reference policy as implemented in the CAPRI policy module** **Figure 17: The logic of the CAP 2014-2020 reference policy as implemented in the CAPRI policy module**
  
-{{:figure17.png?600|}} \\ Source: own illustration+{{:figure_17.png?600|Source: own illustration}}
  
 ===Tradable Single Premium Scheme entitlements=== ===Tradable Single Premium Scheme entitlements===
Line 690: Line 1005:
 //Switching on the entitlement trade// //Switching on the entitlement trade//
  
-The trade module is implemented in the file ‘//policy\prem_entl_trade.gms//’ which is included on demand in capmod and called in each iteration+The trade module is implemented in the file ‘//policy/prem_entl_trade.gms//’ which is included on demand in capmod and called in each iteration
  
-{{::code_p173.png?600|}}+{{::code_p173.png?600}}
  
-By default, the entitlement trade is switched OFF in the general settings file of CAPMOD, called gams\capmod\set_global_variables.gms+By default, the entitlement trade is switched OFF in the general settings file of CAPMOD, called gams/capmod/set_global_variables.gms
  
-{{:code_p173_2.png?600|}}+{{:code_p173_2.png?600}}
  
 The basic idea of the module is very simple: shift entitlements from farm type or regions which unused entitlements to other farm types or regions which have an economic rent on their entitlements. The trading entities should receive the very same premium on the entitlement for the current implementation in the code. One should hence set the trade level according to the regional level for which flat rate premiums are implemented as shown below in an example: The basic idea of the module is very simple: shift entitlements from farm type or regions which unused entitlements to other farm types or regions which have an economic rent on their entitlements. The trading entities should receive the very same premium on the entitlement for the current implementation in the code. One should hence set the trade level according to the regional level for which flat rate premiums are implemented as shown below in an example:
  
-{{:code_p173_3.png?600|}}+{{:code_p173_3.png?600}}
  
 //How the entitlement trade works// //How the entitlement trade works//
  
-The following code pieces are taken from ‘//policy\prem_entl_trade.gms//’. In a first step, the demand of entitlements is determined. The dual value does only provide an indication that entitlements are scarce, but not how many additional entitlements are needed. Accordingly, first, the average marginal value of the different type of entitlements is determined:+The following code pieces are taken from ‘//policy/prem_entl_trade.gms//’. In a first step, the demand of entitlements is determined. The dual value does only provide an indication that entitlements are scarce, but not how many additional entitlements are needed. Accordingly, first, the average marginal value of the different type of entitlements is determined:
  
-{{:code_p173_4.png?600|}}+{{:code_p173_4.png?600}}
  
 From these a maximum of 10% is defined as the demand in each iteration: From these a maximum of 10% is defined as the demand in each iteration:
  
-{{:code_p173_5.png?600|}}+{{:code_p173_5.png?600}}
  
 In order to take differences in the marginal returns into account, an indicator based on the squared value is used: In order to take differences in the marginal returns into account, an indicator based on the squared value is used:
  
-{{:code_173_6.png?600|}}+{{:code_173_6.png?600}}
  
 It serves as the distribution key of unused entitlements, which are determined as follows: It serves as the distribution key of unused entitlements, which are determined as follows:
  
-{{:code_173_7.png?600|}}+{{:code_173_7.png?600}}
  
 Next, the number of unused entitlements is stored: Next, the number of unused entitlements is stored:
  
-{{:code_p174.png?600|}}+{{:code_p174.png?600}}
  
 As seen, only 50% of the unused entitlements are released in any iteration. We next determine the size of the markets, i.e. total demand and supply: As seen, only 50% of the unused entitlements are released in any iteration. We next determine the size of the markets, i.e. total demand and supply:
  
-{{:code_174_2.png?600|}}+{{:code_174_2.png?600}}
  
 The supply is then distributed according to the squared value of the individual demanders The supply is then distributed according to the squared value of the individual demanders
  
-{{:code_p174_3.png?600|}}+{{:code_p174_3.png?600}}
  
 //An example printout// //An example printout//
Line 736: Line 1051:
 The following code snippet shows an example for a NUTS2 regions and the related farm types for a test run for Greece without the market module: The following code snippet shows an example for a NUTS2 regions and the related farm types for a test run for Greece without the market module:
  
-{{:code_p174_4.png?600|}}+{{:code_p174_4.png?600}}
  
 As seen from above, we have two farm types in the starting situation which acts as demanders, i.e. have a marginal value on their entitlements (016 and 999). Their marginal value on the entitlement is quite high in the starting situation with > 125 € / entitlement. We have also a total of 3639 ha after the first round of unused entitlements which can be sold to the demanders. Distributing half of them (ca. 1800 ha) to the two demanders reduces the marginal value of the entitlements already below 95€, the next round distributed ca. 900 ha and brings the price down to 50€ until in the last round almost nothing is left for distribution and the value of the entitlements has dropped below 10€. The reader should note the trade is not yet taking into account in the income calculation of the farm types. As seen from above, we have two farm types in the starting situation which acts as demanders, i.e. have a marginal value on their entitlements (016 and 999). Their marginal value on the entitlement is quite high in the starting situation with > 125 € / entitlement. We have also a total of 3639 ha after the first round of unused entitlements which can be sold to the demanders. Distributing half of them (ca. 1800 ha) to the two demanders reduces the marginal value of the entitlements already below 95€, the next round distributed ca. 900 ha and brings the price down to 50€ until in the last round almost nothing is left for distribution and the value of the entitlements has dropped below 10€. The reader should note the trade is not yet taking into account in the income calculation of the farm types.
Line 808: Line 1123:
 p_aeLfa(ms,tf8): The probability of a farm of type tf8 having agri-environmental support conditional on the farm being in an LFA region or not, computed based on the FADN sample. p_aeLfa(ms,tf8): The probability of a farm of type tf8 having agri-environmental support conditional on the farm being in an LFA region or not, computed based on the FADN sample.
    
-Then, the payment rate for each region is set in proportion to the weighted share of farms likely to have some AE support, predicted by the regional share of each land class (grass, arable) being classified as LFA in each region times the share of farms in/out of LFA having AE-support in the national FADN sample. The computation takes place in policy\rd_logic.gms:+Then, the payment rate for each region is set in proportion to the weighted share of farms likely to have some AE support, predicted by the regional share of each land class (grass, arable) being classified as LFA in each region times the share of farms in/out of LFA having AE-support in the national FADN sample. The computation takes place in policy/rd_logic.gms:
  
-{{::code_p179.png?600|}}+{{::code_p179.png?600}}
  
 Note that the code does not know how high the absolute level of payments shall be for each region, but allocates the relative levels. Then, the national ceiling for AE payments are applied to adjust all regional payments until the ceiling is respected.  Note that the code does not know how high the absolute level of payments shall be for each region, but allocates the relative levels. Then, the national ceiling for AE payments are applied to adjust all regional payments until the ceiling is respected. 
Line 816: Line 1131:
 Finally, an extensification effect to the AE payments is introduced using the possibility to make technological variants differently eligible. Finally, an extensification effect to the AE payments is introduced using the possibility to make technological variants differently eligible.
  
-{{:code_p179_2.png?600|}} \\ +{{:code_p179_2.png?600}} 
-{{:code_p180.png?600|}}+ 
 +{{:code_p180.png?600}}
  
 ====Co-financing rates, assignment of premiums to pillars, WTO boxes and PSE-types==== ====Co-financing rates, assignment of premiums to pillars, WTO boxes and PSE-types====
Line 823: Line 1139:
 **EU and national budget contribution** **EU and national budget contribution**
  
-The reporting part of the system was expanded to account for (co-)financing rates of the different schemes, so that contributions from EU and national budgets can be differentiated. The underlying factors are currently defined in //‘policy\policy_sets.gms’//:+The reporting part of the system was expanded to account for (co-)financing rates of the different schemes, so that contributions from EU and national budgets can be differentiated. The underlying factors are currently defined in //‘policy/policy_sets.gms’//:
  
-{{:code_p180_2.png?600|}}+{{:code_p180_2.png?600}}
  
 **PSEs** **PSEs**
  
-The mapping to the PSE-types is defined in //‘policy\policy_sets.gms’//:+The mapping to the PSE-types is defined in //‘policy/policy_sets.gms’//:
  
-{{:code_p180_3.png?600|}}+{{:code_p180_3.png?600}}
  
 **WTO boxes** **WTO boxes**
  
-In a similar fashion, the premiums are allocated to the WTO boxes. The following payments are allocated to the green box (‘//policy\policy_sets.gms’//):+In a similar fashion, the premiums are allocated to the WTO boxes. The following payments are allocated to the green box (‘//policy/policy_sets.gms’//):
  
-{{:code_p181.png?600|}}+{{:code_p181.png?600}}
  
 The blue box, i.e.g payments under supply control or only paid up to certain upper limits, is defined as along with remaining amber box payments in Norway: The blue box, i.e.g payments under supply control or only paid up to certain upper limits, is defined as along with remaining amber box payments in Norway:
  
-{{:code_p182.png?600|}}+{{:code_p182.png?600}}
  
-Currently, the following budget categories are supported (see ‘//sets.gms//’ and ‘//policy\policy_sets.gms//’):+Currently, the following budget categories are supported (see ‘//sets.gms//’ and ‘//policy/policy_sets.gms//’):
  
 {{:code_p182_2.png?600}} {{:code_p182_2.png?600}}
  
-In ‘//reports\feoga.gms//’, these categories are first aggregated for each activities from actual schemes (“PRME” = actual payment rate, p_budToPsdpay: distribution key):+In ‘//reports/feoga.gms//’, these categories are first aggregated for each activities from actual schemes (“PRME” = actual payment rate, p_budToPsdpay: distribution key):
  
 {{:code_p182_3.png?600}} {{:code_p182_3.png?600}}
Line 895: Line 1211:
 ====Behavioural equations for supply, feed demand and land markets==== ====Behavioural equations for supply, feed demand and land markets====
  
-The definition of the market model can be found in //‘arm\market_model.gms’//+The definition of the market model can be found in //‘arm/market_model.gms’//
  
 ===Agricultural supply=== ===Agricultural supply===
Line 922: Line 1238:
 **Figure 18: Land supply curve examples** **Figure 18: Land supply curve examples**
  
-{{::figure18.png?600|}} \\ Source: own calculations+{{::figure_18.png?600|Source: own calculations}} 
  
 In order to parameterize the land demand function, information about yield and supply elasticities is used. The marginal reaction of land to a marginal change in one of the prices is defined as the total supply effect minus the yield effect: In order to parameterize the land demand function, information about yield and supply elasticities is used. The marginal reaction of land to a marginal change in one of the prices is defined as the total supply effect minus the yield effect:
Line 961: Line 1277:
  
 The disadvantage of the behavioural functions above is the fact that they might generate non-positive values. That situation might be interpreted as a combination of prices where the marginal costs exceed marginal revenues. Accordingly, a fudging function is applied for supply, feed and (see below) processing demand which ensures strictly positive quantities. That fudging function is highly non-linear, and therefore only switched on on demand. The disadvantage of the behavioural functions above is the fact that they might generate non-positive values. That situation might be interpreted as a combination of prices where the marginal costs exceed marginal revenues. Accordingly, a fudging function is applied for supply, feed and (see below) processing demand which ensures strictly positive quantities. That fudging function is highly non-linear, and therefore only switched on on demand.
 +
 +====Land use, land use change and forestry (LULUCF) ====
 +
 +===LULUCF in the basic model ===
 +
 +Before SUPREMA LULUCF and area-based carbon accounting were not depicted in the global market model. Land demand was conceptually derived from maximising farmers profit. Land supply was represented with a function that links supply to agricultural land rents with an elasticity. Non-agricultural land use that complements farm land to give the total region area was disaggregated into forestry, built up areas (urban or “artificial” land) and a remaining “other land” category. There was neither a mapping of land use categories in the market model to the UNFCCC categories, nor a modelling of the transition matrix accompanied by a very limited product-based carbon accounting which was not in line with IPCC.
 +
 +The pre-SUPREMA specification may be described as follows.
 +
 +Agricultural outputs i (barley, wheat, beef ...) have land requirements LV<sub>i</sub> derived from production of these outputs (via yields that respond to prices according to yield elasticities). Adding up all land requirements gives total agricultural land (LT<sub>ag</sub>).
 +
 +$${LT}_{ag} = \sum_{i}^{}{{LV}_{i}(\mathbf{P},R_{ag})}$$
 +
 +Land demand depends on a vector of prices and the agricultural and rent R<sub>ag</sub> (treated separately). Total agricultural land is just one of several land types (l) that play a role:
 +
 +l = {ag, tc, pc, fd, no, fr, ur, ot, iw}, where
 +
 +ag = total agricultural land
 +
 +tc = temporary (non-fodder) crops
 +
 +pc = permanent crops
 +
 +fd = temporary fodder, permanent grassland and fallow land
 +
 +no = non-agricultural land
 +
 +fr = forest land
 +
 +ur = settlements, industrial, built up md any other artificial areas
 +
 +ot = other land
 +
 +iw = inland waters (exogenous)
 +
 +Matching with land demand there is a land supply function for total agricultural land
 +
 +$${LT}_{ag} = \alpha{R_{ag}}^{\beta}$$
 +
 +Given agricultural land and an exogenous region area as well as exogenous inland waters permits to compute total non-agricultural land residually:
 +
 +$${LT}_{no} = T - {LT}_{ag} - {LT}_{iw}$$
 +
 +This total non-agricultural land (beyond inland waters) is currently allocated to non-agricultural land types n = { fr, ur, ot} according to the shares of “intermediate” areas for non-agricultural land types:
 +
 +$${LT}_{n} = {LT}_{no}*{\widehat{LT}}_{n}/\sum_{n}^{}{\widehat{LT}}_{n}$$
 +
 +The “intermediate” areas in turn result from the change in the non-agricultural area against the baseline, considering elasticities that reflect the responsiveness of land types to imbalances:
 +
 +$${{\widehat{LT}}_{n} = LT}_{n}^{0}*\left( \frac{{LT}_{no}^{}}{{LT}_{no}^{0}} \right)^{\gamma_{n}}$$
 +
 +The concept of elasticities of land types to imbalances expresses the expectation that any disequilibrium in the land balance is very unlikely to be removed by changes in settlement area, and probably only to a small extent by changes in forest land and therefore most of all by changes in other land category.
 +
 +In spite of full consistency, we have changed this specification under SUPREMA, as 1) it is difficult to reconcile with welfare accounting, 2) it turned out that the scaling mechanism may dominate the planned responsiveness of land types, 3) the asymmetric specifications for supply of agricultural and non-agricultural land is ad-hoc and intransparent and 4) it does not link to standard empirical parameter estimation.
 +
 +== Land transitions via Gamma density and Marcov chain  ==
 +
 +The area-based carbon modelling and accounting requires the land transition matrix describing how an initial allocation of land uses (either from the base year or from an intermediate simulation year) is transformed into the currently simulated one. The transition matrix may be expressed in terms of absolute areas L<sub>jk</sub> changing from land use LU<sub>j</sub> in the initial year s into another land use LU<sub>k</sub> in the final year t or in terms of a transition matrix sh<sub>jk</sub> giving the share (probability in a Markov chain) of initial land use LU<sub>j</sub> converted into the final LU<sub>k</sub> over the whole horizon of (t-s):
 +
 +$${LU}_{k,t} = \sum_{j}^{}{{sh}_{jk}{LU}_{j,s} = \sum_{j}^{}L_{jk}}$$
 +
 +Where the shares (probabilities) have to add up to one:
 +
 +$$1 = \sum_{k}^{}{{sh}_{jk},\ \forall j}$$
 +
 +The total areas converted from initial land use j into final land use k over the horizon (t-s) are denoted L<sub>jk</sub> above. For those land transitions we would expect that the pattern of changes resembles that observed in the past, at least if total land uses LU<sub>j</sub> change similarly as in the past. This expectation corresponds to the most likely land transitions maximising a Gamma density, giving for each transition a corresponding FOC:
 +
 +$$\ \left( \lambda_{jk} - 1 \right)L_{jk}^{- 1} - \mu_{jk} + \tau_{k}^{} + \tau_{j}^{initial} = 0$$
 +
 +Where λ<sub>jk</sub> and μ<sub>jk</sub> are parameters related to the mode (determined from the database or baseline projection) and standard deviation (assumed = 1) of the Gamma density. The variables τ<sub>k</sub> and τ<sub>j</sub> are shadow values paired with the final year land use accounting from transition probabilities and the adding up condition for probabilities.
 +
 +The original specification for land transitions as used in the CAPRI supply models involve 6x(t-s) = 120 equations for a 20 years time horizon to represent a Markov chain of annual land transitions for each region. The advantage of this specification was that annual transitions were explicit model variables that could be used to compute annual carbon effects. These were hence comparable to annual non-CO2 effects related to agricultural production and could be added therefore to obtain total GHG effects from the LULUCF sector and non-CO2 GHGs. Having annual land transitions in each regional was also acceptable from a computational viewpoint for the relatively small regional supply models of CAPRI (about 1500 equations).
 +
 +However, in the global market model all regions (about 80 with agents like farmers, consumers or landowners) have to be solved simultaneously such that the additional equations and variables for the extended land use modelling and carbon accounting (addressed in the following section) could increase solution time beyond critical limits. Given that the standard market model already includes about 80000 equations the above framework was adjusted to give the land transitions in //one// step for the change from the initial years to the final year t, while still considering that we need annual carbon effects for comparability with the annual non-CO2 emissions. This has been achieved
 +
 +  * by re-specifying the total land transitions as average transitions per year times the projection horizon and
 +  * by considering for the remaining class without land use change (on the diagonal of the land transition matrix) only the annual carbon effects per ha, relevant for the case of gains via forest management.
 +
 +=== LULUCF and carbon accounting if SUPREMA is active ===
 +
 +Within the SUPREMA project two major changes were made:
 +
 +First, integration across spatial scales was improved: a) the land activity and LULUCF representation was extended to non-European countries and b) the product-based carbon accounting was replaced by an area-based carbon accounting.
 +
 +Second, the methodological approach was changed including a) statistical estimation of land use changes assuming a gamma density as in the supply model, b) re-specification of the total land transitions as average transitions per year times the projection horizon as in the supply model (replacement of the Markov chain approach) and c) representation of the disaggregated land supply in the market model through multinomial logit form to. These changes in the SUPREMA project allow for a more symmetric land use representation and carbon accounting between the supply models for European NUTS2 regions and in the global market model of CAPRI.
 +
 +== Multinomial logit function ==
 +
 +Under SUPREMA we have introduced a multinomial logit form for land supply of all major endogenous land types f = g = h = m = {ag, fr, ur, ot}. This approach is conceptually fully in line with land supply in the regional supply models. In this way we have integrated and replaced the above separate treatment of land supply for agricultural and non-agricultural land:
 +
 +$${LT}_{m} = {SH}_{m}*T$$
 +
 +where the area share of land type m is
 +
 +$${SH}_{g} = \frac{\exp\left( \delta_{g0} + \sum_{f}^{}{\delta_{gf}R_{f}} \right)}{\sum_{m}^{}{\exp\left( \delta_{m0} + \sum_{f}^{}{\delta_{mf}R_{f}} \right)}}$$
 +
 +and the elasticity of share g (and due to constant region area also land type LT<sub>g</sub>) with respect to rent R<sub>h</sub> may be derived as
 +
 +$$\varepsilon_{gh} = \frac{\partial{SH}_{g}}{\partial R_{h}}\frac{R_{h}}{{SH}_{g}} = R_{h}\left( \delta_{gh} - \sum_{m}^{}{\delta_{mh}{SH}_{m}} \right)$$
 +
 +which permits to make use of the same empirical information (on elasticities of agricultural land supply) and assumptions (on the ranking of responsiveness of non-agricultural areas) that have been used so far in the pre-SUPREMA version. For this purpose, a calibration problem has been set up that minimises weighted squared differences to the starting values by modifying parameters δ<sub>mh</sub>. Due to its symmetric treatment of all major land uses the system also includes supply elasticities for non-agricultural areas. In “standard” scenarios these are unlikely to play a relevant role. The key parameters are the “cross-rent” elasticities of non-agricultural areas with respect to agricultural rents as these are steering now which non-agricultural areas are increasing if agricultural area declines and vice versa. However, in the context of global carbon price scenarios also the supply elasticities of non-agricultural areas play an important role even though we do not introduce assumptions on changing prices of urban land, forest land or other land. This is because a global carbon price creates an endogenous mark-up for land rental prices of non-agricultural areas that reflect the value of the carbon effects from changing land use. In particular the rental price of forest land R<sub>fr</sub> is strongly reduced and might become negative in scenarios with high carbon prices.
 +
 +== Spatial extension ==
 +
 +Under SUPREMA the land use categories of the market model are mapped to the UNFCCC categories. The mapping of market model land types LT<sub>l</sub> to UNFCCC land use LU<sub>k</sub> will rely on the most recent historical shares ϕ<sub>kl</sub> of UNFCCC land use k in CAPRI land type l:
 +
 +$${LU}_{k} = \sum_{l}^{}{\varphi_{kl}{LT}_{l}}$$
 +
 +These shares are trivially zero or one in case that certain land types like “temporary non-fodder crops” (tc) and permanent crops (pc) are exclusively mapped to one UNFCCC category (cropland). The remainder to total cropland derives from temporary fodder and fallow land which is a fraction of total fodder area with the remainder being (productive) permanent grassland. The allocation of “other land” (ot) to grassland (ϕ<sub>glot</sub>), wetland (ϕ<sub>wlot</sub>) and residual land (ϕ<sub>rlot</sub>) may occur as in the European database but required that some CAPRI code in use for the supply models was transferred into the context of the extended global market model.
 +
 +== Land transitions as average transitions per year times the projection horizon  ==
 +
 +The new accounting in the CAPRI global market model may be explained as follows, starting from a calculation of the total GHG effects G over horizon h = t-s from total land transitions L<sub>jk</sub> and carbon effects per ha for the whole period e<sub>jk</sub>:
 +
 +$$G = \Gamma \bullet h = \sum_{i,j}^{}{e_{ij}L_{ij}}$$
 +
 +Where Γ collects the annual GHG effects that correspond to the total GHG effects divided by the time horizon G / h. These annual effects may be calculated as based on average annual transitions and annual effects for the remaining class as follows:
 +
 +$
 +$$$\Gamma = \sum_{i,j}^{}{e_{ij}L_{ij}/h} = \sum_{i \neq j}^{}{e_{ij}\Lambda_{ij}} + \sum_{i}^{}{\varepsilon_{ii}L_{ii}}$$
 +
 +Where Λ<sub>ij</sub> = L<sub>ij</sub> / h is the average land use change per year and ε<sub>ii</sub> is the annual carbon effect on a remaining class (relevant might be an annual increase due to growing forests while this will be zero for most effects based on IPCC default assumptions).
 +
 +Using these average annual transitions for true (off-diagonal) LUC we may compute the final classes as follows:
 +
 +$${LU}_{k,t} = \sum_{j}^{}L_{jk} = \sum_{j \neq k}^{}\Lambda_{jk} \bullet h + L_{kk}$$
 +
 +While adding up of shares (or probabilities) of LUC from class I to k over all receiving classes k continues to hold as stated above. It should be highlighted that the land use accounting implemented under SUPREMA avoids the need to explicitly trace the annual transitions in the form of a Markov chain and thereby economised on equations and variables. In this form LUC by CAPRI region and the associated accounting of carbon effects turned out computationally feasible even though the number of equations in the global market model increased from about 78000 to about 83000. Apart from feasibility the format above also permitted to retain the typical CAPRI accounting identity that some total “quantity” (“GROF”) should be computable as the effects “per activity” times activity levels. It was therefore also adopted in the CAPRI supply models.
 +
 +=== Technical aspects ===
 +
 +Concerning the improvements made under SUPREMA from a technical perspective, the changes are merged to the trunk. The approach is controlled by globals in capmod\set_global_variables.gms. If the global variable %supremaMrk% == on, the yearly transition rate p_lucAnnualFac_sup is calculated, land activity is expaned to non-european countries and the multinomial logit form approach is used to model land supply responsiveness. If it is %supremaMrk% == off, the old approach using the Marcov chain is used with the respective variable v_luYearly (for details on Marcov chain approach see [[module_for_agricultural_supply_at_regional_level|supply model description]]). The FOC-approach to calculate LUC as described above is standard and independent from if the global variable supremaMrk is on or off.
 +
 +=== Carbon accounting ===
 +
 +A last recent change concerns the transfer of the existing carbon accounting equations from the supply model to the global market model. These equations run if the global variable %supremaMrk% == on. More information on the equations can be found in the [[module_for_agricultural_supply_at_regional_level|description of the supply model]]. The equations concerned are, indicated with their present “CAPRI names” in the supply models and plus “Mrk” in the market model:
 +
 +Table 3. Equations concerning mitigation modelling in CAPRI
 +
 +^__Supply model__^__Market model__  ^
 +|GWPCO2BIO_      |GWPCO2BIOMrk_(RMS)|
 +|GWPCO2SOI_      |GWPCO2SOIMrk_(RMS)|
 +|GWPN2OSOI_      |GWPN2OSOIMrk_(RMS)|
 +|GWPCO2BUR_      |GWPCO2BURMrk_(RMS)|
 +|GWPCH4BUR_      |GWPCH4BURMrk_(RMS)|
 +|GWPN2OBUR_      |GWPN2OBURMrk_(RMS)|
 +|GWPCO2HIS_      |GWPCO2HISMrk_(RMS)|
 +|GWPCH42HIS_     |GWPCH4HISMrk_(RMS)|
 +
 +As most CAPRI regions combine only a small number of climate zones and we may assume for an illustrative calculation three (out of 9). In this case we would have 22 additional equations for carbon accounting per region and 1738 equations in total (on top of those for land use modelling mentioned above), confirming the order of magnitude for the additional equations that was mentioned above.
 +
 +For the technical coefficients we could rely on the FAO data compiled for the implementation of LULUCF accounting in the supply models. Here they served often only a fall-back solution in case that some European dataset was missing, but for the global market model the FAO data are often the only source of data readily available.
 +
 +There is one new element required for the planned implementation of a carbon tax deriving from land use and land use changes: In the supply models the tax is simply added as a cost element in the existing income accounting for the regional farms to make it effective. In the global market model there is no explicit income accounting. The carbon tax levied so far on non-CO2 emissions has been translated therefore into a tax on outputs, depending on the product based non-CO2 emission factors of outputs that may be changed implicitly. For LULUCF an explicit tax on land use has been introduced. This required to treat land demand and land supply for temporary and permanent crops and fodder as separate qualities with distinct rental prices for market clearing. 
  
 ====Behavioural equations for final demand==== ====Behavioural equations for final demand====
Line 1094: Line 1564:
 The following table shows the substitution elasticities used for the different product groups. Compared to most other studies, we opted for a rather elastic substitution between products from different origins, as agricultural products are generally more uniform then aggregated product groups, as they can be found e.g. in CGE models. The following table shows the substitution elasticities used for the different product groups. Compared to most other studies, we opted for a rather elastic substitution between products from different origins, as agricultural products are generally more uniform then aggregated product groups, as they can be found e.g. in CGE models.
  
-**Table 28: Substitution elasticities for the Armington CES utility aggregators((A sensitivity analysis on those elasticities is given in section [[Sensitivity analysis]]))**+**Table 28: Substitution elasticities for the Armington CES utility aggregators((A sensitivity analysis on those elasticities is given in section [[scenario simulation#Sensitivity analysis]]))**
  
 ^Product (group) ^Substitution elasticity between domestic sales and imports  ^Substitution elasticity between import flows ^ ^Product (group) ^Substitution elasticity between domestic sales and imports  ^Substitution elasticity between import flows ^
Line 1101: Line 1571:
 |Other fruits |  3 |  3  | |Other fruits |  3 |  3  |
 |Sugar| 12  | 12  | |Sugar| 12  | 12  |
-|All other products| 8 |  10  | \\Source: own calculations +|All other products| 8 |  10  |  
 +Source: own calculations
 There are some specific settings, such as a value of 2 for rice and the EU15, 2.5 respectively 5 for Japan to account for its specific tariff system, as well as some lower values for EU’s Mediterrean partner countries. There are some specific settings, such as a value of 2 for rice and the EU15, 2.5 respectively 5 for Japan to account for its specific tariff system, as well as some lower values for EU’s Mediterrean partner countries.
  
 **Figure 19: Two-stage Armington System** **Figure 19: Two-stage Armington System**
  
-{{::figure_19.png?600|}} \\ Soruce: Capri Modelling System+{{::figure_19.png?600|Source: Capri Modelling System}}
  
-The above “primal” formulation of the Armington approach in terms of quantity aggregators turned out numerically less stable in the implementaiotn than the dual representation in terms of price aggregators. The Armington approach suffers from two important shortcomings. First of all, a calibration to a zero flow is impossible so that only observed import flows react to policy changes while all others are fixed at zero level. For most simulation runs, that shortcoming should not be serious. If it is relevant, it may be overcome using the modified Armington approach as explained in Section [[Market module for agricultural outputs#Price linkages]]. +The above “primal” formulation of the Armington approach in terms of quantity aggregators turned out numerically less stable in the implementaiotn than the dual representation in terms of price aggregators. The Armington approach suffers from two important shortcomings. First of all, a calibration to a zero flow is impossible so that only observed import flows react to policy changes while all others are fixed at zero level. For most simulation runs, that shortcoming should not be serious. If it is relevant, it may be overcome using the modified Armington approach as explained in Section [[scenario simulation#Price linkages]]. 
  
 Secondly, the Armington aggregator defines a utility aggregate and not a physical quantity. That second problem is healed by re-correcting in the post model part to physical quantities. Little empirical work can be found regarding the estimation of the functional parameters of Armington systems. Hence, substitution elasticities were chosen as to reflect product properties as shown above. Secondly, the Armington aggregator defines a utility aggregate and not a physical quantity. That second problem is healed by re-correcting in the post model part to physical quantities. Little empirical work can be found regarding the estimation of the functional parameters of Armington systems. Hence, substitution elasticities were chosen as to reflect product properties as shown above.
Line 1172: Line 1642:
 \end{equation} \end{equation}
  
-{{::code_p194.png?600|}}+{{::code_p194.png?600}}
  
 The reader is reminded that currently, the PSE data are not introduced in the system with two exceptions: carbon price scenarios involve negative PSEi amounts and Swiss agricultural policies are involving land subsidies entered. The reader is reminded that currently, the PSE data are not introduced in the system with two exceptions: carbon price scenarios involve negative PSEi amounts and Swiss agricultural policies are involving land subsidies entered.
Line 1234: Line 1704:
 **Figure 20: Witzke et al. calibration, two-goods case** **Figure 20: Witzke et al. calibration, two-goods case**
  
-{{::figure20.png?600|}} \\ Source: Witzhe et al 2005+{{::figure_20.png?600|Source: Witzhe et al 2005}}
  
 The additional commitment parameter involves another degree of freedom that needs to be eliminated with additional information. During the calibration this is provided by the expected imports from region 2 at the second hypothetical set of relative prices. Following the dual approach, the lower Armington nest is represented with Armington share-equations and with equations for the composite price indexes: The additional commitment parameter involves another degree of freedom that needs to be eliminated with additional information. During the calibration this is provided by the expected imports from region 2 at the second hypothetical set of relative prices. Following the dual approach, the lower Armington nest is represented with Armington share-equations and with equations for the composite price indexes:
Line 1246: Line 1716:
 **Code implementation in the CAPRI market model** **Code implementation in the CAPRI market model**
  
-The Witzke et al. approach is implemented in a modular fashion in the CAPRI market model. The calibration of the modified Armington lower nest can be switched on or off through a designated button on the CAPRI GUI  (see the next Figure). In order not to interfere with the work of other CAPRI users, a specific GUI is created for the project that can be started by running GUI\capri64modarm.bat.+The Witzke et al. approach is implemented in a modular fashion in the CAPRI market model. The calibration of the modified Armington lower nest can be switched on or off through a designated button on the CAPRI GUI  (see the next Figure). In order not to interfere with the work of other CAPRI users, a specific GUI is created for the project that can be started by running GUI/capri64modarm.bat.
  
 **Figure 21: GUI Option for the non-homothetic Armington system** **Figure 21: GUI Option for the non-homothetic Armington system**
  
-{{::figure21.png?600|}}+{{::figure_21.png?600}}
  
-The calibration of the non-homothetic Armington demand system does not require a full re-calibration of the complete CAPRI modelling system; it can be found under the workstep “Run scenario”, task: “Run scenario with market model”. Technically, the calibration modifies the simini\sim_ini.gdx file that contains the necessary starting parameters for a CAPRI simulation: if the above GUI option is selected then the existing sim_ini.gdx file is automatically deleted and the create_sim_ini CAPRI module is called. This is all steered in the main capmod.gms file by a specific GAMS setglobal variable called modArmington:+The calibration of the non-homothetic Armington demand system does not require a full re-calibration of the complete CAPRI modelling system; it can be found under the workstep “Run scenario”, task: “Run scenario with market model”. Technically, the calibration modifies the simini/sim_ini.gdx file that contains the necessary starting parameters for a CAPRI simulation: if the above GUI option is selected then the existing sim_ini.gdx file is automatically deleted and the create_sim_ini CAPRI module is called. This is all steered in the main capmod.gms file by a specific GAMS setglobal variable called modArmington:
  
-{{:code_p196.png?600|}}+{{:code_p196.png?600}}
  
-The calibration model itself is called directly by the arm\market1.gms file:+The calibration model itself is called directly by the arm/market1.gms file:
  
-{{:code_p196_2.jpg?600|}}+{{:code_p196_2.jpg?600}}
  
-The file arm\modArmington.gms file contains the definition of the calibration model and executes the calibration itself. The calibration model simply consists of Armington share equations (importShares_) and price index equations (arm2PriceAgg _), following the approach presented above.+The file arm/modArmington.gms file contains the definition of the calibration model and executes the calibration itself. The calibration model simply consists of Armington share equations (importShares_) and price index equations (arm2PriceAgg _), following the approach presented above.
  
-{{:code_p197.jpg?600|}}+{{:code_p197.jpg?600}}
  
-The share- and price index equations of the calibration model are similar to those in the CAPRI market model, but extended with an additional dimension called ‘cal_points’. The additional dimension indicates whether the equations correspond to the observed or the expected calibration points. The arm\modArmington.gms file calculates the expected price/quantity framework necessary for the Witzke et al. approach. The data input for this calculation is currently implemented in the scenario file in order to allow for a compact definition of baseline and scenario assumptions. The test scenario for the Witzke et al. demand system assumes the following expected EU poultry imports from the US under a hypothetical import price:+The share- and price index equations of the calibration model are similar to those in the CAPRI market model, but extended with an additional dimension called ‘cal_points’. The additional dimension indicates whether the equations correspond to the observed or the expected calibration points. The arm/modArmington.gms file calculates the expected price/quantity framework necessary for the Witzke et al. approach. The data input for this calculation is currently implemented in the scenario file in order to allow for a compact definition of baseline and scenario assumptions. The test scenario for the Witzke et al. demand system assumes the following expected EU poultry imports from the US under a hypothetical import price:
  
-{{:code_p197_2.jpg?600|}}+{{:code_p197_2.jpg?600}}
  
 The calibrated share equations and the commitment terms are then stored in the appropriate parameters and later picked up by the market model. The relevant equations of the market model, therefore, also had to be modified. For example, the Armington share equations of the CAPRI market model are extended with the commitment term (p_arm2Commit = \(\mu\)): The calibrated share equations and the commitment terms are then stored in the appropriate parameters and later picked up by the market model. The relevant equations of the market model, therefore, also had to be modified. For example, the Armington share equations of the CAPRI market model are extended with the commitment term (p_arm2Commit = \(\mu\)):
  
-{{:code_p197_3.jpg?600|}}+{{:code_p197_3.jpg?600}}
  
-The calibration of the full market model is tested by solving the model at trend values in the CAPRI module arm\prep_market.gms. This module also had to be modified in order to initialize the modified Armington system appropriately. The modifications mostly affect the trade flows, import prices and trade policy instruments.+The calibration of the full market model is tested by solving the model at trend values in the CAPRI module arm/prep_market.gms. This module also had to be modified in order to initialize the modified Armington system appropriately. The modifications mostly affect the trade flows, import prices and trade policy instruments.
  
 If properly calibrated, the modified Armington system with the test reference scenario should replicate the standard baseline results. It means, for example, that emerging trade flows being zero in the baseline will remain zero in the reference run and only become positive under specific scenario assumptions. If properly calibrated, the modified Armington system with the test reference scenario should replicate the standard baseline results. It means, for example, that emerging trade flows being zero in the baseline will remain zero in the reference run and only become positive under specific scenario assumptions.
Line 1282: Line 1752:
 **Figure 22: Construction of the ethanol market implemented in CAPRI** FIXME **Figure 22: Construction of the ethanol market implemented in CAPRI** FIXME
  
-{{::figure_22.png?600|}} \\ Soruce: Capri Modelling System+{{::figure_22.png?600|Source: Capri Modelling System}}
  
 Basically two biofuel product markets are covered in the model; Ethanol (BIOE) and Biodiesel (BIOD). For total domestic ethanol production, three technology pathways are covered; 1st generation ethanol (BIOFE) - differentiated in wheat, barley, rye, oats, maize, other cereals, sugar and table wine, 2nd generation ethanol (SECG), and non-agricultural ethanol (NAGR).  Basically two biofuel product markets are covered in the model; Ethanol (BIOE) and Biodiesel (BIOD). For total domestic ethanol production, three technology pathways are covered; 1st generation ethanol (BIOFE) - differentiated in wheat, barley, rye, oats, maize, other cereals, sugar and table wine, 2nd generation ethanol (SECG), and non-agricultural ethanol (NAGR). 
Line 1290: Line 1760:
 **Figure 23: Construction of the biodiesel market implemented in CAPRI** **Figure 23: Construction of the biodiesel market implemented in CAPRI**
  
-{{:figure_23.png?600|}} \\ Soruce: Capri Modelling System+{{:figure_23.png?600|Source: Capri Modelling System}} 
  
 The figure below provides a schematic diagram of the process of 2nd generation biofuel production in CAPRI. Two different product aggregates are introduced in the CAPRI product list to cover feedstock for 2nd generation biofuel processing: The figure below provides a schematic diagram of the process of 2nd generation biofuel production in CAPRI. Two different product aggregates are introduced in the CAPRI product list to cover feedstock for 2nd generation biofuel processing:
Line 1301: Line 1771:
 **Figure 24: Consideration of 2nd generation biofuel production and related feedstock** **Figure 24: Consideration of 2nd generation biofuel production and related feedstock**
  
-{{::figure_24.png?600|}} \\ Soruce: own illustration+{{::figure_24.png?600|Source: own illustration}} 
  
 ===Biofuel supply and feedstock demand=== ===Biofuel supply and feedstock demand===
Line 1352: Line 1822:
 **Figure 25: Biofuel supply function in France** **Figure 25: Biofuel supply function in France**
  
-{{::figure_25.png?600|}} \\ Source: own calculations+{{::figure_25.png?600|Source: own calculations}} 
  
 The supply of by products is directly linked to the first generation biofuel output: The supply of by products is directly linked to the first generation biofuel output:
Line 1378: Line 1848:
 **Figure 25: Biofuel demand share function in France** **Figure 25: Biofuel demand share function in France**
  
-{{::figure_26.png?600|}} \\ Source: own calculations+{{::figure_26.png?600|Source: own calculations}}
  
 Total biofuel demand (\(d_{r,xb}\)) is then derived by multiplying this share to the exogenous total fuel demand (\(d_{r,f}\)): Total biofuel demand (\(d_{r,xb}\)) is then derived by multiplying this share to the exogenous total fuel demand (\(d_{r,f}\)):
Line 1419: Line 1889:
 **Table 29: Overview of pillar II measures modelled in CAPRI** FIXME **Table 29: Overview of pillar II measures modelled in CAPRI** FIXME
  
-{{::table_29.png?350|}} \\ Source: Own calculation based on PRIMES 2009+{{::table_29.png?350|Source: Own calculation based on PRIMES 2009}} 
  
 **Biofuel Trade** **Biofuel Trade**
Line 1427: Line 1897:
 ===Calibration of the biofuel system=== ===Calibration of the biofuel system===
  
-So far, only the general form of the biofuel supply and demand functions where derived, but without any adjustments, they won’t reproduce the biofuel price-quantity framework of our baseline. Therefore both behavioural functions are due to a calibration process which takes place in ‘//gams\biofuel\def_biofuel_params.gms//’.+So far, only the general form of the biofuel supply and demand functions where derived, but without any adjustments, they won’t reproduce the biofuel price-quantity framework of our baseline. Therefore both behavioural functions are due to a calibration process which takes place in ‘//gams/biofuel/def_biofuel_params.gms//’.
  
 Firstly, the demand system is calibrated. We here assume that only the part of the observed biofuel demand share in total fuel demand that is above the quota obligations is the result of a consumer decision and thus a result of the flexible parts on the demand equations. To calibrate the demand functions to the observed combination of the price ratio bio- to fossil fuel and demand share in total fuel consumption, we chose the two parameters \(X^1\) and \(X^2\) such that: Firstly, the demand system is calibrated. We here assume that only the part of the observed biofuel demand share in total fuel demand that is above the quota obligations is the result of a consumer decision and thus a result of the flexible parts on the demand equations. To calibrate the demand functions to the observed combination of the price ratio bio- to fossil fuel and demand share in total fuel consumption, we chose the two parameters \(X^1\) and \(X^2\) such that:
Line 1475: Line 1945:
 **Figure 28: Endogenous administrative stocks in CAPRI** **Figure 28: Endogenous administrative stocks in CAPRI**
  
-{{::figure_28.png?600|}} \\ Source: own illustration+{{::figure_28.png?600|Source: own illustration}}
  
 **Purchases to intervention stocks** //v_buyingToIntervStock// depend on the probability of the current market price //v_marketPrice// to undercut the administrative price //padm// and a calibration parameter \(\gamma^p\), assuming a normally distributed market price with standard deviation //stddev// and maximal amounts of purchases //INTM//: **Purchases to intervention stocks** //v_buyingToIntervStock// depend on the probability of the current market price //v_marketPrice// to undercut the administrative price //padm// and a calibration parameter \(\gamma^p\), assuming a normally distributed market price with standard deviation //stddev// and maximal amounts of purchases //INTM//:
Line 1488: Line 1958:
  
 \begin{equation} \begin{equation}
-intd_{i,r} = (intk_{i,r}+intp__{i,r}) errf \left ( \left( uvae_{i,r} - pmrk_{i,r} + \gamma_{i,r}^p\right ) / stddev_{i,r} \right )+intd_{i,r} = (intk_{i,r}+intp_{i,r}) errf \left ( \left( uvae_{i,r} - pmrk_{i,r} + \gamma_{i,r}^p\right ) / stddev_{i,r} \right )
 \end{equation} \end{equation}
  
Line 1509: Line 1979:
 **Figure 29: Quota underfill regime** **Figure 29: Quota underfill regime**
  
-{{:figure_29.png?600|}} \\ Source: own illustration+{{:figure_29.png?600|Source: own illustration}}
  
 **Quota binding, i.e. exactly filled**: the in-quota tariff is applied. The willingness to pay of consumers and thus the price paid is somewhere between the border plus the in-quota tariff and the border price plus the MFN tariff. The difference between the price in the market and the border price plus the in-quota tariff establishes a quota rent. Depending on property rights on the quota and the allocation mechanism, the quota rent is shared in different portions by the producers, importing agencies, the domestic marketing chain or the administration. Typically, the quota rent can neither be observed nor is their knowledge about distribution of the rent. **Quota binding, i.e. exactly filled**: the in-quota tariff is applied. The willingness to pay of consumers and thus the price paid is somewhere between the border plus the in-quota tariff and the border price plus the MFN tariff. The difference between the price in the market and the border price plus the in-quota tariff establishes a quota rent. Depending on property rights on the quota and the allocation mechanism, the quota rent is shared in different portions by the producers, importing agencies, the domestic marketing chain or the administration. Typically, the quota rent can neither be observed nor is their knowledge about distribution of the rent.
Line 1515: Line 1985:
 **Figure 30: Quota binding regime** **Figure 30: Quota binding regime**
  
-{{:figure_30.png?600|}} \\ Source: own illustration+{{:figure_30.png?600|Source: own illustration}} 
  
 **Quota overfill**: the higher MFN-tariff is applied. The quota rent is equal to the difference between the MFN and the in-quota tariff. Again, how the quota rent is distributed to agents is typically not known. **Quota overfill**: the higher MFN-tariff is applied. The quota rent is equal to the difference between the MFN and the in-quota tariff. Again, how the quota rent is distributed to agents is typically not known.
Line 1521: Line 1991:
 **Figure 31: Quota overfill regime** **Figure 31: Quota overfill regime**
  
-{{:figure_31.png?600|}} \\ Source: own illustration+{{:figure_31.png?600|Source: own illustration}}
  
 The fill rate for global TRQs is defined in the code as follows, adding all imports which are not under no duty/not quota access (p_doubleZero), not from the same trade block and not prohibited. A special case provides a bi-lateral quota, here, only import quantities beyond the allocated quota quantity enter the global one. The fill rate for global TRQs is defined in the code as follows, adding all imports which are not under no duty/not quota access (p_doubleZero), not from the same trade block and not prohibited. A special case provides a bi-lateral quota, here, only import quantities beyond the allocated quota quantity enter the global one.
Line 1539: Line 2009:
 **Figure 32: Variable levies** **Figure 32: Variable levies**
  
-{{:figure_32.png?600|}} \\ Source: own illustration+{{:figure_32.png?600|Source: own illustration}} 
  
 In CAPRI, the system is implemented as follows: In CAPRI, the system is implemented as follows:
Line 1561: Line 2031:
 **Figure 33: EU entry price system for fruits and vegetables** **Figure 33: EU entry price system for fruits and vegetables**
  
-{{:figure_33.png?600|}} \\ Source: own illustration+{{:figure_33.png?600|Source: own illustration}} 
  
 In order to implement the system, first the difference beween 96% of the entry price and the cif in relation to the triggerprice is defined, times a possible factor to ease solution. In order to implement the system, first the difference beween 96% of the entry price and the cif in relation to the triggerprice is defined, times a possible factor to ease solution.
  
-{{::code_p213.png?600|}}+{{::code_p213.png?600}}
  
 That factor is the fed into a modified sigmoid function which as a result approximates the relations in the graphic shown above: That factor is the fed into a modified sigmoid function which as a result approximates the relations in the graphic shown above:
Line 1585: Line 2055:
 **Figure 34: Tariff computation in the model** **Figure 34: Tariff computation in the model**
  
-{{::figure_34.png?600|}} \\ Source: own illustration+{{::figure_34.png?600|Source: own illustration}} 
  
 ====Welfare-consistent tariff aggregation module ==== ====Welfare-consistent tariff aggregation module ====
Line 1629: Line 2099:
 The only source of trade policy data at the tariff line level in the current CAPRI system is the AMAD database. AMAD is not anymore updated by OECD, and in many respect contains outdated policy information. According to the Technical Specification, the current study relies on the AMAD data, and does not include and update of trade policies at the tariff line level. This is a clear limitation that should be improved on in the future. It is very likely that a combination of additional trade policy databases need to be added to CAPRI for a correct and comprehensive representation of global trade policies at the tariff line level. MAcMap  is one of the candidates to be included, containing global trade protection measures at HS6 level. MAcMap, however, contains TRQs already in a converted tariff-equivalent form, and is therefore insufficient to provide policy data for the explicit TRQ mechanism in the new tariff aggregation module.  The only source of trade policy data at the tariff line level in the current CAPRI system is the AMAD database. AMAD is not anymore updated by OECD, and in many respect contains outdated policy information. According to the Technical Specification, the current study relies on the AMAD data, and does not include and update of trade policies at the tariff line level. This is a clear limitation that should be improved on in the future. It is very likely that a combination of additional trade policy databases need to be added to CAPRI for a correct and comprehensive representation of global trade policies at the tariff line level. MAcMap  is one of the candidates to be included, containing global trade protection measures at HS6 level. MAcMap, however, contains TRQs already in a converted tariff-equivalent form, and is therefore insufficient to provide policy data for the explicit TRQ mechanism in the new tariff aggregation module. 
  
-The code implementation of the UN-COMTRADE data processing is modular, i.e. it can be switched on and off upon demand. A dedicated option in the GUI activates the data processing algorithms in the global part of CAPRI (see below). Technically, the extended GAMS routines create an additional intermediate dataset (‘//\global\tariff_aggregation.gdx//’) that is a direct input of the tariff aggregation module in subsequent steps. The .gdx file contains bilateral trade and tariff information at the tariff line level, already mapped into the CAPRI regional nomenclature.+The code implementation of the UN-COMTRADE data processing is modular, i.e. it can be switched on and off upon demand. A dedicated option in the GUI activates the data processing algorithms in the global part of CAPRI (see below). Technically, the extended GAMS routines create an additional intermediate dataset (‘// /global/tariff_aggregation.gdx//’) that is a direct input of the tariff aggregation module in subsequent steps. The .gdx file contains bilateral trade and tariff information at the tariff line level, already mapped into the CAPRI regional nomenclature.
  
 **Figure 35: Tariff computation in the model** **Figure 35: Tariff computation in the model**
  
-{{:figure_35.jpg?600|}} \\ Source: CAPRI Modelling System+{{:figure_35.jpg?600|Source: CAPRI Modelling System}} 
  
 The different tasks implemented in the aggreg_tariffs.gms tariff aggregation module includes: The different tasks implemented in the aggreg_tariffs.gms tariff aggregation module includes:
  
-  * Defining nomenclatures and sets for the UN-COMTRADE dataset (‘global\comtrade_sets.gms’)+  * Defining nomenclatures and sets for the UN-COMTRADE dataset (‘global/comtrade_sets.gms’)
   * Processing, filtering and mapping UN-COMTRADE data in order to align it with the CAPRI database   * Processing, filtering and mapping UN-COMTRADE data in order to align it with the CAPRI database
   * Aggregate tariffs to the CAPRI regional nomenclature. The aggregation follows the standard CAPRI approach; the only difference is that tariffs are not aggregated over tariff lines.   * Aggregate tariffs to the CAPRI regional nomenclature. The aggregation follows the standard CAPRI approach; the only difference is that tariffs are not aggregated over tariff lines.
Line 1650: Line 2120:
 **Figure 36: Activation of the tariff aggregation module on the GUI** **Figure 36: Activation of the tariff aggregation module on the GUI**
  
-{{:figure_36.jpg?600|}} \\ Source: CAPRI Modelling System+{{:figure_36.jpg?600|Source: CAPRI Modelling System}} 
  
 The tariff aggregation module takes over the appropriate tariff cuts from the scenario file and applies them at the tariff line level. The module then feeds back an aggregate tariff equivalent of the resulting (cut) tariffs. The tariff aggregation module takes over the appropriate tariff cuts from the scenario file and applies them at the tariff line level. The module then feeds back an aggregate tariff equivalent of the resulting (cut) tariffs.
Line 1664: Line 2134:
 Generally, tariff cuts have to be defined in a specific format in the CAPRI scenario file. A simple example is illustrated in hte following, where ad-valorem and specific tariffs are cut relative to their initial level and TRQ thresholds are increased. Generally, tariff cuts have to be defined in a specific format in the CAPRI scenario file. A simple example is illustrated in hte following, where ad-valorem and specific tariffs are cut relative to their initial level and TRQ thresholds are increased.
  
-{{::code_p220.png?600|}}+{{::code_p220.png?600}}
  
-{{::code_p220_2.png?600|}}+{{::code_p220_2.png?600}}
  
 **Reporting (GUI tables)** **Reporting (GUI tables)**
Line 1672: Line 2142:
 The GUI has been extended with tables under 'Trade|Advanced tariff aggregators' that collect the results of the tariff aggregation module:  The GUI has been extended with tables under 'Trade|Advanced tariff aggregators' that collect the results of the tariff aggregation module: 
  
-{{:gui_p220.png?600|}} \\ Source: CAPRI Modelling System+{{:gui_p220.png?600|Source: CAPRI Modelling System}}
  
 The MacMap-type aggregators are calculated both with respect to bilateral trade relations and with respect to a total ('from World') measure of tariff/TRQ restrictions. In the above calculation of total aggregate measures, imports from other countries are neglected; an assumption that can be easily relaxed if relevant policy and trade data will be available in future applications. MacMap-type trade weighted aggregators give the following results. The MacMap-type aggregators are calculated both with respect to bilateral trade relations and with respect to a total ('from World') measure of tariff/TRQ restrictions. In the above calculation of total aggregate measures, imports from other countries are neglected; an assumption that can be easily relaxed if relevant policy and trade data will be available in future applications. MacMap-type trade weighted aggregators give the following results.
  
-{{:gui_p221.png?600|}}+{{:gui_p221.png?600}}
  
 TRI estimates are also reported in a specific GUI table. By definition the TRI indicies are defined for all trade relations only (not a bilateral index): TRI estimates are also reported in a specific GUI table. By definition the TRI indicies are defined for all trade relations only (not a bilateral index):
  
-{{:gui_p221_2.png?600|}}+{{:gui_p221_2.png?600}}
  
 The Anderson tariff combination is presented next. The current implementation is an extension of the original approach, including correction factors for TRQs (Himics and Britz, 2014): The Anderson tariff combination is presented next. The current implementation is an extension of the original approach, including correction factors for TRQs (Himics and Britz, 2014):
  
-{{:gui_p221_3.png?600|}}+{{:gui_p221_3.png?600}}
  
 The Bach and Martin (2001) approach, i.e. a combination of an aggregator for the expenditures and another one for the tariff revenues, is also implemented and reported in a designated GUI table: The Bach and Martin (2001) approach, i.e. a combination of an aggregator for the expenditures and another one for the tariff revenues, is also implemented and reported in a designated GUI table:
  
-{{:gui_p222.png?600|}}+{{:gui_p222.png?600}}
  
 ====Overview on a regional module inside the market model==== ====Overview on a regional module inside the market model====
Line 1696: Line 2166:
 **Figure 37: Graphical presentation for one region of a spatial market system ** **Figure 37: Graphical presentation for one region of a spatial market system **
  
-{{:figure_37.png?600|}} \\ Source: CAPRI modelling system +{{:figure_37.png?600|Source: CAPRI modelling system }} 
  
 ====Basic interaction inside the market module during simulations==== ====Basic interaction inside the market module during simulations====
Line 1712: Line 2182:
 The solution of the market model with its close to 750.000 equations of which some are highly non-linear poses a serious challenge for any non-linear solver. CAPRI applies CONOPT which has proven quite stable and fast to solve both constrained system and optimization problems. However, even CONOPT would spend quite some time when trying to solve the full market model in one block after a larger shock is introduced. The solution of the market model with its close to 750.000 equations of which some are highly non-linear poses a serious challenge for any non-linear solver. CAPRI applies CONOPT which has proven quite stable and fast to solve both constrained system and optimization problems. However, even CONOPT would spend quite some time when trying to solve the full market model in one block after a larger shock is introduced.
  
-Therefore, a sequence of pre-solves is introduced (see //‘arm\simu_prestep.gms’//). Firstly, single commodity models are defined by only allowing changes of the endogenous variables of one commodity in the equation template. Cross prices and their effects on quantities for variables related to the current market are hence fixed. These relatively small models can typically be solved rapidly by the solver, and are solved in parallel based on the so-called “grid solve option” in GAMS. That process is repeated a few times, each time updating the cross prices, to let differences between the single models and the full system decrease.+Therefore, a sequence of pre-solves is introduced (see //‘arm/simu_prestep.gms’//). Firstly, single commodity models are defined by only allowing changes of the endogenous variables of one commodity in the equation template. Cross prices and their effects on quantities for variables related to the current market are hence fixed. These relatively small models can typically be solved rapidly by the solver, and are solved in parallel based on the so-called “grid solve option” in GAMS. That process is repeated a few times, each time updating the cross prices, to let differences between the single models and the full system decrease.
  
 As a next step, the single products are clustered to groups where larger cross price effects can be expected, such as all cereals or all oilseeds. Again, these groups are solved repeatedly, in each round with updated cross-prices, to close in to the final solution. The full system is only solved at the very end. As a next step, the single products are clustered to groups where larger cross price effects can be expected, such as all cereals or all oilseeds. Again, these groups are solved repeatedly, in each round with updated cross-prices, to close in to the final solution. The full system is only solved at the very end.
Line 1720: Line 2190:
 Another problem possible problem beside long solution times is the occurrence of infeasibilities. Bounds are generally introduced for all endogenous variables to avoid numerical errors such as a division by zero. Bounds also help the solver in the solution process. However, they might also restrict the solution space so that no feasible solution exists. The CES functions for the Armington might as a response to a larger price shocks – e.g. provoked by removal of very large tariffs – drive trade flows almost to zero towards their lower bounds. Once that bounds are hit, the equation system is not longer symmetric as a new constraint becomes binding, and typically, the system will become infeasibility. If one would have the time to inspect the solution, one might perhaps accept that if the infeasibility is small and found only for that CES share equation. It is however generally impossible to leave it up to the model user to decide if she accepts infeasibility solutions or not, simply as there is simply not enough time to check these infeasibilities. Another problem possible problem beside long solution times is the occurrence of infeasibilities. Bounds are generally introduced for all endogenous variables to avoid numerical errors such as a division by zero. Bounds also help the solver in the solution process. However, they might also restrict the solution space so that no feasible solution exists. The CES functions for the Armington might as a response to a larger price shocks – e.g. provoked by removal of very large tariffs – drive trade flows almost to zero towards their lower bounds. Once that bounds are hit, the equation system is not longer symmetric as a new constraint becomes binding, and typically, the system will become infeasibility. If one would have the time to inspect the solution, one might perhaps accept that if the infeasibility is small and found only for that CES share equation. It is however generally impossible to leave it up to the model user to decide if she accepts infeasibility solutions or not, simply as there is simply not enough time to check these infeasibilities.
  
-Fortunately, CONOPT helps us with in that case as it uses a gradient approach to reduce the sum of infeasibilities. It therefore introduces an objective into our problem, does also adding dual values to the constraints. We hence can inspect automatically the solution to find out which bounds carry a shadow values – removing these bounds will reduce the sum of infeasibilities. There is hence code (‘//arm\widen_bounds.gms//’) which in case of a infeasible solution will check which bounds carry dual values and will expand those stepwise. That proceeding generally guarantees that for most shocks, the market model finds a feasible solution.+Fortunately, CONOPT helps us with in that case as it uses a gradient approach to reduce the sum of infeasibilities. It therefore introduces an objective into our problem, does also adding dual values to the constraints. We hence can inspect automatically the solution to find out which bounds carry a shadow values – removing these bounds will reduce the sum of infeasibilities. There is hence code (‘//arm/widen_bounds.gms//’) which in case of a infeasible solution will check which bounds carry dual values and will expand those stepwise. That proceeding generally guarantees that for most shocks, the market model finds a feasible solution.
  
 =====Linking the different modules – the price mechanism ===== =====Linking the different modules – the price mechanism =====
scenario_simulation.1587797840.txt.gz · Last modified: 2022/11/07 10:23 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki