*---------------------------------------------------------------- * 3.x SAM forecasting (Ralf) *---------------------------------------------------------------- SETs YEARS time periods /2003*2050/ HouseMatrix /ETAPIT, ETATP, HH0, HW0, ETARA, NRPG, ETAYD, ETAU/ MISCMatrix/JOBS, ETAM, ETAE, SIGMA, R0/ *we need a subset with all variables of the SAM but the ROW Z_without_ROW(Z) ALL ACCOUNTS IN SOCIAL ACCOUNTING MATRIX other then ROW/ AGRIC CATTLE DAIRY FOREST OILGAS OTHPRI DISTEL DSTGAS DSTOTH *CONRES *CONNON CONSTR *CONUTL *CONOTH FDMFG FDPROC FDOTH BEVTOB TEXLTH APPREL WOOD PLPMLL PAPER PRINT OILREF INDGAS CHMDRG CHMBAS CHMSPS CHMOTH PLASTC GLASS CEMENT CONCRT SCAOTH PRIMTL ALUM MTLFAB MACHIN RFARCN CMPMFG CMPCMM CMPRTS CMPINS CMPMED ELCTRC AUTOMF VEHMFG VEHBDY VEHPRT VEHSHP VEHOTH VEHAER FURN LABDNT MSCMFG VEHSRV WHLDUR WHLNON WHLGAS WHLAGN TRANSP *AIRTNS *RRTNS *WATTNS *TRKTNS *PUBTNS *OTHTNS *VEHTNS RETVEH RETFRN RETELC RETBLD RETFD RETDRG RETGAS RETAPP RETSPT RETGEN RETMSC RETNON INFOPC INFOTH INFOTL INFCOM FINSEC FINSUR FIBNKS FIREAL FINOTH PROLEG PROACC PROARC PRODES PROCOM PROCNS PRORES PROADV PROOTH BUSSRV ADMTMP ADMSEC ADMBLD ADMOTH WSTSRV LNDFIL EDUC MEDAMB MEDHSP MEDNRS MEDSA RECENT RECAMS ACCHOT ACCRST ACCFST ACCSPC ACCBRS PERSRV LABOR CAPIT CFOOD CHOME CFUEL CFURN CCLTH CTRNS CMEDS CAMUS COTHR HOUS0 HOUS1 HOUS2 HOUS4 HOUS6 HOUS8 HOUS9 HOUSH INVES FTSOC FTPIT FTPRO FTDUT FTMSC CTHHS CTBOZ CTCIG CTHOR CTEST CTTRL CTLIC CTDIE CTREG CTMSC CTINS CTGAS CTSAU CTBAC CTLAB CTPIT CTRGU CTSVC CTPAM CGENF LTPRP LTSAU LTFMS LTHHS LTMSC FSDEF FSNON CSTRA CSCOR CSK14 CSUNI CSWEL CSHTH CSOTH LSTRA LSCOR LSK14 LSWEL LSHTH LSOTH / * I_without_engergy(I) ALL Industries other than / * AGRIC ,CATTLE,DAIRY,FOREST,OILGAS,OTHPRI,DSTOTH,CONRES,CONNON,CONSTR,CONUTL,CONOTH AGRIC ,CATTLE,DAIRY,FOREST,OILGAS,OTHPRI,DSTOTH,CONSTR, FDMFG,FDPROC,FDOTH,BEVTOB,TEXLTH,APPREL,WOOD,PLPMLL,PAPER,PRINT,OILREF,CHMDRG,CHMBAS,CHMSPS CHMOTH,PLASTC,GLASS,CEMENT,CONCRT,SCAOTH,PRIMTL,ALUM,MTLFAB,MACHIN,RFARCN,CMPMFG,CMPCMM,CMPRTS,CMPINS CMPMED,ELCTRC,AUTOMF,VEHMFG,VEHBDY,VEHPRT,VEHSHP,VEHOTH,VEHAER,FURN,LABDNT,MSCMFG,VEHSRV,WHLDUR,WHLNON *WHLAGN,TRANSP,AIRTNS,RRTNS,WATTNS,TRKTNS,PUBTNS,OTHTNS,VEHTNS,RETVEH,RETFRN,RETELC,RETBLD,RETFD WHLAGN,TRANSP,RETVEH,RETFRN,RETELC,RETBLD,RETFD RETDRG,RETAPP,RETSPT,RETGEN,RETMSC,RETNON,INFOPC,INFOTH,INFOTL,INFCOM,FINSEC,FINSUR,FIBNKS,FIREAL FINOTH,PROLEG,PROACC,PROARC,PRODES,PROCOM,PROCNS,PRORES,PROADV,PROOTH,BUSSRV,ADMTMP,ADMSEC,ADMBLD,ADMOTH WSTSRV,LNDFIL,EDUC,MEDAMB,MEDHSP,MEDNRS,MEDSA,RECENT,RECAMS,ACCHOT,ACCRST,ACCFST,ACCSPC,ACCBRS,PERSRV/ * GTS(G) SPENDING UNITS / FSDEF, FSNON, CSTRA, CSCOR, CSK14, CSUNI, CSWEL, CSHTH, CSOTH, LSTRA, LSCOR, LSK14, LSWEL, LSHTH, LSOTH/ GTS_NOWEL(G) SPENDING UNITS without LSWEL / FSDEF, FSNON, CSTRA, CSCOR, CSK14, CSUNI, CSWEL, CSHTH, CSOTH, LSTRA, LSCOR, LSK14, LSHTH, LSOTH/ * ICI(Z) INDUSTRY SECTORS and LABOR and CAPITAL and COMPOSITE COMMODITIES / AGRIC, CATTLE, DAIRY, FOREST, OILGAS, OTHPRI, DISTEL, DSTGAS, * DSTOTH, CONRES, CONNON, CONSTR, CONUTL, CONOTH, FDMFG, FDPROC, DSTOTH, CONSTR, FDMFG, FDPROC, FDOTH, BEVTOB, TEXLTH, APPREL, WOOD, PLPMLL, PAPER, PRINT, OILREF, INDGAS, CHMDRG, CHMBAS, CHMSPS, CHMOTH, PLASTC, GLASS, CEMENT, CONCRT, SCAOTH, PRIMTL, ALUM, MTLFAB, MACHIN, RFARCN, CMPMFG, CMPCMM, CMPRTS, CMPINS, CMPMED, ELCTRC, AUTOMF, VEHMFG, VEHBDY, VEHPRT, VEHSHP, VEHOTH, VEHAER, FURN, LABDNT, MSCMFG, VEHSRV, WHLDUR, WHLNON, * WHLGAS, WHLAGN, TRANSP, AIRTNS, RRTNS, WATTNS, TRKTNS, PUBTNS, OTHTNS, WHLGAS, WHLAGN, TRANSP, * VEHTNS, RETVEH, RETFRN, RETELC, RETBLD, RETFD, RETDRG, RETGAS, RETVEH, RETFRN, RETELC, RETBLD, RETFD, RETDRG, RETGAS, RETAPP, RETSPT, RETGEN, RETMSC, RETNON, INFOPC, INFOTH, INFOTL, INFCOM, FINSEC, FINSUR, FIBNKS, FIREAL, FINOTH, PROLEG, PROACC, PROARC, PRODES, PROCOM, PROCNS, PRORES, PROADV, PROOTH, BUSSRV, ADMTMP, ADMSEC, ADMBLD, ADMOTH, WSTSRV, LNDFIL, EDUC, MEDAMB, MEDHSP, MEDNRS, MEDSA, RECENT, RECAMS, ACCHOT, ACCRST, ACCFST, ACCSPC, ACCBRS, PERSRV, LABOR, CAPIT, CFOOD, CHOME, CFUEL, CFURN, CCLTH, CTRNS, CMEDS, CAMUS, COTHR / IC(Z) INDUSTRY SECTORS and COMPOSITE COMMODITIES / AGRIC, CATTLE, DAIRY, FOREST, OILGAS, OTHPRI, DISTEL, DSTGAS, * DSTOTH, CONRES, CONNON, CONSTR, CONUTL, CONOTH, FDMFG, FDPROC, DSTOTH, CONSTR, FDMFG, FDPROC, FDOTH, BEVTOB, TEXLTH, APPREL, WOOD, PLPMLL, PAPER, PRINT, OILREF, INDGAS, CHMDRG, CHMBAS, CHMSPS, CHMOTH, PLASTC, GLASS, CEMENT, CONCRT, SCAOTH, PRIMTL, ALUM, MTLFAB, MACHIN, RFARCN, CMPMFG, CMPCMM, CMPRTS, CMPINS, CMPMED, ELCTRC, AUTOMF, VEHMFG, VEHBDY, VEHPRT, VEHSHP, VEHOTH, VEHAER, FURN, LABDNT, MSCMFG, VEHSRV, WHLDUR, WHLNON, * WHLGAS, WHLAGN, TRANSP, AIRTNS, RRTNS, WATTNS, TRKTNS, PUBTNS, OTHTNS, WHLGAS, WHLAGN, TRANSP, * VEHTNS, RETVEH, RETFRN, RETELC, RETBLD, RETFD, RETDRG, RETGAS, RETVEH, RETFRN, RETELC, RETBLD, RETFD, RETDRG, RETGAS, RETAPP, RETSPT, RETGEN, RETMSC, RETNON, INFOPC, INFOTH, INFOTL, INFCOM, FINSEC, FINSUR, FIBNKS, FIREAL, FINOTH, PROLEG, PROACC, PROARC, PRODES, PROCOM, PROCNS, PRORES, PROADV, PROOTH, BUSSRV, ADMTMP, ADMSEC, ADMBLD, ADMOTH, WSTSRV, LNDFIL, EDUC, MEDAMB, MEDHSP, MEDNRS, MEDSA, RECENT, RECAMS, ACCHOT, ACCRST, ACCFST, ACCSPC, ACCBRS, PERSRV, CFOOD, CHOME, CFUEL, CFURN, CCLTH, CTRNS, CMEDS, CAMUS, COTHR / * HF(Z) HOUSEHOLDS and FTSOC / HOUS0, HOUS1, HOUS2, HOUS4, HOUS6, HOUS8, HOUS9, HOUSH, FTSOC / ; ALIAS (Z_without_ROW,Z_without_ROW1); *declaring the new matrix and vectors for our mulitplication factors PARAMETERS SAM2(Z,Z1) MISC2(Z,MISCMatrix) MISCH2(H,HouseMatrix) CCCM(I,J) *based on the DOF numbers for Cal PI growth and Cal CPI after 2020 we continue with the 2020 real growth rate *send to Peter per mail and can be found in file: dof income proj and deflation.xls INC_GROWTH_FAC(YEARS) DOF California personal income growth / 2003 1 2004 1.039895005 2005 1.06668221 2006 1.095031194 2007 1.126705457 2008 1.165189531 2009 1.202276466 2010 1.238542954 2011 1.275174059 2012 1.310320928 2013 1.345349789 2014 1.380981609 2015 1.417510174 2016 1.45494601 2017 1.493441272 2018 1.532605272 2019 1.57305066 2020 1.614459861 2021 1.614459861 2022 1.656920156 2023 1.700497156 2024 1.745220231 2025 1.791119523 2026 1.838225966 2027 1.886571309 2028 1.936188135 2029 1.987109883 2030 2.039370873 2031 2.093006327 2032 2.148052393 2033 2.204546171 2034 2.262525735 2035 2.322030162 2036 2.383099555 2037 2.445775074 2038 2.510098958 2039 2.576114561 2040 2.643866374 2041 2.713400059 2042 2.784762481 2043 2.858001734 2044 2.93316718 2045 3.010309477 2046 3.089480616 2047 3.170733956 2048 3.254124259 2049 3.339707727 2050 3.42754204 / * assuming 0.5% growth rate in the refining and gas producing sectors *the factor is calculated in excel see file: dof income proj and deflation.xls REF_GROWTH_FAC(YEARS) ASS California Refinery growth / 2003 1 2004 1.005 2005 1.010025 2006 1.015075125 2007 1.020150501 2008 1.025251253 2009 1.030377509 2010 1.035529397 2011 1.040707044 2012 1.045910579 2013 1.051140132 2014 1.056395833 2015 1.061677812 2016 1.066986201 2017 1.072321132 2018 1.077682738 2019 1.083071151 2020 1.088486507 2021 1.09392894 2022 1.099398584 2023 1.104895577 2024 1.110420055 2025 1.115972155 2026 1.121552016 2027 1.127159776 2028 1.132795575 2029 1.138459553 2030 1.144151851 2031 1.14987261 2032 1.155621973 2033 1.161400083 2034 1.167207083 2035 1.173043119 2036 1.178908334 2037 1.184802876 2038 1.19072689 2039 1.196680525 2040 1.202663927 2041 1.208677247 2042 1.214720633 2043 1.220794236 2044 1.226898208 2045 1.233032699 2046 1.239197862 2047 1.245393852 2048 1.251620821 2049 1.257878925 2050 1.264168319 / * based on the assumtion that the Gas and Oil extration sector of Cal will half its production by 2020 (starting 2003) * this is equivalent to a 4% fall in output each year which continues after 2020 at same rate *the factor is calculated in excel see file: dof income proj and deflation.xls EXTRACT_GROWTH_FAC(YEARS) ASS California oil and gas extraction growth / 2003 1 2004 0.96 2005 0.9216 2006 0.884736 2007 0.84934656 2008 0.815372698 2009 0.78275779 2010 0.751447478 2011 0.721389579 2012 0.692533996 2013 0.664832636 2014 0.638239331 2015 0.612709757 2016 0.588201367 2017 0.564673312 2018 0.54208638 2019 0.520402925 2020 0.499586808 2021 0.479603335 2022 0.460419202 2023 0.442002434 2024 0.424322337 2025 0.407349443 2026 0.391055465 2027 0.375413247 2028 0.360396717 2029 0.345980848 2030 0.332141614 2031 0.31885595 2032 0.306101712 2033 0.293857643 2034 0.282103338 2035 0.270819204 2036 0.259986436 2037 0.249586978 2038 0.239603499 2039 0.230019359 2040 0.220818585 2041 0.211985842 2042 0.203506408 2043 0.195366152 2044 0.187551505 2045 0.180049445 2046 0.172847467 2047 0.165933569 2048 0.159296226 2049 0.152924377 2050 0.146807402 / ROW_CHECK1 Checking ROW sums ROW_CHECK2 Checking ROW sums *these California total population forecast through 2050 are form the DOF *sent to peter per email found in file: Calif Popprojection_Factors.xls *NOTE: at the moment the total population forecast is not unsed POP_GROWTH_FAC(YEARS) FORCAST California population growth / 2003 1 2004 1.012284525 2005 1.025581128 2006 1.038959296 2007 1.052183518 2008 1.065499963 2009 1.078831407 2010 1.092160931 2011 1.105159662 2012 1.118114565 2013 1.131058364 2014 1.14397556 2015 1.156837239 2016 1.169656007 2017 1.182420454 2018 1.195127214 2019 1.207768801 2020 1.22030837 2021 1.232743389 2022 1.245048868 2023 1.257232238 2024 1.269295141 2025 1.281225192 2026 1.293028487 2027 1.304696648 2028 1.316225948 2029 1.32760595 2030 1.33882608 2031 1.348951093 2032 1.358908748 2033 1.368718357 2034 1.378392528 2035 1.387932428 2036 1.397348299 2037 1.406662736 2038 1.415904208 2039 1.425085822 2040 1.434218543 2041 1.443323157 2042 1.452386641 2043 1.461406908 2044 1.470397037 2045 1.479372195 2046 1.488339394 2047 1.497305814 2048 1.506287205 2049 1.515301879 2050 1.524356485 / *these California WORKING population (age 18-64) forecast through 2050 are form the DOF *sent to peter per email found in file: Calif Popprojection_Factors.xls *NOTE at the moment the working population (which grows sign. slower) is used to scale JOBS, HH0 and HW0 as those are all depending on the over 18 year old WPOP_GROWTH_FAC(YEARS) FORCAST California population growth / 2003 1 2004 1.015110205 2005 1.032017822 2006 1.048921077 2007 1.065409799 2008 1.08194196 2009 1.098543639 2010 1.114313448 2011 1.128138856 2012 1.138974185 2013 1.149262841 2014 1.15890682 2015 1.166809171 2016 1.174317773 2017 1.181097358 2018 1.187306815 2019 1.194118134 2020 1.199762003 2021 1.205758719 2022 1.211407172 2023 1.216891618 2024 1.222529167 2025 1.227186816 2026 1.23251727 2027 1.23802753 2028 1.243611493 2029 1.249214683 2030 1.255002975 2031 1.261001027 2032 1.2673019 2033 1.273297059 2034 1.278712075 2035 1.283020259 2036 1.288321651 2037 1.29473161 2038 1.301715346 2039 1.309181756 2040 1.316354779 2041 1.324110258 2042 1.332194908 2043 1.34065181 2044 1.349024594 2045 1.356860764 2046 1.36458135 2047 1.372175004 2048 1.379688279 2049 1.387517061 2050 1.395172934 / GAS_INTENSITY_FAC(YEARS) FORCAST California natural gas per $ efficency / 2003 1 2004 0.937312368 2005 0.890488934 2006 0.876022719 2007 0.854915744 2008 0.838688138 2009 0.819235934 2010 0.802571383 2011 0.790502371 2012 0.773305867 2013 0.756617124 2014 0.741668844 2015 0.726973368 2016 0.712528071 2017 0.698330283 2018 0.684377287 2019 0.67066633 2020 0.657194626 2021 0.643959355 2022 0.630957674 2023 0.618186716 2024 0.605643594 2025 0.593325406 2026 0.581229236 2027 0.569352159 2028 0.557691242 2029 0.546243548 2030 0.535006138 2031 0.523976073 2032 0.513150417 2033 0.502526237 2034 0.492100608 2035 0.481870613 2036 0.471833347 2037 0.461985914 2038 0.452325434 2039 0.44284904 2040 0.433553884 2041 0.424437132 2042 0.415495971 2043 0.406727609 2044 0.398129273 2045 0.389698212 2046 0.381431699 2047 0.373327031 2048 0.365381528 2049 0.357592536 2050 0.349957426 / ELEC_INTENSITY_FAC(YEARS) FORCAST California electricity per $ efficency /2003 1 2004 0.950235958 2005 0.902664528 2006 0.893135879 2007 0.883903357 2008 0.874981988 2009 0.863833644 2010 0.852776672 2011 0.841956217 2012 0.831286193 2013 0.820615391 2014 0.811151544 2015 0.80178708 2016 0.792311767 2017 0.780955544 2018 0.769592844 2019 0.75823387 2020 0.746888207 2021 0.734772375 2022 0.722732047 2023 0.710773275 2024 0.698901671 2025 0.687122427 2026 0.675440338 2027 0.663859821 2028 0.652384937 2029 0.641019407 2030 0.62976663 2031 0.618629703 2032 0.607611431 2033 0.596714348 2034 0.585940728 2035 0.5752926 2036 0.564771763 2037 0.554379796 2038 0.544118069 2039 0.53398776 2040 0.52398986 2041 0.514125186 2042 0.504394391 2043 0.494797972 2044 0.485336281 2045 0.476009532 2046 0.46681781 2047 0.457761078 2048 0.448839184 2049 0.440051871 2050 0.431321247 / FUEL_INTENSITY_FAC(YEARS) FORCAST California electricity per $ efficency / 2003 1 2004 0.94460266 2005 0.900166246 2006 0.893901712 2007 0.888725912 2008 0.882942884 2009 0.875422065 2010 0.867008368 2011 0.858119109 2012 0.849232283 2013 0.839532067 2014 0.828848061 2015 0.817062437 2016 0.804928092 2017 0.792858262 2018 0.780517552 2019 0.768044763 2020 0.755495505 2021 0.742894202 2022 0.730987735 2023 0.718743138 2024 0.706797019 2025 0.69496203 2026 0.682523669 2027 0.669945678 2028 0.657305252 2029 0.644785557 2030 0.632137794 2031 0.619311731 2032 0.606330375 2033 0.59321179 2034 0.580048566 2035 0.56692848 2036 0.553841824 2037 0.540786632 2038 0.527769735 2039 0.514861979 2040 0.502076256 2041 0.489423848 2042 0.476925725 2043 0.464583509 2044 0.452440122 2045 0.440486126 2046 0.428741028 2047 0.417213181 2048 0.405907765 2049 0.394842255 2050 0.384010473 / INPUT_CPI_FAC(YEARS) For converting input from year 2003 dollars -- tentative after 2006 / 2003 1 2004 1.026261 2005 1.064076 2006 1.105567 2007 1.134066 / chekc HHdespi Q(Z) SOCIAL ACCOUNTING MATRIX TOTALS differences ; Scalar iii ; ALIAS (HF,HF1),(I_without_engergy,I_without_engergy1); * now we define SAM2 (%1 refers to the year for which we want the forecast and can be * changed in the main SAM GAMS file where this file is red in) *now we start with the transformation to the 2050 sam starting with the 2003 SAM SAM2(Z,Z1)=SAM(Z,Z1)*INC_GROWTH_FAC('%1'); ***sector OILGAS *1st this gives the special sectors the right "input" growth SAM2(ICI,'OILGAS')=SAM(ICI,'OILGAS')*EXTRACT_GROWTH_FAC('%1'); *2nd balance with ROW imports to make up for smaller production (compared to growing demand) SAM2('ROW','OILGAS')=sum(Z, SAM2('OILGAS',Z))-sum(Z_without_ROW, SAM2(Z_without_ROW,'OILGAS')); **** Sector OILREF *1st this gives the special sectors the right "input" growth SAM2(ICI,'OILREF')=SAM(ICI,'OILREF')*REF_GROWTH_FAC('%1') ; *2nd balance with ROW imports to make up for smaller production (compared to growing demand) SAM2('ROW','OILREF')=sum(Z, SAM2('OILREF',Z))-sum(Z_without_ROW, SAM2(Z_without_ROW,'OILREF')); **** Sector INDGAS *1st this gives the special sectors the right "input" growth SAM2(ICI,'INDGAS')=SAM(ICI,'INDGAS')*REF_GROWTH_FAC('%1') ; * assume (which is not 100% clear from description) that INDGAS is both manufacturing and distribution, so it will get scaled in the * outputs the same way as for DSTGAS to account for increase in energy/$ efficiency SAM2('INDGAS',ICI)=SAM2('INDGAS',ICI)*GAS_INTENSITY_FAC('%1') ; *now we scale the taxes according to the output growth SAM2(GT,'INDGAS')=SAM2(GT,'INDGAS')*GAS_INTENSITY_FAC('%1') ; *3rd balance with ROW exports as CA exports much more INDGAS so that with current numbers and till 2050 we are still * not driving exports into the negative SAM2('INDGAS','ROW')=sum(Z, SAM2(Z,'INDGAS'))-sum(Z_without_ROW, SAM2('INDGAS',Z_without_ROW)); *DEC06 this adds the scaling of the energy sectors to account for energy efficiency gains **** Sector DISTEL *1st we scale the "outputs" (which are inputs for all other sectors) *by energy/$ efficieny gains over the years, ie every other sector buys accordingly less energy SAM2('DISTEL',ICI)=SAM2('DISTEL',ICI)*ELEC_INTENSITY_FAC('%1') ; *Winnie Kam corrected on March 22, 2007 to include government spending SAM2('DISTEL',GTS)=SAM2('DISTEL',GTS)*ELEC_INTENSITY_FAC('%1') ; *2nd we scale the taxes according to the output growth SAM2(GT,'DISTEL')=SAM2(GT,'DISTEL')*ELEC_INTENSITY_FAC('%1') ; *3rd we balance with ROW exports, as CA will sell the extra capacities outside of the state SAM2('DISTEL','ROW')=sum(Z, SAM2(Z,'DISTEL'))-sum(Z_without_ROW, SAM2('DISTEL',Z_without_ROW)); **** Sector DSTGAS *1st we scale the "outputs" (which are inputs for all other sectors) *by energy/$ efficieny gains over the years, ie every other sector buys accordingly less energy SAM2('DSTGAS',ICI)=SAM2('DSTGAS',ICI)*GAS_INTENSITY_FAC('%1') ; *goverment spendings on Energy also decrease (these are very minor amounts) SAM2('DSTGAS',GTS)=SAM2('DSTGAS',GTS)*GAS_INTENSITY_FAC('%1') ; *2nd we scale the taxes according to the output growth SAM2(GT,'DSTGAS')=SAM2(GT,'DSTGAS')*GAS_INTENSITY_FAC('%1') ; *3rd we balance with ROW exports, as CA will sell the extra capacities outside of the state SAM2('DSTGAS','ROW')=sum(Z, SAM2(Z,'DSTGAS'))-sum(Z_without_ROW, SAM2('DSTGAS',Z_without_ROW)); **** Sector WHLGAS *1st we scale the "outputs" (which are inputs for all other sectors) *by energy/$ efficieny gains over the years, ie every other sector buys accordingly less energy SAM2('WHLGAS',ICI)=SAM2('WHLGAS',ICI)*FUEL_INTENSITY_FAC('%1') ; *goverment spendings on Energy also decrease (these are very minor amounts) SAM2('WHLGAS',GTS)=SAM2('WHLGAS',GTS)*FUEL_INTENSITY_FAC('%1') ; *2nd we scale the taxes according to the output growth SAM2(GT,'WHLGAS')=SAM2(GT,'WHLGAS')*FUEL_INTENSITY_FAC('%1') ; *3rd we balance with ROW exports, as CA will sell the extra capacities outside of the state SAM2('WHLGAS','ROW')=sum(Z, SAM2(Z,'WHLGAS'))-sum(Z_without_ROW, SAM2('WHLGAS',Z_without_ROW)); **** Sector RETGAS *1st we scale the "outputs" (which are inputs for all other sectors) *by energy/$ efficieny gains over the years, ie every other sector buys accordingly less energy SAM2('RETGAS',ICI)=SAM2('RETGAS',ICI)*FUEL_INTENSITY_FAC('%1') ; *goverment spendings on Energy also decrease (these are very minor amounts) SAM2('RETGAS',GTS)=SAM2('RETGAS',GTS)*FUEL_INTENSITY_FAC('%1') ; *2nd we scale the taxes according to the output growth SAM2(GT,'RETGAS')=SAM2(GT,'RETGAS')*FUEL_INTENSITY_FAC('%1') ; *3rd we balance with ROW exports, as CA will sell the extra capacities outside of the state SAM2('RETGAS','ROW')=sum(Z, SAM2(Z,'RETGAS'))-sum(Z_without_ROW, SAM2('RETGAS',Z_without_ROW)); *Recalculating the Investment column according to the CCM matrix and the adjusted inputs into capital -- the calculation is according to * the CCM0304 excel file where investment it calculated using the CCM the same way (see following description): *sectors spending on capital is equal to 11% return on total capital. Total capital depreciates at a rate of 5% and that amount has to be replaced *CCM gives us tells us the relative allocation of capital investment in different sectors *summing over each sector the amount invested in it (as input) by all other sectors CCCM(I,J)=CCM(I,J)*(0.05*SAM2('CAPIT',J)/0.11); SAM2(I,'INVES')=sum(J,CCCM(I,J)); *now we balance the investment row by its ROW imports, this is possible due to the enourmous inflows from ROW (!! I think there is *potentialy a general mistake in how the investment inputs in the row *are calculated, which is why we have such a relative large amount comming from ROW!!-wrote more in email) SAM2('INVES','ROW')=sum(Z,SAM2(Z,'INVES'))-sum(Z_without_ROW,SAM2('INVES',Z_without_ROW)); *balance goverement sectors given the row entries (taxes) we adjust the columns (spending) *1st balance Tax colums destributing differenence propotional to former value. SAM2(Z,GT)=SAM2(Z,GT)+SAM2(Z,GT)/sum(Z1, SAM2(Z1,GT))*(sum(Z1, SAM2(GT,Z1))-sum(Z1,SAM2(Z1,GT))); *2nd balance CGENF column given the inflow in rows SAM2(Z,'CGENF')=SAM2(Z,'CGENF')+SAM2(Z,'CGENF')/sum(Z1,SAM2(Z1,'CGENF'))*(sum(Z1,SAM2('CGENF',Z1))-sum(Z1,SAM2(Z1,'CGENF'))); *3rd balance all goverment spending to industries (columns) in accordance with the rows SAM2(I,GTS_NOWEL)=SAM2(I,GTS_NOWEL)+SAM2(I,GTS_NOWEL)/sum(J,SAM2(J,GTS_NOWEL))*(sum(Z,SAM2(GTS_NOWEL,Z))-sum(Z,SAM2(Z,GTS_NOWEL))) ; SAM2('HOUS0','LSWEL')=sum(Z,SAM2('LSWEL',Z)); *Adjusting Capital and Labor *allocating difference in capital expenditure from all sectors on HH income from Capital proportional to old income *I am not allocating any of the difference to (capital,ROW) SAM2(H,'CAPIT')=SAM2(H,'CAPIT')+SAM2(H,'CAPIT')/sum(H1,SAM2(H1,'CAPIT'))*(sum(Z,SAM2('CAPIT',Z))-sum(Z,SAM2(Z,'CAPIT'))); *allocating difference in labor expenditure from all sectors on HH income from labor and social security proportional to old allocations SAM2(HF,'LABOR')=SAM2(HF,'LABOR')+SAM2(HF,'LABOR')/sum(HF1,SAM2(HF1,'LABOR'))*(sum(Z,SAM2('LABOR',Z))-sum(Z,SAM2(Z,'LABOR'))); *we balance the commodity/HH and goverment sector iteratively as few time as they are interrelated to achive a balancing of all *row and columns for (iii=1 to 10 , *balancing the commoditiy sectors *1st we balance the HH columns according to the rows sum difference proportional to old numbers SAM2(Z,H)=SAM2(Z,H)+SAM2(Z,H)/sum(Z1,SAM2(Z1,H))*(sum(Z1,SAM2(H,Z1))-sum(Z1,SAM2(Z1,H))); *2nd we balance the industry sales to commodities based on HH spendings SAM2(I,C)=SAM2(I,C)+SAM2(I,C)/sum(I1,SAM2(I1,C))*(sum(H,SAM2(C,H))-sum(I1,SAM2(I1,C))); *balance goverement sectors given the row entries (taxes) we adjust the columns (spending) *1st balance Tax colums destributing differenence propotional to former value. SAM2(Z,GT)=SAM2(Z,GT)+SAM2(Z,GT)/sum(Z1, SAM2(Z1,GT))*(sum(Z1, SAM2(GT,Z1))-sum(Z1,SAM2(Z1,GT))); *2nd balance CGENF column given the inflow in rows SAM2(Z,'CGENF')=SAM2(Z,'CGENF')+SAM2(Z,'CGENF')/sum(Z1,SAM2(Z1,'CGENF'))*(sum(Z1,SAM2('CGENF',Z1))-sum(Z1,SAM2(Z1,'CGENF'))); *3rd balance all goverment spending to industries (columns) in accordance with the rows SAM2(I,GTS_NOWEL)=SAM2(I,GTS_NOWEL)+SAM2(I,GTS_NOWEL)/sum(J,SAM2(J,GTS_NOWEL))*(sum(Z,SAM2(GTS_NOWEL,Z))-sum(Z,SAM2(Z,GTS_NOWEL))) ; SAM2('HOUS0','LSWEL')=sum(Z,SAM2('LSWEL',Z)); ); *LAST we balance all other then the special industry sectors by compensating the less demand form the special sectors with sales to the ROW SAM2(I,'ROW')= sum(Z, SAM2(Z,I))-sum(Z_without_ROW1, SAM2(I,Z_without_ROW1)); SAM2('INVES','ROW')=sum(Z,SAM2(Z,'INVES'))-sum(Z_without_ROW,SAM2('INVES',Z_without_ROW)); *Bill Dean, December 21, 2006, added to make exports non-negative SAM2('ROW',Z)$(SAM2(Z,'ROW') LT 0.0) = SAM2('ROW',Z) - SAM2(Z,'ROW'); SAM2(Z,'ROW')$(SAM2(Z,'ROW') LT 0.0) = 0.0; *Bill Dean, January 24, 2007, added to convert from 2003 dollars to another year dollar SAM2(Z,Z1) = INPUT_CPI_FAC('%2') * SAM2(Z,Z1); * to check for negativity of any adjusted ROW numbers and to have a look at the inflation in the amount of products just passing through *chekc=SAM2('ROW','OILGAS'); *display chekc; *test to look at specific entry *chekc=SAM2('INDGAS','ROW'); *display chekc; *check if ballance ROW as well after this: ROW_CHECK1=SUM(Z, SAM2(Z,'ROW') ); ROW_CHECK2=SUM(Z, SAM2('ROW',Z) ); display ROW_CHECK1 ROW_CHECK2; *row minus column or output minus input to check balanced sam Q(Z) = SUM(Z1,SAM2(Z,Z1))-sum(Z1,SAM2(Z1,Z)); display Q,SAM2, SAM; * the following writes the SAM2 as it will go into the GAMS program to an (existing) ecxel at the given path *$LIBInclude Xldump SAM2 "C:\Documents and Settings\steinha\My Documents\Berkeley\PETER\California_SAMs\All_you_need_SAM_Dec06\SAM2" sam2 ; *Changes to the MISC data red in * now we are going to make the forecast horizon specific adjustments to the Jobs and HH figures MISC2(Z,MISCMatrix)=MISC(Z,MISCMatrix); MISC2(Z,'JOBS')=MISC(Z,'JOBS')*WPOP_GROWTH_FAC('%1'); *and the special sectors which will grow less based on the Income growth/pop growth productivity gains MISC2('OILREF','JOBS')=MISC('OILREF','JOBS')*(WPOP_GROWTH_FAC('%1')/INC_GROWTH_FAC('%1'))*REF_GROWTH_FAC('%1'); MISC2('INDGAS','JOBS')=MISC('INDGAS','JOBS')*(WPOP_GROWTH_FAC('%1')/INC_GROWTH_FAC('%1'))*REF_GROWTH_FAC('%1'); MISC2('OILGAS','JOBS')=MISC('OILGAS','JOBS')*(WPOP_GROWTH_FAC('%1')/INC_GROWTH_FAC('%1'))*EXTRACT_GROWTH_FAC('%1'); *further we assume no change in wealth distribution and the adjustment of the tax brackets and *therefore just scale HH and HW with the population growth MISCH2(H,HouseMatrix)=MISCH(H,HouseMatrix); MISCH2(H,'HH0')=MISCH(H,'HH0')*POP_GROWTH_FAC('%1'); MISCH2(H,'HW0')=MISCH(H,'HW0')*WPOP_GROWTH_FAC('%1'); display MISCH2 MISC2; *since the rest of the program is written using SAM, MISC and MISCH we redefine the twos as such SAM(Z,Z1)=SAM2(Z,Z1); MISC(Z,MISCMatrix)=MISC2(Z,MISCMatrix); MISCH(H,HouseMatrix)=MISCH2(H,HouseMatrix); *Bill Dean, February 23, 2007, added to report back to the main GAMS file. FORECAST_YEAR = %1; CPI_YEAR = %2; ***** *END Forecast section August 2006 Ralf