REMIND - REgional Model of INvestments and Development

2.1.3

created with goxygen 1.1.0

Optimization (80_optimization)

Description

The optimization module gives the opportunity to choose different solution algorithms.

Interfaces

Interfaces to other modules
Interfaces to other modules

Input

module inputs (A: nash | B: negishi | C: testOneRegi)
  Description Unit A B C
cm_emiscen policy scenario choice x x
cm_iteration_max number of Negishi iterations x
cm_nash_autoconverge choice of nash convergence mode x
cm_startyear first optimized modelling time step \(year\) x x x
cm_TaxConvCheck switch for enabling tax convergence check in nash mode x
pm_budgetCO2eq
(all_regi)
budget for regional energy-emissions in period 1 x
pm_capCum0
(tall, all_regi, all_te)
vm_capCum from last iteration x
pm_capCumForeign
(ttot, all_regi, all_te)
parameter for learning externality (cumulated capacity of other regions except regi) x x x
pm_cesdata
(tall, all_regi, all_in, cesParameter)
parameters of the CES function x
pm_co2eq0
(tall, all_regi)
vm_co2eq from last iteration x
pm_co2eqForeign
(tall, all_regi)
emissions, which are part of the climate policy, of other regions (nash relevant) x x x
pm_emicapglob
(tall)
global emission cap x x
pm_emissions0
(tall, all_regi, all_enty)
Emissions in last iteration x
pm_emissionsForeign
(tall, all_regi, all_enty)
total emissions of other regions (nash relevant) x x x
pm_nfa_start
(all_regi)
initial net foreign asset x
pm_NXagr
(tall, all_regi)
Net agricultural exports x x
pm_pop
(tall, all_regi)
population data \(bn people\) x x
pm_prtp
(all_regi)
Pure rate of time preference x
pm_pvp
(ttot, all_enty)
Price on commodity markets x x x
pm_pvpRegi
(ttot, all_regi, all_enty)
prices of traded commodities - regional. only used for permit trade x
pm_shPerm
(tall, all_regi)
emission permit shares x x
pm_SolNonInfes
(all_regi)
model status from last iteration. 1 means status 2 or 7, 0 for all other status codes x x x
pm_taxCO2eq
(ttot, all_regi)
CO2 tax path in T$/GtC = $/kgC. To get $/tCO2, multiply with 272 \(T\$/GtC\) x
pm_ts
(tall)
(t_n+1 - t_n-1)/2 for a timestep t_n x x x
pm_ttot_val
(ttot)
value of ttot set element x
pm_w
(all_regi)
Negishi weights x x x
pm_welf
(tall)
Weight parameter in the welfare function to avoid jumps with cm_less_TS x
pm_Xport0
(tall, all_regi, all_enty)
Reference level value of export. x x
qm_budget
(ttot, all_regi)
Budget balance x x
qm_co2eqCum
(all_regi)
cumulate regional emissions over time x
sm_budgetCO2eqGlob budget for global energy-emissions in period 1 x
sm_EJ_2_TWa multiplicative factor to convert from EJ to TWa x
sm_endBudgetCO2eq end time step of emission budget period 1 x
sm_eps small number: 1e-9 x
sm_tmp temporary scalar that can be used locally x
vm_cesIO
(tall, all_regi, all_in)
Production factor x
vm_co2eq
(ttot, all_regi)
total emissions measured in co2 equivalents ATTENTION: content depends on multigasscen. \(GtCeq\) x
vm_cons
(ttot, all_regi)
Consumption x x x
vm_dummyBudget
(ttot, all_regi)
auxiliary variable that helps to meet permit allocation equation in nash case x
vm_effGr
(ttot, all_regi, all_in)
growth of factor efficiency x
vm_emiAll
(ttot, all_regi, all_enty)
total regional emissions. \(GtC, Mt CH4, Mt N\) x
vm_emiTe
(ttot, all_regi, all_enty)
total energy-related emissions of each region. \(GtC, Mt CH4, Mt N\) x
vm_fuExtr
(ttot, all_regi, all_enty, rlf)
fuel use \(TWa\) x x
vm_Mport
(tall, all_regi, all_enty)
Import of traded commodity. x x x
vm_perm
(ttot, all_regi)
emission allowances x
vm_prodPe
(ttot, all_regi, all_enty)
pe production. \(TWa, Uranium: Mt Ur\) x x
vm_taxrev
(ttot, all_regi)
difference between tax volume in current and previous iteration x x x
vm_welfareGlob Global welfare x x x
vm_Xport
(tall, all_regi, all_enty)
Export of traded commodity. x x x

Output

module outputs
  Description Unit
pm_cumEff
(tall, all_regi, all_in)
parameter for spillover externality (aggregated productivity level)
pm_fuExtrForeign
(ttot, all_regi, all_enty, rlf)
foreign fuel extraction
sm_fadeoutPriceAnticip Helper parameter, describes fadeout of price anticipation during iterations
vm_costAdjNash
(ttot, all_regi)
Adjustment costs for deviation from the trade structure of the last iteration.

Realizations

(A) nash

Unlike in Negishi-mode, each region forms its own optimization problem in Nash mode. Regions trade on goods and resource markets, but market-clearing conditions are not part of the optimization itself. Instead, the Nash-algorithm iteratively computes solutions for all regions including their trade patterns, and adjusts prices such that the surplus on global markets vanishes. Initial values for trade patterns, prices etc. are taken from the gdx (input.gdx).

Potential benefits of a Nash-solution are a massive reduction in run-time (convergence within a few hours), and more flexibility in treating inter-regional externalities. Learning-by-doing technologies (learnte) are included by default and cause an inter-regional spill-over. This causes a welfare difference between the solution in Nash- and Negishi-mode. In Nash-mode, a subsidy on the investment cost of learning technologies can be used to internalize this spill-over externality. This subsidy is implemented in the module 22_subsidizeLearning.

Without internalizing the learning-by-doing spill-over due to the global learning curve, Nash and Negishi solution differ. This is the case in the default setting of the corresponding module: cfg\(gms\)subsidizeLearning <- “off” In Nash-mode, the subsidy internalizing this externality can be calculated. When activated by cfg\(gms\)subsidizeLearning <- “globallyOptimal” the Nash solution should be equivalent to the Negishi solution.

For Nash solution: intertemporal trade balance must be zero (couple in agricultural trade costs: pvp deflator * net export)

\[\begin{multline*} 0 = pm\_nfa\_start(regi) \cdot pm\_pvp("2005","good") + SUM\left(ttot\$\left(ttot.val ge 2005\right), pm\_ts(ttot) \cdot \left( SUM\left(trade, \left(vm\_Xport(ttot,regi,trade) - vm\_Mport(ttot,regi,trade)\right) \cdot pm\_pvp(ttot,trade) \cdot \left( 1 + sm\_fadeoutPriceAnticip \cdot p80\_etaXp(trade) \cdot \frac{ \left( \left(pm\_Xport0(ttot,regi,trade) - p80\_Mport0(ttot,regi,trade)\right) - \left(vm\_Xport(ttot,regi,trade) - vm\_Mport(ttot,regi,trade)\right) - p80\_taxrev0(ttot,regi)\$\left(ttot.val gt 2005\right)\$sameas(trade,"good") + vm\_taxrev(ttot,regi)\$\left(ttot.val gt 2005\right)\$sameas(trade,"good") \right) }{ \left(p80\_normalize0(ttot,regi,trade) + sm\_eps\right) }\right) \right) + pm\_pvp(ttot,"good") \cdot pm\_NXagr(ttot,regi) \right) \right) \end{multline*}\]

quadratic adjustment costs, penalizing deviations from the trade pattern of the last iteration.

\[\begin{multline*} vm\_costAdjNash(ttot,regi) = \sum_{trade}\left( pm\_pvp(ttot,trade) \cdot p80\_etaAdj(trade) \cdot \left( \left(pm\_Xport0(ttot,regi,trade) - p80\_Mport0(ttot,regi,trade)\right) - \left(vm\_Xport(ttot,regi,trade) - vm\_Mport(ttot,regi,trade)\right) \right) \cdot \frac{ \left( \left(pm\_Xport0(ttot,regi,trade) - p80\_Mport0(ttot,regi,trade)\right) - \left(vm\_Xport(ttot,regi,trade) - vm\_Mport(ttot,regi,trade)\right) \right) }{ \left(p80\_normalize0(ttot,regi,trade) + sm\_eps\right) }\right) \end{multline*}\]

link between permit budget and emission budget

\[\begin{multline*} \sum_{ttot\$\left(ttot.val lt sm\_endBudgetCO2eq and ttot.val ge cm\_startyear\right)}\left( pm\_ts(ttot) \cdot vm\_perm(ttot,regi)\right) + \sum_{ttot\$\left(ttot.val eq sm\_endBudgetCO2eq\right)}\left(\frac{pm\_ts(ttot)}{2 } \cdot vm\_perm(ttot,regi)\right) \leq pm\_budgetCO2eq(regi) - \sum_{ttot \$\left(\left(ttot.val ge 2005\right) and \left(ttot.val lt cm\_startyear\right)\right)}\left( pm\_ts(ttot) \cdot vm\_co2eq(ttot,regi)\right) \end{multline*}\]

Limitations There are no known limitations.

(B) negishi

In Negishi mode, all regions forms a big optimization problem, as opposed to separate optimizations in Nash mode. Regions trade on goods and resource markets, and market-clearing conditions are also part of the optimization. The Negishi algorithm iteratively computes solutions for the whole globe including regional trade patterns, and adjusts the so-called Negishi weights until a Pareto optimal solution is found. Negishi weights are the coefficients of regional utilities in their sum that forms the utility function of REMIND and are computed via an intertemporal trade balance.

Initial values for the Negishi weights are taken from the gdx (input.gdx).

\[\begin{multline*} SUM\left(regi, vm\_Xport(t,regi,trade) - vm\_Mport(t,regi,trade)\right) = 0 \end{multline*}\]

\[\begin{multline*} 1 \geq 1 \end{multline*}\]

Limitations This realization is computationally very expensive. Unless a very specific problem has to be solved, using the Nash realization will deliver the same result in a fraction of the time.

(C) testOneRegi

This is a reduced model version, only containing one region. It is equivalent to the Nash realization with just one region. Prices of resources and goods are exogenously fixed to the values taken from the gdx.

Run time is some minutes.

for Nash solution: intertemporal trade balance must be zero

\[\begin{multline*} 0 = SUM\left(ttot\$\left(ttot.val ge 2005\right), pm\_ts(ttot) \cdot SUM\left(trade, \left(vm\_Xport(ttot,regi,trade)-vm\_Mport(ttot,regi,trade)\right) \cdot pm\_pvp(ttot,trade) \cdot \left( 1 + p80\_etaXp(trade) \cdot \frac{ \left( \left(pm\_Xport0(ttot,regi,trade) - p80\_Mport0(ttot,regi,trade)\right) - \left(vm\_Xport(ttot,regi,trade) - vm\_Mport(ttot,regi,trade)\right) \right) }{ \left(p80\_normalize0(ttot,regi,trade) + 1E-6\right) }\right) \right) \right) \end{multline*}\]

\[\begin{multline*} vm\_costAdjNash(ttot,regi) = 0 \end{multline*}\]

Limitations This realization is only useful for testing purposes or for regions with no influence on the global prices of traded goods.

Definitions

Objects

module-internal objects (A: nash | B: negishi | C: testOneRegi)
  Description Unit A B C
o80_counter_iteration_trade_ttot
(ttot, all_enty, iteration)
auxiliary parameter to display in which iteration and for which item (ttot, trade) additional convergence measures were taken x
o80_SurplusOverTolerance
(ttot, all_enty, iteration)
auxiliary parameter to track in which iterations which item surpassed the tolerance (positive/negative) x
o80_trackSurplusSign
(ttot, all_enty, iteration)
auxiliary parameter to track how long the surplus for an item (ttot, trade) had the same sign over iterations x
p80_alpha_nw
(tall, all_regi)
diagnostic parameter for new negishi routine x
p80_count count regions with feasible solution x
p80_curracc
(ttot, all_regi)
current account x x
p80_currentaccount_bau
(tall, all_regi)
baseline current account path x
p80_defic
(iteration, all_regi)
intertemporal trade balance deficit x
p80_defic_sum
(iteration)
Surplus in monetary terms over all times on all commodity markets combined [trillion US$2005] (NOTE: to compare this number with the Negishi defic_sum, divide by around 100) x x
p80_defic_sum_rel
(iteration)
Surplus monetary value over all times on all commodity markets combined, normalized to consumption \(\%\) x
p80_defic_sumLast the sum of intertemporal deficits, only for the last iteration (needed for output analysis script) x
p80_defic_trade
(all_enty)
Surplus in monetary terms over all times on commodity markets \(trillion US\$2005\) x
p80_eoDeltaEmibudget total change in permit budget x
p80_eoEmibudget1RegItr
(all_regi, iteration)
corrected regional permit budgets x
p80_eoEmibudgetDiffAbs
(iteration)
convergence indicator x
p80_eoEmiMarg
(all_regi)
weighted marginal utility of emissions x
p80_eoMargAverage global average of marginals from nash budget equation x
p80_eoMargDiff
(all_regi)
scaled deviation of regional marginals from global average x
p80_eoMargDiffItr
(all_regi, iteration)
scaled deviation of regional marginals from global average x
p80_eoMargEmiCum
(all_regi)
marginal of cumulative emissions x
p80_eoMargPermBudg
(all_regi)
marginal of permit budget restriction x
p80_eoWeights
(all_regi)
welfare weights x
p80_eoWeights_fix
(all_regi)
hard coded fallback nash weights x
p80_etaAdj
(all_enty)
Adjustment costs for changes of trade pattern between iterations x
p80_etaLT
(all_enty)
long term price ajustment elasticity x
p80_etaLT_correct
(all_enty, iteration)
long term price correction factor in percent x
p80_etaST
(all_enty)
short term price ajustment elasticity x
p80_etaST_correct
(tall, all_enty, iteration)
short term price correction factor in percent x
p80_etaST_correct_safecopy
(tall, all_enty, iteration)
auxiliary parameter to remember short term price correction factor in percent, before new convergence adjustments x
p80_etaXp
(all_enty)
Parameter governing price anticipation on commodity markets x x
p80_handle
(all_regi)
parallel mode handle parameter x
p80_messageFailedMarket
(tall, all_enty)
nash display helper x
p80_messageShow
(convMessage80)
nash display helper x
p80_Mport0
(tall, all_regi, all_enty)
Imports in last iteration x x
p80_nfa
(tall, all_regi)
net foreign assets x
p80_normalize0
(ttot, all_regi, all_enty)
Normalization parameter for market volume x x
p80_normalizeLT
(all_enty)
Aggregated intertemporal market volume x
p80_nw
(iteration, all_regi)
negishi weights x
p80_pvp_itr
(ttot, all_enty, iteration)
Price on commodity markets per iteration x
p80_pvpFallback
(ttot, all_enty)
Helper parameter. Price path from input/prices_NASH.inc. Only used if reading prices from gdx fails. x x
p80_repy
(all_regi, solveinfo80)
summary report from solver x
p80_repy_iteration
(all_regi, solveinfo80, iteration)
summary report from solver in iteration x
p80_repyLastOptim
(all_regi, solveinfo80)
p80_repy from last iteration x
p80_SolNonOpt
(all_regi)
solve status x
p80_surplus
(tall, all_enty, iteration)
Surplus on commodity market x
p80_surplusMax
(all_enty, iteration, tall)
Diagnostics for Nash: Worst residual market surplus until given year, absolute value. \(Units: TWa, trillion Dollar, GtC\) x
p80_surplusMax2100
(all_enty)
Worst residual market surplus until 2100, absolute value. \(Units: TWa, trillion Dollar, GtC\) x
p80_surplusMaxRel
(all_enty, iteration, tall)
Diagnostics for Nash: Worst residual market surplus until given year, in per cent. x
p80_surplusMaxTolerance
(all_enty)
maximum tolerable residual value of absolute market surplus in 2100. x
p80_t_interpolate
(tall, tall)
weights to interpolate from t_input_gdx to t x
p80_taxrev_agg
(tall, iteration)
vm_taxrev globally from last iteration x
p80_taxrev_dev
(ttot, all_regi)
deviation of tax revenue normalized by GDP if taxes did not converge x
p80_taxrev0
(tall, all_regi)
vm_taxrev from last iteration x x
p80_trade
(ttot, all_regi, all_enty)
trade surplusses x
p80_tradeVolume
(tall, all_regi, all_enty)
Trade volume x
p80_tradeVolumeAll
(tall, all_regi)
Trade volume of all traded goods x
q80_balTrade
(ttot, all_enty)
trade balance equation x
q80_budg_intertemp
(all_regi)
interemporal trade balance (Nash mode only) x x
q80_budget_helper
(ttot, all_regi)
Helper declaration for import from gdx x
q80_budgetPermRestr
(all_regi)
constraints regional permit budget to given regional emission budget x
q80_costAdjNash
(ttot, all_regi)
calculate Nash adjustment costs (of anticipation of the difference in trade pattern, compared to the last iteration), combined for all markets x x
s80_after value of time step after current interpolation time step x
s80_alpha_avg average of p80_alpha_nw x
s80_before value of time step befor current interpolation time step x
s80_bool helper x
s80_cnptfile parameter that indicates which optimality tolerance will be used x x x
s80_converged if nash converged, this is 1 x
s80_dummy dummy scalar x
s80_fadeoutPriceAnticipStartingPeriod Helper parameter, denotes iteration in which price anticipation fadeout starts x
s80_numberIterations display helper x

Sets

sets in use
  description
all_enty all types of quantities
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
cesParameter parameters of the CES functions and for calibration
convMessage80 contains possible reasons for failed convergence
enty(all_enty) all types of quantities
in(all_in) All inputs and outputs of the CES function
iteration iterator for main (Negishi/Nash) iterations
learnte_dyn80(all_te) learnte for nash
modules all the available modules
nash_sol_itr80 nash iterations
regi(all_regi) all regions used in the solution process
regi_dyn80(all_regi) region for testOneRegi
rlf cost levels of fossil fuels
run iterator for performance test iterations
set regi_nucscen(all_regi) regions which nucscen applies to
solveinfo80 Nash solution stats
steps iterator for MAC steps
t(ttot) modeling time, usually starting in 2005, but later for fixed delay runs
t_input_gdx(ttot) t loaded from input.gdx, used for t interpolation
t_interpolate(ttot) periods that need interpolation
tall time index
te(all_te) energy technologies
teLearn(all_te) Learning technologies (investment costs can be reduced)
trade(all_enty) All traded commodities
tradePe(all_enty) Traded primary energy commodities
ttot(tall) time index with spin up

Authors

Anastasis Giannousakis, Marian Leimbach, Lavinia Baumstark, Gunnar Luderer, Anselm Schultes

See Also

01_macro, 02_welfare, 20_growth, 21_tax, 22_subsidizeLearning, 23_capitalMarket, 24_trade, 26_agCosts, core

References