Project

General

Profile

Core

Description

Before MAgPIE has started to become modularized the full gams code was stored in the model core. With progressing modularization more and more code was moved from the core to specific modules. In MAgPIE 3.0 the core has been reduced to a collection of very fundamental equations and the provision of technical parameters and some basic settings. For future releases of MAgPIE the role of the core will be reduced even more. As these fundamental equations and parameters are used very widespread in the model the core still has a huge connectivity to all modules. Anyhow, contentwise there is not much happening anymore in the trunk.

Interfaces

Input

Name Description Unit
$vm\_tech\_cost$ costs of technological change mio. US$
$vm\_cost\_trade$ transport costs and taxes for the bilateral trade mio. US$
$vm\_cost\_past$ pasture costs mio. US$
$vm\_cost\_fore$ afforestation costs mio. US$
$vm\_cost\_prod$ factor costs mio. US$
$vm\_cost\_landcon$ landconversion costs mio. US$
$vm\_cost\_transp$ transportation costs mio. US$
$vm\_cost\_AEI$ irrigation expansion costs mio. US$
$vm\_watdem$ amount of water needed in different sectors mio. m^3
$vm\_nr\_inorg\_fert\_costs$ cost of inorganic fertilizers mio. US$
$vm\_carbon\_stock$ carbon in vegetation soil and litter for different land types mio. tC
$vm\_p\_fert\_costs$ costs for mineral fertilizers mio. US$
$vm\_emission\_costs$ costs for emission pollution rights mio. US$
$vm\_maccs\_costs$ costs of technical mitigation of GHG emissions mio. US$2004
$vm\_cost\_cdr$ carbon dioxide removal costs mio. US$
$sm\_obj\_diff$ difference in objective between lp and nlp solution mio. US$

Output

Name Description Unit
$sm\_years$ length of current time step years
$sm\_use\_gdx$ use of gdx files -
$sm\_maxiter$ maximal solve iterations if modelstat is > 2 -
$sm\_invest\_horizon$ investment time horizon years
$sm\_biodem\_level$ bioenergy demand level -
$vm\_cost\_glo$ total costs of production mio. US$
$vm\_cost\_reg$ regional costs mio. US$
$vm\_prod$ production in each cell mio. ton DM
$vm\_prod\_reg$ regional aggregated production mio. ton DM
$vm\_land$ areas of the different land types mio. ha
$im\_years$ years between previous and current time step years
$fcm\_ghg\_prices$ current ghg prices US$ 2004 per Mg N2O-N CH4 and CO2-C
$pm\_land\_start$ landpools from initialization mio. ha
$pcm\_land$ current area of different land types mio. ha
$im\_attributes\_harvest$ attributes of harvested organs t DM WM Nr P K GJ per ton product
$fm\_DM\_content$ Dry matter content [Wirsenius] %
$fm\_GE\_content$ Gross energy content [Wirsenius] GJ per ton DM
$fm\_years$ file containing the years of the t_all set years
$fm\_prod\_kli\_1995$ livestock product production for 1995 Mt
$fm\_attributes\_residue\_ag$ Nutrient content of aboveground crop residues nutrient per DM
$fm\_ipcc\_ef$ ipcc emission factors -

Interface plot


Figure 0: Information exchange among modules

Realization

The trunk in MAgPIE 3.0 consists of four remaining equations for the aggregation of costs, production and land:

Equation 1:

\begin{align}
vm\_cost\_glo = \sum_i vm\_cost\_reg(i)
\end{align}

Equation 2:

\begin{align}
vm\_cost\_reg(i) = & \sum_k vm\_cost\_prod(i,k) \\
&+ \sum_{cell(i,j),land} vm\_cost\_landcon(j,land) \\
&+ \sum_{cell(i,j),k} vm\_cost\_transp(j,k) \\
&+ vm\_tech\_cost(i)\\
&+ vm\_nr\_inorg\_fert\_costs(i)\\
&+ vm\_p\_fert\_costs(i)\\
&+ vm\_emission\_costs(i)\\
&+ vm\_maccs\_costs(i)\\
&+ vm\_cost\_AEI(i)\\
&+ vm\_cost\_trade(i)\\
&+ vm\_cost\_fore(i)\\
&+ vm\_cost\_past(i)\\
&+ vm\_cost\_cdr(i)
\end{align}

Equation 2 collects all costs provided by the different modules on the regional level. Equation 1 calculates the global costs sum which is used in the optimization.

Equation 3:

\begin{align}
vm\_prod\_reg(i,k) = \sum_{cell(i,j)} vm\_prod(j,k)
\end{align}

Equation 3 aggregates the cellular supply to the regional level to simplify computational complexity in calculations in which the cellular production distribution is not relevant.

Equation 4:

\begin{align}
\sum_{land} vm\_land(j,land,si) = \sum_{land} pcm\_land(j,land,si)
\end{align}

Equation 4 makes sure that the sum of land over all land types agrees with the total available land area per cell.

Besides these calculations the core also provides information about the assumed investment horizon and the used years and time steps lengths. It also provides some conversion factors and technical information about the usage of gdx files and the maximum number of iterations for a single solve statement (if something goes wrong or has to be recalculated again).

Definitions

Name Description Unit
$o\_modelstat(t)$ modelstat -
$s\_counter$ counter -
$s\_maxdiff$ max diff between lp and nlp solution mio. US$
$f\_attributes\_harvest\_pure(attributes, kve)$ Nutrient content of harvested organ not corrected for Isabelles different dm contents t nutrient per t DM
$f\_DM\_correct(k)$ Dry matter correction factor between Wirsenius (currently used) and more detailed dm-estimate -
$f\_ghg\_prices(t\_all,i,ghg)$ ghg certificate prices US$ 2004 per Mg N2O-N CH4 and CO2-C
$f\_land(j,land,si)$ Different land type areas (si0 and nsi0) mio. ha

Developer(s)

Jan Philipp Dietrich

See Also

12_interest_rate, 14_yields, 21_trade, 38_factor_costs, 39_landconversion, 90_presolve, Overview