GAMS Rev 236 WEX-WEI 23.6.3 x86_64/MS Windows 01/19/12 10:47:08 Page 1 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m C o m p i l a t i o n quarter-year version of CJL Modifications: (1) quarter-year version when time interval of one period becomes a parame ter (2) get rid of CO2 time travel in Forcing (3) use explicit finite difference scheme in temperature in atmosphere (4) cancel fixed saving rate (s.fx(t) = .22) (5) cancel extra variables and equations and simplify (6) cancel terminal condition of capital (7) use nonzero terminal value function (8) cancel the fixed emission control rate for the first period (9) change sum(t$(ord(t)100); 157 158 159 *********************************** 160 * get terminal value function 161 *********************************** 162 163 set dim indices of dimensions /1*6/; 164 165 parameters 166 SVmin(dim) minimal state variables 167 SVmax(dim) maximal state variables 168 dz(dim) derivative of z over x 169 ; 170 171 set d index /1*5/; 172 alias(d,d2,d3,d4,d5,d6); 173 174 parameter coefs(d,d2,d3,d4,d5,d6) complete Chebyshev coefficients; 175 176 execute_load 'coefs_Climate_termValue',SVmin, SVmax, dz, coefs; 177 178 179 ***************************************************************** 180 181 VARIABLES 182 K(T) Capital stock trillions US dollars 183 MAT(T) Carbon concentration in atmosphere GtC 184 MU(T) Carbon concentration in shallow oceans Gtc 185 ML(T) Carbon concentration in lower oceans GtC 186 TATM(T) Temperature of atmosphere in degrees C 187 TOCEAN(T) Temperature of lower oceans degrees C 188 E(T) CO2-equivalent emissions GtC 189 C(T) Consumption trillions US dollars 190 MIU(T) Emission control rate GHGs 191 UTILITY; 192 193 POSITIVE VARIABLES K, MAT, MU, ML, TATM, TOCEAN, C, MIU, E; 194 195 196 free variable zPlus(dim) normalized tomorrow state variables; 197 zPlus.lo(dim) = -1; 198 zPlus.up(dim) = 1; 199 zPlus.l(dim) = 0; 200 201 free variable ChebyBasis(dim,d) Chebyshev polynomial basis; 202 203 variable SVend(dim) terminal state variables; 204 variable termUtil terminal utility function 205 206 ***************************************************************** 207 208 EQUATIONS 209 210 KK0 Initial condition for capital 211 MMAT0 Starting atmospheric concentration 212 MMU0 Initial shallow ocean concentration 213 MML0 Initial lower ocean concentration 214 TATM0EQ Initial condition for atmospheric temperature 215 TOCEAN0EQ Initial condition for lower ocean temperature 216 217 KK(T) Capital balance equation 218 MMAT(T) Atmospheric concentration equation 219 MMU(T) Shallow ocean concentration 220 MML(T) Lower ocean concentration 221 TATMEQ(T) Temperature-climate equation for atmosphere 222 TOCEANEQ(T) Temperature-climate equation for lower oceans 223 EE(T) Emissions equation 224 225 CCACCA total cumulative carbon emissions GTX 226 UTIL Objective function 227 228 KendC Terminal capital 229 CAendC Terminal atmospheric carbon concentration 230 CSendC Terminal shallow ocean concentration 231 CDendC Terminal lower ocean concentration 232 TAendC Terminal atmospheric temperature 233 TLendC Terminal lower ocean temperature 234 normalizeSVend(dim) normalized state variables 235 ChebyBasisFunDeg0(dim) Chebyshev polynomial basis with degree 0 236 ChebyBasisFunDeg1(dim) Chebyshev polynomial basis with degree 1 237 recursiveCheby(dim,d) recursive formula for Chebyshev polynomial basi s 238 TerminalUtilEQ terminal utility equation 239 ; 240 241 ** Equations of the model 242 243 KK0.. K('1') =E= K0; 244 MMAT0.. MAT('1') =E= MAT2000; 245 MMU0.. MU('1') =E= MU2000; 246 MML0.. ML('1') =E= ML2000; 247 TATM0EQ.. TATM('1') =E= TATM0; 248 TOCEAN0EQ.. TOCEAN('1') =E= TOCEAN0; 249 250 KK(T).. K(T+1) =L= (1-DK)**deltat *K(T)+deltat*( ( 1 - co st1(T)*(MIU(T)**EXPcost2) )* 251 (AL(T)*L(T)**(1-GAMA)*K(T)**GAMA) / (1 +A1*TATM(T)+ A2*TATM(T)**A3) - C(T) ); 252 MMAT(T+1).. MAT(T+1) =E= MAT(T)*bb11+MU(T)*bb21 + E(T); 253 MML(T+1).. ML(T+1) =E= ML(T)*bb33+bb23*MU(T); 254 MMU(T+1).. MU(T+1) =E= MAT(T)*bb12+MU(T)*bb22+ML(T)*bb32; 255 TATMEQ(T+1).. TATM(T+1) =E= TATM(t)+CC1*(FCO22X*(log(MAT(T)/596.4) /log(2))+FORCOTH(T) - LAM*TATM(t)-CC3*(TATM(t)-TOCEAN(t))); 256 TOCEANEQ(T+1).. TOCEAN(T+1) =E= TOCEAN(T)+CC4*(TATM(T)-TOCEAN(T)); 257 EE(T).. E(T) =E= deltat*SIGMA(T)*(1-MIU(T))* (AL(T)*L(T )**(1-GAMA)*K(T)**GAMA) + ETREE(T); 258 259 CCACCA.. sum(T, E(T)) =L= FOSSLIM; 260 UTIL.. UTILITY =E= sum( T, (((C(T)/L(T))**(1-B_ELASMU)-1) /(1-B_ELASMU)) * (RR(T)*L(T)*deltat/scale1) ) + termUtil* (beta*sum(TLAST, RR(TLAST))*POPASYM/scale1) ; 261 262 KendC.. SVend('1') =e= sum(TLAST, (1-DK)**deltat*K(TLAST)+deltat*( ( 1 - cost1(TLAST)*(MIU(TLAST)**EXPcost2) )* 263 (AL(TLAST)*L(TLAST)**(1-GAMA)*K(TLAST) **GAMA) / (1+A1*TATM(TLAST)+ A2*TATM(TLAST)**A3) - C(TLAST) )); 264 CAendC.. SVend('2') =e= sum(TLAST, MAT(TLAST)*bb11+MU(TLAST)*bb21 + E(TLAST)); 265 CSendC(T).. SVend('3') =e= sum(TLAST, MAT(TLAST)*bb12+MU(TLAST)*bb22+M L(TLAST)*bb32); 266 CDendC(T).. SVend('4') =e= sum(TLAST, ML(TLAST)*bb33+bb23*MU(TLAST)); 267 TAendC(T).. SVend('5') =e= sum(TLAST, TATM(TLAST)+CC1*( FCO22X*(log(MA T(TLAST)/596.4)/log(2))+FORCOTH(TLAST) - LAM*TATM(TLAST)-CC3*(TATM(TLAST)- TOCEAN(TLAST)))); 268 TLendC(T).. SVend('6') =e= sum(TLAST, TOCEAN(TLAST)+CC4*(TATM(TLAST)-T OCEAN(TLAST))); 269 normalizeSVend(dim).. zPlus(dim) =e= (SVend(dim)-SVmin(dim))*dz( dim)-1; 270 ChebyBasisFunDeg0(dim).. ChebyBasis(dim,'1') =e= 1; 271 ChebyBasisFunDeg1(dim).. ChebyBasis(dim,'2') =e= zPlus(dim); 272 recursiveCheby(dim,d)$(ord(d)>=2 and ord(d)=2 and ord(d)