* 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)) ; display ROREZ ; * 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 ; *KHAT(r) = ( (VKE.L(r)*VKEZ(r)/VKBZ(r))*(1+(RORE.L(r)-1)/ROREZ(r) )**(1/RORGFLEX(r)) )**(1-(ord(t)-1)/1000 ) ; *KHAT(r) = (VKE.L(r)*VKEZ(r)/VKBZ(r))*(1 + GDPg(r,t+1))/(1 + GDPg(r,t))*(1+(RORE.L(r)-1)/ROREZ(r) )**(1/RORGFLEX(r)) ; *KHAT(r) = VKE.L(r)*VKEZ(r)/VKBZ(r)*(ROREZ(r)/ROREZ_T(r,SIM,t) )**(1/RORGFLEX(r)) ; *KHAT(r) = VKE.L(r)*VKEZ(r)/VKBZ(r) ; *VKEZ(r) = VKBZ(r)*(1-dDEP(r)) + INVZ(r)*INV.L(r)*PI.L/ PFD.L('INV',r) ; 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) ; *KHAT(r)$rchn(r) = KHAT(r)*((1+sum(tt$(ord(tt)=card(tt)),GDPg(r,tt)))/(1+GDPg(r,t)) )**(1/(card(tt)-ord(t)) ) ; *KHAT(r)$rchn(r) = KHAT(r)*((1+sum(tt$(ord(tt)=card(tt)),GDPg(r,tt)))/(1+GDPg(r,t)) )**(1/(card(tt)-1) ) ; *KHAT(r) = (VKEZ(r)/VKBZ(r))**(1-(ord(t)-1)/39 ) ; *KHAT(r) = (VKE.L(r)*VKEZ(r)/VKBZ(r)-(1 - (RORE.L(r)-1)/ (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)) ) ) /10 ); 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) ; *VKE.LO(r) = VKBZ(r) / VKEZ(r) ; display KHAT ; *KHAT0.UP(r) = 1.1 ; KHAT0.L(r) = KHAT(r) ; *KHAT0.LO(r) = 1 ; *KHAT0.LO(r) = KHAT0.L(r)/(1 + GDPg(r,t+1)*2) ; *RORE.LO(r) = 1; RORE.UP(r) = (RORE.L(r)-1)*2 + 1; *KHAT(r) = KHAT_T(r,SIM,t)+ (KHAT(r)-KHAT_T(r,SIM,t))*0.95 ; *Determine the price normalization by the fixed GLOBTRST GLOBTRUST = sum((f,r)$fcap(f),FTOT(f,r)); GLOBTRST.FX= GLOBTRUST; *EFFTFP.LO(f,r)$(FTOT(f,r) and (not fnat(f)) ) = EFFTFP.L(f,r) ; *PF.LO(f,r) = PF.L(f,r)*0.5 ; *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; *eff_xd(a,i,r)$(ielc(i) and aint(a) and gene_g_t(a,i,r,t+1)) = eff_xd(a,i,r)*( (9+gene_g_t(a,i,r,t+1))/10 ); *eff_xd(a,i,r)$(ielc(i) and aint(a) and gene_g_t(a,i,r,t+1)) = eff_xd(a,i,r)/( (9+gene_g_t(a,i,r,t+1))/10 ); tem=1; loop(tmax$(ord(tmax)<=tem), gene_gz(a,i,r) = (gene_gz(a,i,r)*gene_g_t(a,i,r,t+1)**(1/tem))$(gene_gz(a,i,r)) + (gene_g_t(a,i,r,t+1)**(1/tem))$(not gene_gz(a,i,r)); *eRG(i,r)$ielc(i) = 0.7; 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)**(1/tem) ; *demand for primary fossils * For calibration of GDP GDPgZ(r) = GDPgZ(r)*(1 + GDPg(r,t+1))**(1/tem); 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; *calib_primen(y,r)$(ipep(y) and (ord(t)>30)) = 0 ; *calib_GDP(r)$(ord(t)>30) = 0; *eff_if(f,a,i,r)$(not fnat(f) and (ord(t)>1) and eff_if_T(f,a,i,r,'BAU',t-1)) = eff_if(f,a,i,r)*eff_if_T(f,a,i,r,'BAU',t)/eff_if_T(f,a,i,r,'BAU',t-1) ; If((calib_toggle and (ord(tmax)<>tem)), GLOBTRST.FX= GLOBTRUST; $INCLUDE GRACE.GEN GRACE.iterlim =2e+9; GRACE.RESLIM = 100000 ; * GRACE.optfile = 1; 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 ; *display GDPgZ,Prim_enZ,gene_gz,XDAZ,IOAZ; if((not calib_toggle), EFFTFPZ(f,r) = efftfpz_T(f,r,'BAU',t+t_size); EFFTFP_SZ(f,y,r) = efftfp_sz_T(f,y,r,'BAU',t+t_size); CAPAZ(a,i,r) = CAPAZ_T(a,i,r,'BAU',t+t_size); TS_PrimenZ(y,r) = TS_PrimenZ_T(y,r,'BAU',t+t_size) ; eff_if(f,a,i,r) = eff_if_T_(f,a,i,r,'BAU',t+t_size) ; * eff_if(f,a,i,r)$(rchn(r) and (ord(t)>=30) and fcap(f) ) = eff_if_T_(f,a,i,r,'BAU','2040') ; );