* The codes are the same for every scenario * Adjsut share in global trust SAVINGS(r) = SAVINGS(r)*(1-dDEP(r)) + SAVr_T(r,SIM,t)*t_size ; GLOBTRUSTSHARE(r) = SAVINGS(r)/sum(rr,SAVINGS(rr)); * primary factors in production FTOT(f,r)$flab(f) = FTOT(f,r)*(1+popg(r,t))**t_size; FTOT(f,r)$fcap(f) = FTOT(f,r)*(VKE.L(r)*VKEZ(r)/VKBZ(r))**t_size; FreeF_SH(f,r)$fcap(f) = 1- VKBZ(r)*(1-dDEP(r)) / (VKE.L(r)*VKEZ(r)); NFreeF_SH(f,a,i,r)$((FreeF_SH(f,r)<1) and IFAZ(f,a,i,r) and ay(a,i)) = FTOT(f,r)*(1-FreeF_SH(f,r)) *IF_ABS.L(f,a,i,r)*IFAZ(f,a,i,r)/sum((aa,y)$ay(aa,y),IF_ABS.L(f,aa,y,r)*IFAZ(f,aa,y,r)) /IFAZ(f,a,i,r) ; * update regional rates of return to capital ROREZ(r) = sum((f,a,i)$(fcap(f) and ay(a,i) and IFAZ(f,a,i,r)),IFAZ(f,a,i,r)*IF_ABS.L(f,a,i,r)*PFA.L(f,a,i,r)/PFD.L('INV',r)) /sum((f,a,i)$(fcap(f) and ay(a,i) and IFAZ(f,a,i,r)),IFAZ(f,a,i,r)*IF_ABS.L(f,a,i,r)/RORZ(r)) ; * Update expected change in capital stock based on changes in capital stock and its rates of return in the previous year. * A change in rates of return can also lead to unexpected change in capital stock, which we assume the same as the expected capital stock. KHAT(r) = (VKE.L(r)*VKEZ(r)/VKBZ(r))*(ROREZ(r)/ROREZ_T(r,SIM,t) )**(1/RORGFLEX(r)/2) ; RORE.L(r) = 1; ROREA.L = 1 ; *INV.LO(r) = INV.L(r)*0.05 ; INV.L(r) = INV.L(r) *(1 + GDPg(r,t+1)) ; INV.UP(r) = INV.L(r) *(1 + GDPg(r,t+1)*100) ; VKBZ(r) = VKBZ(r)*(VKE.L(r)*VKEZ(r)/VKBZ(r))**t_size; VKEZ(r) = VKBZ(r)*(1-dDEP(r)) + INVZ(r)*INV.L(r)*PI.L/ PFD.L('INV',r) ; KHAT0.L(r) = KHAT(r) ; *Determine the price normalization by the fixed GLOBTRST GLOBTRUST = sum((f,r)$fcap(f),FTOT(f,r)); GLOBTRST.FX= GLOBTRUST; *calibration of electricity generation XDAZ(a,i,r)$(ielc(i) and (not gene_gz(a,i,r)) and gene_g_t(a,i,r,t+1) )= gene_t(a,i,r,t)/10 ; XDZ(i,r)$ielc(i)=XDZ(i,r)*sum(a$(ay(a,i) and gene_g_t(a,i,r,t+1)), XDAZ(a,i,r) )/ sum(a$(ay(a,i) and gene_gz(a,i,r)), XDAZ(a,i,r) ) ; IFAZ(f,a,i,r)$(ielc(i) and (not gene_gz(a,i,r)) and gene_g_t(a,i,r,t+1) ) = XDAZ(a,i,r)*PDAZ(a,i,r)*(1-ty(i,r))*techinput(f,a,r)/100/(PFAZ(f,i,r)); IOAZ(ii,a,i,r)$(ielc(i) and (not gene_gz(a,i,r)) and gene_g_t(a,i,r,t+1) and afuel(a,ii)) = XDAZ(a,i,r)*PDAZ(a,i,r)*(1-ty(i,r))*techinput('FUL',a,r)/100/(P_IOZ(ii,i,r)); eff_xd(a,i,r)$(ielc(i) and gene_g_t(a,i,r,t+1) and (eff_xd(a,i,r)=0)) = 1; gene_gz(a,i,r) = (gene_gz(a,i,r)*gene_g_t(a,i,r,t+1))$(gene_gz(a,i,r)) + (gene_g_t(a,i,r,t+1))$(not gene_gz(a,i,r)); eRG(i,r)$ielc(i) = 0.7*exp((ord(t)-1)*log(5/0.7)/40); Prim_enZ(y,r)$ipep(y) = Prim_enZ(y,r)* Prim_eng(y,r,t+1) ; *demand for primary fossils eff(ii,a,i,r)$(ie(ii) and (not ie(i)) and (ord(t)<=4) ) = eff(ii,a,i,r)*exp(eff_ifg(ii,'TOT',r,'2011','BAU')) ; eff_f(i,j,r)$(ie(i) and (ord(t)<=4) ) = eff_f(i,j,r)*exp(eff_ifg(i,'TOT',r,'2011','BAU')) ; eff(ii,a,i,r)$(ie(ii) and (not ie(i)) and (ord(t)>4) ) = eff(ii,a,i,r)*exp(eff_ifg(ii,'TOT',r,'2011',SIM)) ; eff_f(i,j,r)$(ie(i) and (ord(t)>4) ) = eff_f(i,j,r)*exp(eff_ifg(i,'TOT',r,'2011',SIM)) ; * For calibration of GDP GDPgZ(r) = GDPgZ(r)*(1 + GDPg(r,t+1)); calib_capa(a,y,r)$(ielc(y) and ay(a,y) and XDAZ(a,y,r) ) = 1; calib_primen(y,r)$(ipep(y) ) = 1 ; calib_GDP(r) = 1; if(calib_toggle, eff_if(f,a,i,r)$(iagr(i) and (not rdvp(r)) ) = eff_if(f,a,i,r)*exp( (eff_ifg('H','TOT',r,'2011',SIM)$flab(f)+eff_ifg('K','TOT',r,'2011',SIM)$fcap(f))/2 ); eff_if(f,a,i,r)$(iagr(i) and rdvp(r) ) = eff_if(f,a,i,r)*exp( (eff_ifg('H','TOT',r,'2011',SIM)$(not fcap(f))+eff_ifg('K','TOT',r,'2011',SIM)$fcap(f))/2 ); ) ; If(calib_toggle, GLOBTRST.FX= GLOBTRUST; $INCLUDE GRACE.GEN GRACE.iterlim =2e+9; GRACE.RESLIM = 100000 ; SOLVE GRACE USING MCP; IF (((GRACE.modelstat <> 1) OR (GRACE.solvestat <> 1)), modstat(SIM) = 0; abort$(modstat(SIM)=0) "Couldn't solve!"; ELSE modstat(SIM) = 1; ); ); IOAZ(ii,a,i,r)$(IO_ABSr_T(ii,a,i,r,SIM,t)<10**(-6)) = 0 ; FDZ(i,j,r)$(FD_ABSr_T(i,j,r,SIM,t)<10**(-6)) = 0 ; if(((not calib_toggle) and (ord(t)