an introduction to energy-economic computable general
TRANSCRIPT
An introduction to energy-economic computable general equilibrium model
Niven [email protected]
EPPA WorkshopSunday River, Newry, ME
http://globalchange.mit.edu/
Supplementary notes:
An illustrative energy-economic computable general equilibrium model
1. A simple energy-economic model (ENERGY1.gms)
2. An energy model with emissions and a cap-and-trade policy (ENERGY2.gms)
2
http://globalchange.mit.edu/
Overview
• ENERGY1.gms identifies five energy sectors (coal, crude oil, refined oil, gas and electricity) and groups other sectors in a single sector (CO2
emissions are not considered at this stage)
SET i Sectors /
cru Crude oil
oil Refined oil
col Coal
gas Gas
ele Electricity
oth Other output/;
SET f Factors of production /
lab Labor
cap Capital
res Natural resources /;
ALIAS (i,j);
SET ele(i) Electricity /ele/;
SET ff(i) Fossil fuels /cru,col,gas/;
SET fe(i) Final energy /oil,col,gas/;
SET en(i) Energy markets /gas,ele,oil,col,cru/;
3
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
Subsets to assist model specification
• Data for the model is sourced from edata.gms
$include edata.gms
4
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
Input/output Sector
Gas Electricity Oil Coal Crude Oil OTHR HH
Gas 150 -60 -70 -20
Electricity 850 -750 -100
Oil -30 500 -460 -10
Coal -35 50 -10 -5
Crude Oil -300 300
OTHR -65 -325 -175 -15 -170 24790 -24040
Capital -50 -300 -15 -10 -70 -9500 9945
Labor -20 -100 -10 -10 -10 -14000 14150
Gas resource -15 15
Coal resource -15 15
Crude oil resource -50 50
• Variable assignments in ENERGY1
$SECTORS:
W ! Welfare index
Y(i)$vom(i) ! Output index
$COMMODITIES:
PW ! Welfare price index
PY(i)$vom(i) ! Output price index
PL ! Labor price index
PK ! Capital price index
PR(i)$vfm("res",i) ! Natural resources price index
$CONSUMERS:
HH ! Representative household
• Production in each sectors is a multi-level next of constant elasticity of substitution functions
5
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
* Fossil fuel production (crude oil, coal, gas)
$PROD:Y(ff)$vom(ff) s:sigma("res_oth") b:0 va(b):sigma("k_l")
O:PY(ff) Q:vom(ff)
I:PY(j) Q:vfi(j,ff) b: a:HH T:tf(j,ff)
I:PL Q:vfm("lab",ff) va:
I:PK Q:vfm("cap",ff) va:
I:PR(ff) Q:vfm("res",ff)
6
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
The ‘b’ nest is a sub-nest of ‘s’ by default ‘va’ is assigned as a sub-nest of ‘b’
Nesting assignments – unless
otherwise noted, each input is assigned to the top level (s)
nest
* Consumer welfare function
$PROD:W s:sigma("top_fd") e:sigma("ene_fd")
O:PW Q:vthp
I:PY(i)$(not fe(i)) Q:vhp(i) e:$ele(i)
I:PY(fe) Q:vhp(fe) e:
7
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
* Consumer welfare function
$PROD:W s:sigma("top_fd") e:sigma("ene_fd")
O:PW Q:vthp
I:PY(i)$(not fe(i)) Q:vhp(i) e:$ele(i)
I:PY(fe) Q:vhp(fe) e:
8
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
* Electricity production
$PROD:Y(i)$(vom(i) and ele(i)) s:0 kle:sigma("e_kl") va(kle):sigma("k_l")
+ ene(kle):sigma("fe")
O:PY(i) Q:vom(i)
I:PY(j)$(not fe(j)) Q:vfi(j,i) a:HH T:tf(j,i)
I:PL Q:vfm("lab",i) va:
I:PK Q:vfm("cap",i) va:
I:PY(fe) Q:vfi(fe,i) ene: a:HH T:tf(fe,i)
9
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
* Other output and refined oil production
$PROD:Y(i)$(vom(i) and not ele(i) and not ff(i)) s:0 kle(s):sigma("e_kl")
+ va(kle):sigma("k_l") e(kle):sigma("ele_fe") ne(e):sigma("fe")
O:PY(i) Q:vom(i)
I:PY(j)$(not fe(j)) Q:vfi(j,i) e:$ele(j) a:HH T:tf(j,i)
I:PL Q:vfm("lab",i) va:
I:PK Q:vfm("cap",i) va:
I:PY(fe) Q:vfi(fe,i) ne: a:HH T:tf(fe,i)
10
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
• ENERGY1 implements a 50% tax on coal used as an intermediate input and reports changes in output and welfare.
tf("col",i) = 0.5;
$include ENERGY1.gen
solve ENERGY1 using mcp;
PARAMETER
OUTPUT(*,i) Output
WELFARE(*) Welfare;
OUTPUT("BASE",i) = vom(i);
OUTPUT("SIM",i) = vom(i)*Y.L(i);
OUTPUT("%C",i) = 100*(OUTPUT("SIM",i) - vom(i))/vom(i);
WELFARE("%C") = 100*(W.L - 1);
DISPLAY OUTPUT, WELFARE;
11
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
• When operating large-scale models, sending output to a gdx file allows the user to view variable and parameter values and definitions (if included) easily. ENERGY1 sends all model output to ENERGY1_OUTPUT.gdx.
EXECUTE_UNLOAD "ENERGY1_OUTPUT.gdx“
Exercises
1. Implement a 50% tax on coal used for electricity production without taxes on coal elsewhere.
2. When there is a 50% tax on coal used in all sectors, change the value of sigma("fe") from 1.2 to 2 and interpret the results.
12
http://globalchange.mit.edu/
A simple energy-economic model (ENERGY1.gms)
• ENERGY2 adds CO2 emissions from fossil fuels to ENERGY1 and considers a cap-and-trade policy
• The level of the cap is represented by the parameter clim and an emissions price declaration is included under the $COMMODITIES command
PARAMETER
fico2(j,i) CO2 emission by fuel for each sector - million
metric tons
hhco2(i) CO2 emissions from household consumption by fuel
type - million metric tons
clim CO2 emissions limit;
clim = 0;
$COMMODITIES:
PCO2$clim ! Price of co2 emissions
13
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
Setting clim = 0 turns off the carbon constraint
(to replicate the benchmark equilibrium)
• Emissions are introduced by applying fixed carbon coefficients per unit of energy from oil, coal and gas
• Producers and households are required to purchase an emissions allowance for each ton of CO2 emissions
* Consumer welfare function
$PROD:W s:sigma("top_fd") e:sigma("ene_fd") oil(e):0 col(e):0 gas(e):0
O:PW Q:vthp
I:PY(i)$(not fe(i)) Q:vhp(i) e:$ele(i)
I:PY(“oil”) Q:vhp(“oil”) oil:
I:PCO2$clim Q:hhco2(“oil”) P:1e-5 oil:
I:PY(“col”) Q:vhp(“col”) col:
I:PCO2$clim Q:hhco2(“col”) P:1e-5 col:
I:PY(“gas”) Q:vhp(“gas”) gas:
I:PCO2$clim Q:hhco2(“gas”) P:1e-5 gas:
14
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
Oil and CO2 allowances are included in a
‘Leontief’ (fixed proportions) nest
No emissions price in the base data and a CES function
calibrated to a commodity with a zero cost share will always be zero, so the “P:” field is used to assign a
“small” positive price
• A more succinct but equivalent representation of the consumer welfare function
* Consumer welfare function
$PROD:W s:sigma("top_fd") e:sigma("ene_fd") oil(e):0 col(e):0 gas(e):0
O:PW Q:vthp
I:PY(i)$(not fe(i)) Q:vhp(i) e:$ele(i)
I:PY(fe) Q:vhp(fe) fe.tl:
I:PCO2#(fe)$clim Q:hhco2(fe) P:1e-5 fe.tl:
15
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
The “.tl” suffix instructs GAMS to
display each element of fe
Instructs GAMS to include a separate I:PCO2#(fe)
for each element of fe
• Similar expression are used to include emissions in other production functions
* Electricity production
$PROD:Y(i)$(vom(i) and ele(i)) s:0 kle:sigma("e_kl") va(kle):sigma("k_l")
+ ene(kle):sigma("fe") oil(ene):0 col(ene):0 gas(ene):0
O:PY(i) Q:vom(i)
I:PY(j)$(not fe(j)) Q:vfi(j,i)
I:PL Q:vfm("lab",i) va:
I:PK Q:vfm("cap",i) va:
I:PY(fe) Q:vfi(fe,i) fe.tl:
I:PCO2#(fe)$clim Q:fico2(fe,i) P:1e-5 fe.tl:
* Other output and refined oil production
$PROD:Y(i)$(vom(i) and not ele(i) and not ff(i)) s:0 kle(s):sigma("e_kl")
+ va(kle):sigma("k_l") e(kle):sigma("ele_fe") ne(e):sigma("fe")
+ oil(ne):0 col(ne):0 gas(ne):0
O:PY(i) Q:vom(i)
I:PY(j)$(not fe(j)) Q:vfi(j,i) e:$ele(j)
I:PL Q:vfm("lab",i) va:
I:PK Q:vfm("cap",i) va:
I:PY(fe) Q:vfi(fe,i) fe.tl:
I:PCO2#(fe)$clim Q:fico2(fe,i) P:1e-5 fe.tl:
16
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
• Emissions allowances are endowed to the housel → revenue from the cap-and-trade program is returned to households
* Household demand
$DEMAND:HH
D:PW Q:vthp
E:PL Q:efh("lab")
E:PK Q:efh("cap")
E:PR(i) Q:vfm("res",i)
E:PCO2$clim Q:clim
17
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
The quantity of emissions rights is controlled by clim
• The default level for all GAMS variables is 1. To replicate the benchmark dataset, we need to set the price of CO2 emission equal to zero.
PCO2.L = 0;
• ENERGY2 implements a 20% reduction in CO2 emissions
clim = 0.8*sum(i, fco2(i));
$include ENERGY2.gen
solve ENERGY2 using mcp;
18
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
• Results reporting includes the quantity of emissions and the CO2 price
PARAMETER
EMISSIONS(*) CO2 emissions - million metric tons
PRICECO2(*) CO2 price $ per metric ton;
EMISSIONS("BASE") = sum(i, fco2(i));
EMISSIONS("SIM") = sum((fe,i)$vfi(fe,i),
fico2(fe,i)*FFE.L(fe,i)/vfi(fe,i))
+ sum(fe, hhco2(fe)*HFE.L(fe)/vhp(fe));
EMISSIONS("%C") = 100*(EMISSIONS("SIM")-EMISSIONS("BASE"))/EMISSIONS("BASE");
PRICECO2("SIM") = 1e3*PCO2.L/PW.L;
DISPLAY OUTPUT, WELFARE, EMISSIONS, PRICECO2;
EXECUTE_UNLOAD "ENERGY2_OUTPUT.gdx"
19
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
Benchmark emissions of from fuel fe used in sector i
Ratio of fuel input fe used in sector i in
the simulation to that in the benchmark
• Results reporting includes the quantity of emissions and the CO2 price
PARAMETER
EMISSIONS(*) CO2 emissions - million metric tons
PRICECO2(*) CO2 price $ per metric ton;
EMISSIONS("BASE") = sum(i, fco2(i));
EMISSIONS("SIM") = sum((fe,i)$vfi(fe,i),
fico2(fe,i)*FFE.L(fe,i)/vfi(fe,i))
+ sum(fe, hhco2(fe)*HFE.L(fe)/vhp(fe));
EMISSIONS("%C") = 100*(EMISSIONS("SIM")-EMISSIONS("BASE"))/EMISSIONS("BASE");
PRICECO2("SIM") = 1e3*PCO2.L/PW.L;
DISPLAY OUTPUT, WELFARE, EMISSIONS, PRICECO2;
EXECUTE_UNLOAD "ENERGY2_OUTPUT.gdx"
20
http://globalchange.mit.edu/
An energy model with emissions (ENERGY2.gms)
Economic data are in billions and
emissions data are in millions → multiply by (1e9/1e6)
Divide by a consumer price index so
that the numeraire choice does not influence the emissions price
All model output is sent to a gdx file
1. Implement a 30% reduction in emissions and analyze the results.
2. When there a 20% reduction in emissions, change the value of sigma("e_kl") from 0.5 to 1 and analyze changes in the CO2 price and welfare.
21
http://globalchange.mit.edu/
Exercises