Thank you very much for the offer, that would be really helpful!
Please find enclosed my model.
Many thanks!
Cheers,
Michel
$title The Swiss Energy Efficiency Model
Sets
*HIND: Industry sectors with high energy intensity; LIND:Industry sectors with low energy intensity
*HSERV. Service sectors with high energy intensity; LSERV: Service sector with low energy intensity
*FUEL: Fossil fuel industries; ELEC: Electricity sector
i Production Sectors /HIND,LIND,HSERV,LSERV,FUEL,ELEC/
k(i) Energy /FUEL,ELEC/
f Production Factors /K,L/
cs Sector-specific factors /KIND, KSERV, KFUEL, KELEC/
* Mapping
mapcap(i,cs)
/
HIND.KIND
LIND.KIND
HSERV.KSERV
LSERV.KSERV
FUEL.KFUEL
ELEC.KELEC
/
;
alias (f,ff), (i,j);
SET
t Time steps /2020*2065/,
TFIRST(t),
TLAST(t);
TFIRST(t) = YES$(ORD(t) EQ 1);
TLAST(t) = YES$(ORD(t) EQ CARD(t));
TABLE bench(*,*)
HIND LIND HSERV LSERV
HIND 59.23419 -29.81713 -2.57553 -13.49623
LIND -7.67203 235.00213 -1.90075 -45.42064
HSERV -1.21808 -3.45084 33.02471 -9.44084
LSERV -15.63673 -56.48394 -6.79712 578.30794
ELEC -2.15874 -1.90648 -0.37969 -5.87905
FUEL -1.14917 -1.01936 -2.45818 -1.79610
W
G
K -11.85776 -47.31392 -5.04610 -177.18843
TK -1.11810 -4.46136 -0.47581 -16.70760
L -13.73835 -71.29060 -9.04651 -239.63013
TL -3.48623 -18.09063 -2.29563 -60.80830
NCT -0.49997 -0.54780 -0.55411 -6.84808
TFUEL -0.69902 -0.62006 -1.49527 -1.09254
PFX
SAV
+ ELEC FUEL W I
HIND -0.85584 -0.03367 -37.24376 -1.85128
LIND -2.65938 -0.06910 -25.28674 -109.01158
HSERV -0.49742 -0.21741 -14.40306 -0.39454
LSERV -4.52560 -0.27941 -243.61873 -61.50180
ELEC 19.27032 -0.01933 -7.89152
FUEL -0.15647 1.98113 -7.56294
W 767.19828
G
K -4.75650 -0.63615
TK -0.44850 -0.05998
L -4.20769 -0.52926 -253.83190
TL -1.06774 -0.13430
NCT 0.00000 -0.00251
TFUEL -0.09518 0.00000 -4.60042
PFX
SAV -172.75920 172.75920
+ G X IM CONS GOV
HIND -52.24324 78.88249
LIND -174.17456 131.19266
HSERV -0.04482 -11.58594 8.22825
LSERV -126.16434 -141.87050 78.57024
ELEC -4.24248 3.20697
FUEL -0.50436 12.66546
W -767.19828
G 126.20916 -126.20916
K 246.79885
TK 23.27136
L 592.27444
TL 85.88283
NCT 8.45247
TFUEL 8.60249
PFX 384.62109 -312.74607 -71.87502
SAV
;
display bench
SCALAR
growth Growth Rate /0.02/
delta Depreciation Rate /0.05/
rate interest rate /0.05/
VK0 Benchmark Capital Earnings
KPT0 Benchmark Capital Stock
RK0 Benchmark Return to Capital
BOP Net Balance Payments (Exports-Imports)
Inv0 Benchmark Investment
Parameter
y0(i) Benchmark production
yd0(j,i) Benchmark intermediate demand
im0(i) Benchmark imports
x0(i) Benchmark exports
fd0(f,i) Benchmark factor demand
cd0(i) Benchmark consumer demand
e0(f) Benchmark factor endowments
q0(i) Benchmark Armington composite good
ls0(f) Benchmark leisure endowment
c0 Benchmark aggregate consumption
gd0(i) Benchmark government demand
g0 Benchmark public goods provision
i0(i) Benchmark investment
ftax0(f) Benchmark factor tax rate on a net basis
pf0(f) Benchmark gross factor price
ftax(f) Factor tax rate on a net basis
fftax0(i) Benchmark fuel tax rate on a net basis
pfuel0(i) Benchmark gross fuel price
fftax(i,t) Fuel tax rate on a net basis
nctax0(i) Benchmark net commodity tax rate on a gross basis
pnctax0(i) Benchmark net factor price
nctax(i) Net commodity tax rate on gross basis
energyflag(i) Flag for energy use
elecflag(i) Flag for electricity
fuelflag(i) Flag for fuel use
HicksTC(i,j,t) Hicksian Technological Change
QREF(t) Reference quantity path
PREF(t) Reference price path
results(*,t) Parameter to store results
labprod(t) Labour Productivity factor
KptShare(cs) Benchmark Capital share
;
* Extract the benchmark table
y0(i) = bench(i,i);
yd0(j,i) = max(-bench(j,i),0);
fd0(f,i) = -bench(f,i);
cd0(i) = -bench(i,"W");
ls0("L") = -bench("L","W");
e0(f) = bench(f,"CONS");
gd0(i) = -bench(i,"G");
i0(i) = -bench(i,"I");
g0 = bench("G","G");
im0(i) = bench(i,"IM");
x0(i) = -bench(i,"X");
q0(i) = sum(j, yd0(i,j)) + gd0(i) + cd0(i) + i0(i);
BOP = bench("PFX","CONS");
*Benchmark tax rates
*Capital and income tax
ftax0("L") = bench("TL","LSERV") / bench("L","LSERV");
ftax0("K") = bench("TK","LSERV") / bench("K","LSERV");
pf0(f) = 1 + ftax0(f);
ftax(f) = ftax0(f);
*Fossil Fuel tax
fftax0("FUEL") = bench("TFUEL","LSERV") / bench("FUEL","LSERV");
pfuel0(i) = 1 + fftax0(i);
fftax(i,t) = fftax0(i);
*Remaining net commodity tax
nctax0(i) = -bench("NCT",i) / (y0(i)-x0(i));
pnctax0(i) = 1 - nctax0(i);
nctax(i) = nctax0(i);
* Various defintions
energyflag(k) = 1;
elecflag("ELEC") = 1;
fuelflag("FUEL") = 1;
HicksTC(i,j,t) = 1;
labprod(t) = 1;
* Benchmark consumption
c0 = (sum(i, cd0(i)*(1+fftax0(i))) +sum(f, ls0(f)));
*Dynamic Investment and savings
QREF(t) = (1 + Growth) ** (ORD(t) -1);
PREF(t) = (1/(1 + Rate)) ** (ORD(t) -1 );
VK0 = bench("K","CONS");
RK0 = (delta + rate);
KPT0 = VK0 / RK0;
Inv0 = (delta + growth) * KPT0;
*Reference Quantities
KptShare(cs) = (sum(i$mapcap(i,cs), fd0("K",i))/VK0) ;
Display y0, yd0, fd0, cd0, e0, c0, gd0, g0, ls0, ftax, pf0, q0, fftax, pfuel0,
energyflag, HicksTC, QREF, PREF, VK0, Inv0, RK0, I0, nctax, pnctax0, KptShare;
$ONTEXT
$MODEL:Vector
$SECTORS:
Y(i,t) ! Activity index for production sectors
A(i,t) ! Activity index for Armington composite good
C(t) ! Activity index for consumption
W ! Intertemporal welfare accumulation
GVNT(t) ! Activity index for Government
Kpt(cs,t) ! Capital Accumulation
Inv(cs,t) ! Investment Sector
$COMMODITIES:
PY(i,t) ! Price index for commodities
PA(i,t) ! Price index for composite good
PL(t) ! Price index for labor
PK(cs,t) ! Price index for capital
RK(cs,t) ! Rental rate for capital
PFX(t) ! Foreign exchange
PC(t) ! Price index for consumption
PW ! Price index for intertemporal welfare
PG(t) ! Price index for public good
PKT ! Post-terminal capital constraint
$CONSUMERS:
CONS ! Consumer income level
GOV ! Public good provision
$AUXILIARY:
TK ! Terminal Capital Stock
TAU_P(t) ! Positive Endogenous labor tax rate for equal yield mechanism
$PROD:Y(i,t) t:2 s:0.5 a:0 b:0.5 c(b):0.5 d(c):0.5
O:PY(i,t) Q:(y0(i)-x0(i)) p:pnctax0(i) A:GOV T:nctax(i)
O:PFX(t) Q:x0(i)
I:PA(j,t)$(not energyflag(j)) Q:(yd0(j,i)/HicksTC(j,i,t)) a:
I:PL(t) Q:(fd0("L",i)/labprod(t)) p:pf0("L") A:GOV T:(2*ftax0("L")) A:GOV N:TAU_P(t) M:(-1) b:
I:RK(cs,t)$mapcap(i,cs) Q:fd0("K",i) p:pf0("K") A:GOV T:ftax("K") c:
I:PA(j,t)$elecflag(j) Q:(yd0(j,i)/HicksTC(j,i,t)) d:
I:PA(j,t)$fuelflag(j) Q:(yd0(j,i)/HicksTC(j,i,t)) p:pfuel0(j) A:GOV T:fftax(j,t) d:
$PROD:A(i,t) s:2
O:PA(i,t) Q:q0(i)
I:PY(i,t) Q:(y0(i) - x0(i))
I:PFX(t) Q:im0(i)
$PROD:Kpt(cs,t)
O:PK(cs,t+1) Q:((1-delta)*KptShare(cs)*KPT0)
O:PKT$TLAST(t) Q:((1-delta)*KptShare(cs)*KPT0)
O:RK(cs,t) Q:(KptShare(cs)*VK0)
I:PK(cs,t) Q:(KptShare(cs)*KPT0)
$PROD:Inv(cs,t)
O:PK(cs,t+1) Q:((delta+growth)*KptShare(cs)*KPT0)
O:PKT$TLAST(t) Q:((delta+growth)*KptShare(cs)*KPT0)
I:PA(i,t) Q:(KptShare(cs)*I0(i))
$PROD:C(t) s:1
O:PC(t) Q:c0
I:PA(i,t) Q:cd0(i) p:pfuel0(i) A:GOV T:fftax(i,t)
I:PL(t) Q:ls0("L")
$PROD:GVNT(t)
O:PG(t) Q:g0
I:PA(i,t) Q:gd0(i)
$PROD:W s:0.5
O:PW Q:(sum(t, QREF(t)*PREF(t)*c0))
I:PC(t) Q:(c0*QREF(t)) P:PREF(t)
$DEMAND:CONS s:1
D:PW Q:(sum(t, QREF(t)*PREF(t)*c0))
E:PL(t) Q:(e0("L")*QREF(t))
E:PK(cs,TFIRST) Q:(KptShare(cs)*KPT0)
E:PFX(t) Q:(BOP*QREF(t))
E:PKT Q: -1 R:TK
$DEMAND:GOV
D:PG(t) Q:(g0*QREF(t))
$CONSTRAINT:TK
sum(t$TLAST(t), sum(cs, Inv(cs,t)*KptShare(cs))/sum(cs,Inv(cs,t-1)*KptShare(cs)) - sum(i, Y(i,t)*y0(i)) /sum(i, Y(i,t-1)*y0(i))) =G= 0;
$CONSTRAINT:TAU_P(t)
GVNT(t) =E= QREF(t);
$Report:
V:HEV(t) O:PC(t) PROD:C(t)
V:Welfare O:PW PROD:W
V:Consumption(i,t) I:PA(i,t) PROD:C(t)
V:DomesticUse(i,t) O:PA(i,t) PROD:A(i,t)
V:FuelUse(i,t) I:PA("FUEL",t) PROD:Y(i,t)
V:ElectricityUse(i,t) I:PA("ELEC",t) Prod:Y(i,t)
V:HServiceUse(i,t) I:PA("HSERV",t) PROD:Y(i,t)
V:HIndustryUse(i,t) I:PA("HIND",t) PROD:Y(i,t)
V:LServiceUse(i,t) I:PA("LSERV",t) PROD:Y(i,t)
V:LIndustryUse(i,t) I:PA("LIND",t) PROD:Y(i,t)
V:GovernmentUse(i,t) I:PA(i,t) PROD:GVNT(t)
V:LaborUse(i,t) I:PL(t) PROD:Y(i,t)
V:Leisure(t) I:PL(t) PROD:C(t)
V:Imports(i,t) I:PFX(t) PROD:A(i,t)
V:Exports(i,t) O:PFX(t) PROD:Y(i,t)
V:CapitalUse(cs,i,t) I:RK(cs,t) PROD:Y(i,t)t)
V:Investment(cs,i,t) I:PA(i,t) PROD:Inv(cs,t)
$OFFTEXT
$SYSINCLUDE mpsgeset VECTOR
*Benchmark Replication Check
Y.L(i,t) = QREF(T);
A.L(i,t) = QREF(T);
C.L(t) = QREF(T);
GVNT.L(t) = QREF(T);
Inv.L(cs,t) = QREF(T);
Kpt.L(cs,t) = QREF(T);
TK.L = Kpt0 * (1+ Growth) ** CARD(t);
PY.L(i,t) = PREF(t);
PA.L(i,t) = PREF(t);
PFX.L(t) = PREF(t);
PL.L(t) = PREF(t);
PK.L(cs,t) = (1 + Rate) * PREF(t);
PC.L(t) = PREF(t);
PG.L(t) = PREF(t);
RK.L(cs,T) = PREF(t);
PKT.L = Sum(TLAST, PK.L("KIND",TLAST)/(1+Rate));
PW.FX = 1;
W.L = 1;
CONS.L = 1;
GOV.L = g0;
TAU_P.L(t) = (ftax0("L"));
VECTOR.ITERLIM = 0;
$include VECTOR.gen
SOLVE VECTOR USING MCP;