# Model Documentation

### | Version 4.0

created with goxygen 0.21.1

# 11_costs

# Costs (11_costs)

## Description

The cost module determines the sum total of global production costs in each time step. MAgPIE's objective is to minimize the global cost of production in a recursive dynamic way. The interface variable `vm_cost_glo` is used for this purpose. The model optimizes the production activities accordingly to ensure that all the demand and supply constraints are met while minimizing the global production costs.

## Interfaces

Interfaces to other modules

### Input

module inputs (A: default)
| Description | Unit | A
--- | --- | --- | ---
vm_cost_AEI (i) | Irrigation expansion costs | \(10^6 USD_{04MER}/yr\) | x
vm_cost_fore (i) | Afforestation costs | \(10^6 USD_{04MER}/yr\) | x
vm_cost_landcon (j, land) | Land conversion costs | \(10^6 USD_{05MER}/yr\) | x
vm_cost_processing (i) | Processing costs | \(10^6 USD_{05MER}/yr\) | x
vm_cost_prod (i, kall) | Factor costs | \(10^6 USD_{05MER}/yr\) | x
vm_costs_overrate_cropdiff (i) | Punishment costs for overrated cropland difference | \(10^6 USD_{05MER}/yr\) | x
vm_cost_trade (i) | Regional trade costs | \(10^6 USD_{05MER}/yr\) | x
vm_cost_transp (j, k) | Transportation costs | \(10^6 USD_{05MER}/yr\) | x
vm_emission_costs (i) | Costs for emission rights for pollutants and greenhouse gases | \(10^6 USD_{05MER}/yr\) | x
vm_maccs_costs (i) | Costs of technical mitigation of GHG emissions | \(10^6 USD_{95MER}/yr\) | x
vm_nr_inorg_fert_costs (i) | cost of inorganic fertilizers | \(10^6 USD_{05MER}/yr\) | x
vm_p_fert_costs (i) | costs for mineral fertilizers | \(10^6 USD_{05MER}/yr\) | x
vm_reward_cdr_aff (i) | Regional revenues for carbon captured by afforestation | \(10^6 USD_{05MER}/yr\) | x
vm_tech_cost (i) | Costs of TC | \(10^6 USD_{05PPP}/yr\) | x

### Output

module outputs
| Description | Unit
--- | --- | ---
vm_cost_glo | Total costs of production | \(10^6 USD_{05MER}/yr\)

## Realizations

### (A) default

The default realization of the costs module calculates global production costs with a constraint of production always fulfilling the demand.

\[\begin{multline*} vm\_cost\_glo = \sum_{i2} v11\_cost\_reg(i2) \end{multline*}\]

The global costs of production are represented by the sum of regional production costs of different production activities.

\[\begin{multline*} v11\_cost\_reg(i2) = \sum_{kall} vm\_cost\_prod(i2,kall) + \sum_{cell(i2,j2),land} vm\_cost\_landcon(j2,land) + \sum_{cell(i2,j2),k} vm\_cost\_transp(j2,k) + vm\_tech\_cost(i2) + vm\_nr\_inorg\_fert\_costs(i2) + vm\_p\_fert\_costs(i2) + vm\_emission\_costs(i2) - vm\_reward\_cdr\_aff(i2) + vm\_maccs\_costs(i2) + vm\_cost\_AEI(i2) + vm\_cost\_trade(i2) + vm\_cost\_fore(i2) + vm\_cost\_processing(i2) + vm\_costs\_overrate\_cropdiff(i2) \end{multline*}\]

The total regional production cost calculation is based on the sum of different MAgPIE production activities. These individual costs are calculated by various cost interfaces, which are in turn calculated inside their respective modules. Different components of regional costs are as follows: Factor costs (38_factor_costs), land conversion costs (39_landconversion), Transportation costs (40_transport), Technological costs (13_tc), Inorganic fertilizers (50_nr_soil_budget), Emission costs (56_ghg_policy), Rewarded CDR from afforestation (Benefits as negative costs) (56_ghg_policy), Abatement costs (57_maccs), Irrigation expansion costs (41_area_equipped_for_irrigation), Trade costs (Transport and bilateral trade) (21_trade), Forestry related costs (afforestation) (32_forestry), Bioenergy costs (60_bioenergy), Processing costs (20_processing), Punish costs for overrate cropland differences (59_som).

> Limitations There are no known limitations.

## Definitions

### Objects

module-internal objects (A: default)
| Description | Unit | A
--- | --- | --- | ---
q11_cost_glo | Objective function | \(10^6 USD_{05MER}/yr\) | x
q11_cost_reg (i) | Regional cost constraint | \(10^6 USD_{05MER}/yr\) | x
v11_cost_reg (i) | Regional costs | \(10^6 USD_{05MER}/yr\) | x

### Sets

sets in use
| description
--- | ---
i | World regions
kall | All products in the sectoral version
kcr(kve) | Cropping activities
k(kall) | Primary products
land | Land pools
w | Water supply type

## Authors

Benjamin Leon Bodirsky, Florian Humpenöder, Jan Philipp Dietrich

## See Also

13_tc, 20_processing, 21_trade, 32_forestry, 38_factor_costs, 39_landconversion, 40_transport, 41_area_equipped_for_irrigation, 50_nr_soil_budget, 54_phosphorus, 56_ghg_policy, 57_maccs, 59_som, 80_optimization

## References