REMIND - REgional Model of INvestments and Development

3.4.0

created with goxygen 1.4.4

CES parameters (29_CES_parameters)

Description

The CES parameters module either loads CES parameters or calibrates new CES parameters.

Interfaces

Interface plot missing!

Input

module inputs (A: calibrate | B: load)
  Description Unit A B
cm_H2InBuildOnlyAfter Switch to fix H2 in buildings to zero until given year x
pm_calibrate_eff_scale
(all_in, all_in, eff_scale_par)
parameters for scaling efficiencies in CES calibration x
pm_cesdata
(tall, all_regi, all_in, cesParameter)
parameters of the CES function x x
pm_cesdata_sigma
(ttot, all_in)
elasticities of substitution. x
pm_delta_kap
(all_regi, all_in)
Depreciation rate of capital. x
pm_energy_limit
(all_in)
empty parameter x
pm_fedemand
(tall, all_regi, all_in)
final energy demand x
pm_gdp
(tall, all_regi)
GDP data \(trn US\$ 2005\) x
pm_lab
(tall, all_regi)
data for labour \(bn people\) x
pm_shPPPMER
(all_regi)
PPP ratio for calculating GDP|PPP from GDP|MER x
pm_ttot_val
(ttot)
value of ttot set element x
pm_ue_eff_target
(all_in)
energy efficiency target trajectories \(\% p.a.\) x
sm_CES_calibration_iteration current calibration iteration number, loaded from environment variable cm_CES_calibration_iteration x
sm_EJ_2_TWa multiplicative factor to convert from EJ to TWa x
sm_tmp temporary scalar that can be used locally x
sm_tmp2 temporary scalar that can be used locally x
vm_cesIO
(tall, all_regi, all_in)
Production factor x
vm_deltaCap
(tall, all_regi, all_te, rlf)
capacity additions x
vm_effGr
(ttot, all_regi, all_in)
growth of factor efficiency x

Realizations

(A) calibrate

The macro-calibration takes place in modules/29_CES_parameters/calibration/. The calibration itself is in the file preloop.gms.

The aim of the calibration is to provide the efficiency parameters of the CES tree for each time step and each region. Efficiency parameters have a strong influence on the level of energy that the CES-tree demands from the energy system module. In order to avoid ad hoc assumptions on the level of these parameters, the new macro-calibration procedure loads exogenous energy demand pathways and ensures that a baseline REMIND run will meet these trajectories.

How to calibrate Remind

This documentation is focused on the implementation. For a practical guide on how to calibrate, refer to the tutorial ‘Calibrating CES Parameters’ in the tutorials folder.

How the calibration works (Overview)

1. Prerequisites

The CES tree in Remind consists of a tree of nested CES production functions of the form

\(V_o = \left( \sum_{i} \xi_i \left( \theta_i \delta_i V_i \right)^{\rho_o} \right)^{1/\rho_o}\)

where \(V_o\) is the output quantity (quantity in the code) with the output node index \(o\), \(V_i\) are the input quantities with the input node index \(i\), \(\xi_i\) is the income share (xi), \(\theta_i\) the efficiency parameter (eff), \(\delta_i\) is the efficiency growth (effGr), and \(\rho_o\) (rho) is a parameter derived from the substitution elasticity.

‘Nested’ means that each output of one CES node serves as one of the inputs to the node above, up to the last level. The uppermost level of the tree is GDP (inco), the lowest ones (the ‘leaves’ of the tree) are called primary production factors (ppf). They include final energies (ppfen), different capital stocks, and labour (lab), which is a direct input to inco. Consequently, ppf only serve as input to a CES function and there are no CES functions in the tree with ppf as their output. Nodes which are neither ppf nor the top node are called intermdiate production factors (ipf).

In the following, the term ‘efficiency parameters’ will be used collectively for the parameters \(\xi_i\), \(\theta_i\) and \(\delta_i\) (income share, efficiency and efficiency growth). By combining all three into \(\alpha_i = \xi_i \left( \theta_i \delta_i )^{\rho_o}\), the CES function could be simplified to

\(V_o = \left( \sum_{i} \alpha_i V_{i}^{\rho_o} \right)^{1/\rho_o}.\)

However, we keep the split into the three components for the following reasons:

The derivative of the CES function with respect to one of its input quanities \(V_i\) can be calculated as

\(\frac{\partial V_o(V_1,..., V_i,...,V_n)}{\partial V_i}\) \(= \xi_i \theta_i \delta_i \ V_o^{1 - \rho_o} \ \left(\theta_i \delta_i V_i\right)^{\rho_o - 1}.\)

The CES function is a homogenous function of degree one. This entails (following Euler’s homogeneous function theorem) that the output is equal to the sum of derivative times quantity of each input

\(V_o = \sum_{i} \frac{\partial V_o}{\partial V_i} V_i\)

This motivates to interpret the derivative of \(\frac{\partial V_o}{\partial V_i} =: \pi_i\) as the price of \(V_i\) in terms of \(V_o\). We denote it by \(\pi_i\). The output is then equal to the sum of inputs valued at their price, i.e.

\(V_o = \sum_{i} \pi_i V_i.\)

2. Principle

In Remind, the elasticities of substitution and thus \(\rho\) are prescribed ad-hoc. The quantities \(V\) are variables which are optimized in a run (except for labour). The efficiency parameters are determined in the calibration. More precisely,

The calibration adapts the efficiency parameters of the CES function so that precribed target trajectories for all inputs to the CES tree (FE and capital) and output (GDP, named inco) are met.

The target trajectories are usually provided by EDGE models for the different sectors.

The calibration works in several iterations, each consisting of one Remind run. In each iteration, the efficiency parameters are adjusted such that the target trajectories are met with the prices of the primary production factors (ppf) from the previous iteration. So the two steps of an iteration loop are:

  1. The calibration routine determines efficiencies (based on prices of previous iteration)
  2. The rest of the remind model run determines optimal ppf prices (given the efficiencies from 1.)

Each iteration only differs from the others in the prices that are provided to the calibration. They represent the feedback from the energy system module. The assumption is that by adjusting the efficiency parameters in each iteration, the efficiency parameters and prices converge towards a stable coherent value.

Steps of the calibration routine

The following paragraphs describe the calculations happening in each of the iteration i.e in preloop.gms. They can be summarized in five steps:

  1. Load CES quantities, calculate prices \(\pi_i=\partial V_o / \partial V_i\) from them and propagate via chain rule to get ppf price in terms of GDP \(\partial V_{inco} / \partial V_{ppf}\). Set ppf prices \(\pi_{ppf}\) to this chain rule product and set all ipf prices to one.
  2. Using these prices and the prescribed target quantities \(V_{ppf}\), move up CES tree level by level and determine ipf trajectories using \(V_o = \sum_{i} \pi_i V_i\).
  3. Determine efficiencies such that CES derivatives using target quantities from step 2 yield prices from step 1: \(\xi_i = \frac{\pi_i V_i}{V_o}\) and \(\theta_i = \frac{V_o}{V_i}\)
  4. Since GDP is a prescribed CES output quantity, adjust labour price such that all other (target) quantities and prices in that last CES node match; Now that labour price is known, do Step 3 also for labour.
  5. Move time-dependent part of \(\xi\) and \(\theta\) to \(\delta\).

These steps are now described in more detail.

1. Computation of prices

Ppf prices are computed from CES node quantities which are read in from the previous iteration from an input.gdx file. In the first iteration, there is no previous iteration, but a file from a previous different run can be used instead, provided that the structure of the CES tree is the same, such that all needed quantities were computed in that previous run.

In the first iteration, for a new CES tree structure, there is no gdx file from a previous run that could provide directly the CES node quantities needed for calculation of prices. Therefore, exogenous prices must be provided. Switch cfg$gms$c_CES_calibration_new_structure to 1 in config/default.cfg in case you want to use exogenous prices for the first iteration (If you have a new structure and do not set this switch to 1, you will get an error, as not all necessary prices are found).

For other iterations, or if the structure is the one from the input.gdx, the equilibrium prices will be computed. They are computed as the derivative of GDP in terms of each ppf input: The prices \(\pi_i\) are calculated as in the formula obove. They are derivatives of a node with respect to its direct input nodes in the level below \(\partial V_o / \partial V_i\). What we want, however, is the derivative of GDP (the topmost node) with respect to the ppf (the nodes at the very bottom). So we apply the chain rule: The derivatives of each level of the CES-tree must be multiplied to obtain the desired derivative of GDP w.r.t. ppf. As an example, if one branch of the CES tree is inco - en - industry - cement - eekcement, then the price of eekcement is calculated as

\(\frac{\partial V_{inco}}{\partial V_{eekcement}} = \frac{\partial V_{inco}}{\partial V_{en}} \frac{\partial V_{en}}{\partial V_{industry}} \frac{\partial V_{industry}}{\partial V_{cement}} \frac{\partial V_{cement}}{\partial V_{eekcement}} = \pi_{en} \pi_{industry} \pi_{cement} \pi_{eekcement}\)

We do this as a propagation from the top node (inco) down the whole tree, where we iteratively calculate each derivative of inco as the product of all derivatives above the node, so e.g. we first compute \(\frac{\partial V_{inco}}{\partial V_{industry}} = \frac{\partial V_{inco}}{\partial V_{en}} \frac{\partial V_{en}}{\partial V_{industry}}\) and then, using that value, we calculate \(\frac{\partial V_{inco}}{\partial V_{cement}} = \frac{\partial V_{inco}}{\partial V_{industry}} \frac{\partial V_{industry}}{\partial V_{cement}}\), and so on, until we obtain ppf prices on the last level in terms of GDP.

Afterwards, the prices of the intermediate production factors (ipf) are set to one, since they are now already factored in at the ppf level. Setting ipf prices to one means that the prices \(pi_i\) of ppf in terms of their direct output correspond to their price in terms of GDP. (In later steps, efficiencies will be adapted to fit these newly prescribed prices.)

In a subsequent step, prices are then smoothed in the early years of the model.

2. Calculation of Intermediate Production Factors

Ppf quantity target trajectories are given as input to the calibration, but ipf trajectories are not given. We determine them from the equation

\(V_o = \sum_{i} \pi_i V_i \qquad \forall o \in \text{ipf}\)

which was derived above. We have calculated all prices and the quantities at ppf level, so we can move up the CES tree level by level from the ppf to compute quantities for ipf. We don’t do this for the last level inco, as it would yield a trajectory for income which differs from the one we prescribed. We will deal with that later.

3. Changing efficiencies to ensure prices are met

We have computed prices in step 1 which we precribe. Now we have to ensure that the derivatives of our CES functions are equal to these new prices. We do this by adjusting the efficiencies. We set the efficiency growth to one to simplify the computation. (We will later split this efficiency into a time-constant 2005 efficiency and a time-dependent efficiency growth.) The total efficiency now consists of the two parameters income share \(\xi_i\) and efficiency parameter \(\theta_i\). Inserting this simplification \(\detla_i=1\) into the CES derivative yields

\(\pi_i = \xi_i \theta_i \ V_o^{1 - \rho_o} \ \left(\theta_i V_i\right)^{\rho_o - 1}\)

which we can transform to

\(\xi_i \theta_i^{\rho_o} = \pi_i \frac{V_i}{V_o} \left(\frac{V_o}{V_i}\right)^{\rho_o}\)

As stated above, the split of the total efficiency into \(\xi_i\) and \(\theta_i\) is not needed for mathematical reasons. Here, this means that we have to degrees of freedom to fulfill one equation, the system is underdetermined and we have different combinations of \(\xi_i\) and \(\theta_i\) that fulfill it. We choose

We use these values to update the efficiencies \(\xi_i\) and \(\theta_i\) of all nodes except for lab.

4. Last level of the CES-tree: Ensure the GDP and Labour trajectories are met

The top level (out: GDP; in: Labour, Aggregated Energy and Capital) is a special case: The quantity trajectory of the output inco is prescribed exogenously. The quantity trajectories of capital and labour are also prescribed, as they are ppf. From the last steps, we know the quantity and price of energy, as well as the (equilibrium) price of capital.

The labour price will be the adjustment variable. So we don’t use the equilibrium price from the last iteration for labour, instead we solve the equation

\(V_o = \sum_{i} \pi_i V_i\)

for the new price of labour. From this, we can compute the efficiencies for labour as in the step above. (From the information given in this tutorial, switching this step with the previous one would make sense. However, some consistency checks are performed in between, which makes this order necessary.)

5. Calculate Efficiency growth parameter \(\delta\)

The efficiency growth, which was set to one for simplicity, is now re-introduced: For all inputs but capital, the changes over time of \(\xi\) and \(\theta\) are put into \(\delta\). \(\xi\) and \(\theta\) are thus made constant at their 2005 levels. The efficiency growth parameter captures both the growth in efficiency and in the income share. So, this is the only time-variant parameter.

\(\delta_i(t) = \frac{\theta_i(t)}{\theta_i(t_0)} \left(\frac{\xi_i(t)}{\xi_i(t_0)}\right)^{1 / \rho_o}\)

on all CES nodes.

Extensions and Special cases

“Beyond Calib”: Calibrating at an intermediary level

The CES nest cannot be calibrated on two levels lying one upon the other, as prescribing an additional quantity trajectory would make the equation system over-determined. Recall that we already calibrate to two levels above each other (ppf and inco), but we resolved the over-determined system by introducing the additional degree of freedom of labour price.

Currently, in the industry part of the tree, both the subsector outputs (members of industry_ue_calibration_target_dyn37) and the ppf are calibrated to. This works in the following way (this documentation is only for the case c_CES_calibration_industry_FE_target == 1):

The ‘main’ calibration described above is only carried out down to the UE level. Everything below is left out at first. The part of the tree below UE is then treated in a separate calibration, which follows after the main one in preloop.gms under the label Beyond Calibration. The same steps as the one above are carried out for this. For this lower part of the tree, the UE are the topmost nodes and the ppfen and ppfkap are the inputs. Since the labour price is missing as an additional degree of freedom to match the trajectroy of the topmost node, a different approach is taken: All ppfen (not ppfkap) input prices are mutliplied with the same factor (the ratio of prescribed to computed UE quantity, minus the ppfkap share), such that the quantity trajectories are met for UE.

Limitations There are no known limitations.

(B) load

Limitations There are no known limitations.

Definitions

Objects

module-internal objects (A: calibrate | B: load)
  Description Unit A B
f29_capitalQuantity
(tall, all_regi, all_demScen, all_in)
capital quantities x
p29_alpha
(all_regi, all_in)
XXX x
p29_beta
(all_regi, all_in)
XXX x
p29_capitalPrice
(tall, all_regi)
capital prices x
p29_capitalQuantity
(tall, all_regi, all_in)
capital quantities x
p29_cesdata_load
(tall, all_regi, all_in, cesParameter)
pm_cesdata from the gdx file x
p29_cesdata_sigma
(all_in)
substitution elasticities x
p29_CESderivative
(tall, all_regi, all_in, all_in)
derivative of the CES function for calculating prices x
p29_cesIO_load
(tall, all_regi, all_in)
production factor vm_cesIO from input.gdx x
p29_effGr
(tall, all_regi, all_in)
growth of factor efficiency from input.gdx x
p29_efficiency_growth
(tall, all_regi, all_in)
efficency level paths for ppf beyond calibration x
p29_esubGrowth long term growth of the elasticity of substitution x
p29_share_H2HTH_traj_indst
(ttot, all_regi, all_in)
H2 and electricity HTH baseline trajectories as share of gas (for H2) and low-temperature electricity (for HTH electricity) trajectories in industry x
p29_t_tmp
(tall)
tmp value for calculations over t x
p29_test_CES_recursive
(tall, all_regi, all_in)
test the technological consistency of pm_cesdata x
p29_trpdemand transport demand x
s29_CES_calibration_new_structure CES structure differs from input.gdx x

Sets

sets in use
  description
all_demScen all possible demand scenarios
all_GDPscen all possible GDP scenarios
all_in all inputs and outputs of the CES function
all_regi all regions
all_te all energy technologies, including from modules
c_expname c_expname as set for use in GDX
cal_ppf_buildings_dyn36(all_in) primary production factors for calibration - buildings
cal_ppf_industry_dyn37(all_in) primary production factors for calibration - industry
capUnitType Type of technological data: for investments or for the standing capital
ces_29_load(all_in, all_in) ces from input.gdx
ces_29(all_in, all_in) calibration CES tree structure
ces_beyondcalib_29(all_in, all_in) production relationships for the non calibrated CES
ces_eff_target_dyn37(all_in, all_in) empty set
CES_tc(all_in) CES tree traversal current node
CES_tp(all_in) CES tree traversal pending nodes
CES_ts(all_in) CES tree traversal swap node
ces2_29(all_in, all_in) calibration CES tree structure
ces2_beyondcalib_29(all_in, all_in) production relationships for the non calibrated CES
cesLevel2cesIO(counter, all_in) CES tree structure by level
cesOut2cesIn_below(all_in, all_in) All elements of the CES below located below the first item given
cesOut2cesIn(all_in, all_in) CES tree structure
cesParameter parameters of the CES functions and for calibration
cesRev2cesIO(counter, all_in) CES tree structure by level - descending order
cm_GDPscen cm_GDPscen as set for use in GDX
counter helper set to facilitate looping in defined order
EDGE_scenario_all EDGE-T scenarios
eff_scale_par parameters for scaling certain efficiencies during calibration
in_29(all_in) calibration production factors
in_beyond_calib_29_excludeRoot(all_in) all factors which are outside of the calibration, excluding the ones which are ppf_29
in_beyond_calib_29(all_in) all factors which are outside of the calibration, including the ones which are ppf_29
in_buildings_dyn36(all_in) all inputs and outputs of the CES function - buildings
in_industry_dyn37(all_in) all inputs and outputs of the CES function - industry
in_limit_price_change_29(all_in) production factors that have their price changes limited to a factor of two during calibration
in(all_in) All inputs and outputs of the CES function
index_Nr index to differentiate data points with identical characteristics
industry_ue_calibration_target_dyn37(all_in) empty set
ipf_29(all_in) calibration intermediate production factors
ipf_beyond_29_excludeRoot(all_in) all ces intermediary levels whose inputs are in beyond_calib, excluding the roots
ipf_beyond_29(all_in) all ces intermediary levels whose inputs are in beyond_calib
ipf_beyond_last(all_in) intermediary factors which are just above the ppf_beyondcalib_29 level
ipf_industry_dyn37(all_in) intermediate production factors - industry
ipf(all_in) All intermediate production factors
iteration iterator for main (Negishi/Nash) iterations
modules all the available modules
p29_building_relaxed_bounds_dyn(all_in) quantity calibration in the building sector
pf_eff_target_dyn29(all_in) production factors with efficiency target
pf_industry_relaxed_bounds_dyn37(all_in) empty set
pf_quan_target_dyn29(all_in) production factors with quantity target
pf_quantity_shares_37(all_in, all_in) quantities for the calibration defined as a percentage of another pf
ppf_29(all_in) primary production factors to calibrate for
ppf_beyondcalib_29(all_in) all factors which are not part of in_29
ppf_industry_dyn37(all_in) primary production factors - industry
ppf(all_in) All primary production factors
ppfen_dyn35(all_in) all energy input nodes - transport module additions
ppfen_industry_dyn37(all_in) primary production factors energy - industry
ppfEn(all_in) Primary production factors energy
ppfKap_industry_dyn37(all_in) empty set
ppfKap(all_in) Primary production factors capital
regi_29_load(all_regi) regional resolution from input.gdx
regi_dyn29(all_regi) dynamic region set for compatibility with testOneRegi
regi_dyn80(all_regi) region for testOneRegi
regi(all_regi) all regions used in the solution process
rlf cost levels of fossil fuels
root_beyond_calib_29(all_in) all factors which operate the junction between the calibrated CES and the CES which is not calibrated
steps iterator for MAC steps
t_29_last(ttot) last period of the calibration
t_29(ttot) time steps considered in the calibration
t_29hist_last(ttot) last historical period
t_29hist(ttot) historical periods from 2005 on. Used for setting the efficiencies of FE if calibrated at the UE level
t_29scen(ttot) non historical periods in t_29
t(ttot) optimisation time, years between cm_startyear and 2150 with 5 to 20 years time steps
t0(tall) start of modelling time, not optimization
tall time index, each year from 1900 to 3000
te_29_report(all_te) set of technologies to report on
ttot(tall) time index with spin-up, years between 1900 and 2150 with 5 to 20 years time steps
ue_29(all_in) useful energy variables
ue_dyn36(all_in) useful energy items
ue_fe_kap_29(all_in) useful energy items which are the direct output of one FE and one Kap, and which is calibrated to. The CES efficiencies need specific treatment
ue_industry_2_pf(all_in, all_in) link industry sub-sectors activity to pf
ue_industry_dyn37(all_in) empty set

See Also

01_macro, 20_growth, 29_CES_parameters, 37_industry, core

References