## ======================================================================= ## The International Diffusion of Climate Change Mitigation Technologies ## ======================================================================= #NOTE: This model has been written using the R language, to run the model source this code into the R console. Then use the model calling the TechChangeModel function TechChangeMod<-function (Are.N.0,Ace.N.0,Are.S.0,Ace.S.0,S.0,TimeStep,EndTime,alfa,epsilon,L.re,Gamma.re,k.re,L.ce,Gamma.ce,k.ce,Eta.re,Eta.ce,Nu.re,Nu.ce,Xi.S,Delta.S,Run.ID) { library(deSolve) InitialConditions <- c(Are.N=Are.N.0,Ace.N=Ace.N.0,Are.S=Are.S.0,Ace.S=Ace.S.0,S=S.0) Parameters <- c(alfa = alfa, epsilon = epsilon, L.re = L.re, Gamma.re = Gamma.re, k.re = k.re, L.ce = L.ce, Gamma.ce = Gamma.ce, k.ce = k.ce, Eta.re= Eta.re, Eta.ce= Eta.ce, Nu.re = Nu.re, Nu.ce= Nu.ce,Xi.S=Xi.S,Delta.S=Delta.S) ModelEngine <- function(Time, State, Parameters) { with(as.list(c(State, Parameters)), { #Auxiliaries #General Phi<-(1-alfa)*(1-epsilon) epsi.re<-alfa^2 #this is the cost of production of clean technologies epsi.ce<-alfa^2 #this is the cost of production of dirty technologies #growth.A.re<-min((Are.N/Are.N.0-1)/L.re,0.9999) #growth.A.ce<-min((Ace.N/Ace.N.0-1)/L.ce,0.9999) #Gamma.re.t<-Gamma.re*exp(k.re-k.re/(1-growth.A.re^2)) #Gamma.ce.t<-Gamma.ce*exp(k.ce-k.ce/(1-growth.A.ce^2)) Gamma.re.t<-Gamma.re*exp(k.re-k.re/(1-min((Are.N/Are.N.0-1)/L.re,0.9999)^2)) Gamma.ce.t<-Gamma.ce*exp(k.ce-k.ce/(1-min((Ace.N/Ace.N.0-1)/L.ce,0.9999)^2)) #North Region #First we determine the equilibrium levels of relative input prices and relative labor RelPrice.N<-((Are.N/Ace.N)^(-1*(1-alfa)))*((epsi.ce/epsi.re)^-alfa) RelLabor.N<-((Are.N/Ace.N)^(-1*Phi))*((epsi.re/epsi.ce)^((alfa/(1-alfa))*Phi)) #Second we determine the equilibrium conditions for each sector #clean sector Labor.re.N<-RelLabor.N/(1+RelLabor.N) #based on the assumption that Labor.re.N+Labor.ce.N=1 Price.re.N<-RelPrice.N/(RelPrice.N^(1-epsilon)+1)^(1/(1-epsilon))#based on the assumption that Price.re.N^(1-epsilon)+Price.ce.N^(1-epsilon)=1 Agg.demand.re.tech.N<-((((alfa^2)*Price.re.N)/(epsi.re))^(1/(1-alfa)))*Labor.re.N*Are.N Profits.re.N<-Eta.re*epsi.re*((1-alfa)/alfa)*Agg.demand.re.tech.N Yre.N<-((((alfa^2)*Price.re.N)/(epsi.re))^(alfa/(1-alfa)))*Labor.re.N*Are.N #dirty sector Labor.ce.N<-Labor.re.N/RelLabor.N Price.ce.N<-Price.re.N/RelPrice.N Agg.demand.ce.tech.N<-((((alfa^2)*Price.ce.N)/(epsi.ce))^(1/(1-alfa)))*Labor.ce.N*Ace.N Profits.ce.N<-Eta.ce*epsi.ce*((1-alfa)/alfa)*Agg.demand.ce.tech.N Yce.N<-((((alfa^2)*Price.ce.N)/(epsi.ce))^(alfa/(1-alfa)))*Labor.ce.N*Ace.N #Total Production Y.N<-((Yre.N)^((epsilon-1)/epsilon)+(Yce.N)^((epsilon-1)/epsilon))^(epsilon/(epsilon-1)) #Allocation of Scientists sre.N<-exp(Profits.re.N)/(exp(Profits.ce.N)+exp(Profits.re.N)) sce.N<-1-sre.N #South Region #First we determine the equilibrium levels of relative input prices and relative labour RelPrice.S<-((Are.S/Ace.S)^(-1*(1-alfa)))*((epsi.ce/epsi.re)^-alfa) RelLabor.S<-((Are.S/Ace.S)^(-1*Phi))*((epsi.re/epsi.ce)^((alfa/(1-alfa))*Phi)) #Second we determine the equilibrium conditions for each sector #clean sector Labor.re.S<-RelLabor.S/(1+RelLabor.S) #based on the assumption that Labor.re.S+Labor.ce.S=1 Price.re.S<-RelPrice.S/(RelPrice.S^(1-epsilon)+1)^(1/(1-epsilon)) #based on the assumption that Price.re.S^(1-epsilon)+Price.ce.S^(1-epsilon)=1 Agg.demand.re.tech.S<-((((alfa^2)*Price.re.S)/(epsi.re))^(1/(1-alfa)))*Labor.re.S*Are.S Profits.re.S<-Eta.re*epsi.re*((1-alfa)/alfa)*Agg.demand.re.tech.S Yre.S<-((((alfa^2)*Price.re.S)/(epsi.re))^(alfa/(1-alfa)))*Labor.re.S*Are.S #dirty sector Labor.ce.S<-Labor.re.S/RelLabor.S Price.ce.S<-Price.re.S/RelPrice.S Agg.demand.ce.tech.S<-((((alfa^2)*Price.ce.S)/(epsi.ce))^(1/(1-alfa)))*Labor.ce.S*Ace.S Profits.ce.S<-Eta.ce*epsi.ce*((1-alfa)/alfa)*Agg.demand.ce.tech.S Yce.S<-((((alfa^2)*Price.ce.S)/(epsi.ce))^(alfa/(1-alfa)))*Labor.ce.S*Ace.S #Total Production Y.S<-((Yre.S)^((epsilon-1)/epsilon)+(Yce.S)^((epsilon-1)/epsilon))^(epsilon/(epsilon-1)) #Allocation of Scientists sre.S<-exp(Profits.re.S)/(exp(Profits.ce.S)+exp(Profits.re.S)) sce.S<-1-sre.S #Changes in Temperature CO2.Concentration<-max(280*(2^(6/3))-S,280) #assuming that 6 degrees increase are equivalent to a CO2 concentration of environmental disaster Temperature.Increase<-min(3*log2(CO2.Concentration/280),6) #the model is bounded to a 6 degree increase in temperature #State variables #Evolution of Productivity North Region dAre.N<-Gamma.re.t*Eta.re*sre.N*Are.N dAce.N<-Gamma.ce.t*Eta.ce*sce.N*Ace.N #Evolution of Productivity South Region dAre.S<-Nu.re*sre.S*Gamma.re.t*Eta.re*sre.N*Are.N dAce.S<-Nu.ce*sce.S*Gamma.ce.t*Eta.ce*sce.N*Ace.N #Environmental Quality dS<-Delta.S*S-Xi.S*(Yce.N+Yce.S) return(list(c(dAre.N,dAce.N,dAre.S,dAce.S,dS),RelPrice.N,RelLabor.N,Labor.re.N,Price.re.N,Agg.demand.re.tech.N,Profits.re.N,Yre.N,sre.N,Labor.ce.N,Price.ce.N,Agg.demand.ce.tech.N,Profits.ce.N,Yce.N,sce.N,Y.N, RelPrice.S,RelLabor.S,Labor.re.S,Price.re.S,Agg.demand.re.tech.S,Profits.re.S,Yre.S,sre.S,Labor.ce.S,Price.ce.S,Agg.demand.ce.tech.S,Profits.ce.S,Yce.S,sce.S,Y.S, Temperature.Increase,Gamma.re.t)) }) } #Model Solver out <- as.data.frame(ode(InitialConditions, seq(0, EndTime, by = TimeStep), ModelEngine, Parameters)) colnames(out)<-c("time","Are.N","Ace.N","Are.S","Ace.S","S", "RelPrice.N","RelLabor.N","Labor.re.N","Price.re.N","Agg.demand.re.tech.N","Profits.re.N","Yre.N","sre.N","Labor.ce.N","Price.ce.N","Agg.demand.ce.tech.N","Profits.ce.N","Yce.N","sce.N","Y.N", "RelPrice.S","RelLabor.S","Labor.re.S","Price.re.S","Agg.demand.re.tech.S","Profits.re.S","Yre.S","sre.S","Labor.ce.S","Price.ce.S","Agg.demand.ce.tech.S","Profits.ce.S","Yce.S","sce.S","Y.S", "Temperature.Increase","Gamma.re.t") out$Run.ID<-Run.ID out$time<-out$time+2010 return(out) }