Forwarded by Keith Barnett/RTP/USEPA/US on 08/06/2010 08:59 PM

From: Keith Barnett/RTP/USEPA/US

To: Cortney_Higgins@omb.eop.gov

Date: 07/29/2010 02:37 PM

Subject: Fw: Emailing: cementgams.txt

Courtney

‐ here are two items you requested. I need to at some information to

the idling kilns and then I'll sent that on.

Keith W. Barnett

USEPA/OAQPS/SPPD/MMG

Mail Code D243

‐ 02

Research Triangle Park, NC 27711

919

‐ 541

‐ 5605

barnett.keith@epa.gov

‐ Forwarded by Keith Barnett/RTP/USEPA/US on 07/29/2010 02:35 PM

‐‐‐‐‐

From: Tom Walton/RTP/USEPA/US

To: Keith Barnett/RTP/USEPA/US@EPA

Cc: Ron Evans/RTP/USEPA/US@EPA

Date: 07/29/2010 09:50 AM

Subject: Fw: Emailing: cementgams.txt

Keith,

From the OMB call yesterday, I took away three tasks.

Idling kiln info

‐ sent list to you this morning for you to

supplement compliance cost, parent company, year built, location, and

parent company

provide Gams code

provide a one market example

Attached are the GAMS code and a spreadsheet example.

Please either forward to OMB or direct me as to whom I should send it.

Tom Walton

Economist, Air Benefit & Cost Group

HEID/OAQPS/OAR/EPA

Mail Drop C

‐ 339

‐ 01

919

‐ 541

‐ 5311

919

‐ 541

‐ 0839 fax‐‐ ‐‐‐ Forwarded by Tom Walton/RTP/USEPA/US on 07/29/2010 09:42 AM

‐‐‐‐‐

From: "Depro, Brooks M." <bmd@rti.org>

To: Tom Walton/RTP/USEPA/US@EPA

Date: 07/28/2010 10:56 PM

Subject: Emailing: cementgams.txt

<<ceme ntgams.txt>>

the code for the model saved as a text file. Please let me know if you

ed anything else.

sample worksheet of a single market that uses matrix

gebra to solve for the solution. This may be more informative than the gams

ooks

tached file: atlanta_cement_example.xls)(See attached file:

.txt) Tom,

Here is

ne

I also attached a rough

al

code. Different people think of the problem in different ways.

Best,

Br

(See at

cementgams

### $ontext

U.S. PORTLAND CEMENT MARKET 2005

ECONOMIC MODEL MODEL

EPA Work Assignment 3

‐ 74

Last Updated June 17, 2010

$offtext

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%

* BASELINE MARKET DATA

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%

set market Markets

/Atlanta,BaltimorePhiladelphia,Birmingham,Chicago,Cincinnati,

Dallas,Denver,Detroit,Florida,KansasCity ,LosAngeles,Minneapolis,NewYorkBoston,

Phoenix,Pittsburgh,StLouis,SaltLakeCi ty,SanAntonio,SanFrancisco,Seattle/

datatype2 I /price, quantity, imports/;

parameter

P0(market) baseline price

domestic0(market) baseline domestic production

### imports0(market) baseline cement imports

c0(market) consumption;

scalar

DemandElasticity market demand elasticity

importElasticity import supply elasticity

regid regulatory program indicator 1=0n 0=off;

*This comes from the original portland cement study

DemandElasticity

= ‐ 0.88;

*See Broda, Limao, and Wienstein 2008, 34

ImportElasticity =1/0.41;

regid=0;

parameter MarketData(market,datatype2)'cement market data';

$LIBInclude Xlimport MarketData CementData.xls marketdata

P0(market)

= MarketData(market,'price');

*converts million metric tons to 1000 metric tons

domestic0(market)=MarketData(market,'quantity')*1000;

### imports0(market)=MarketData(market,'imports')*1000;

c0(market) =(domestic0(market)+imports0(market));

display MarketData;

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%

* BASELINE KILN DATA

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%

set kiln Kilns per plant /1*8/

plant Plants per market /1*9/

datatype1 Input variables for kilns /AVC,production,capacity,AVCC,employees,SB/

datatype3 output variables

/capacity,production0,revenue0,varcosts0 ,fixedcosts,profits0,employees0,EBIT0,

production1,revenue1,varcosts1,compliancecosts0,compliancecosts1,profits1,EBIT1,

close,employees1,SB,EBITLOSS,EBITGAIN/;

parameter

KilnData(market,plant,kiln,datatype1) cement kiln data by market

kiln_results(market,pl ant,kiln,datatype3) cement results by kiln

plant_results(market ,plant,datatype3) cement results by plant

AVC(market,plant,kiln) kiln average variable production costs $per

metric ton

CAP(market,plant) plant capacity metric tons per year

AVCC(market,plant,kiln) variable regulatory compliance costs $ per

metric ton

q0(market,plant) baseline plant production

### margKilnC(market,plant) highest cost kiln with regulation $ per metric

ton

margKilnQ0(market,plant,kiln) highest cost kiln with regulation's baseline Q

dqi_margKiln(market,plant,kiln) highest cost kiln with regulation's change in Q

q1Kiln(market,plant,kiln) with regulation kiln quanties

c(market,plant) plant supply shift

c1(market) market supply shift

kflag(market,plant,kiln) kiln close flag

pflag(market,plant) plant close flag

mkflag(market,plant,kiln) marginal kiln flag

fxcosts(market,plant) estimated fixed costs

check

diff(market,plant,kiln)

q0f(market,plant) plants binary flag;

pflag(market,plant)=0;

**Read in kiln data from spreadsheet

$LIBInclude Xlimport KilnData CementData.xls kiln

display KilnData;

*Capacity constraint for plant

CAP(market,plant)=sum(kiln,KilnData (market,plant,k iln,'capacity'));

*Cement Production for plant

q0(market,plant)= sum(kiln,KilnData(market,pl ant,kiln,'production'));

### q0f(market,plant)$q0(market,plant)=1;

*baseline variable costs $/metric ton

AVC(market,plant,kiln)=KilnDa ta(market,plant,kiln,'AVC');

*estimates plant

‐ level fixed costs (assumes median profit margin reported by PCA)

fxcosts(market,plant)=max(

((1

‐ 0.157)*sum(kiln,Kilndata( market,plant,kiln,'production')*P0(market)))

‐

sum(kiln,KilnData(market,plant,kiln,'produc tion')*KilnData(market,plant,kiln,'AVC')),

0);

*Regulatory Program Total Annualized Costs $/metric ton

AVCC(market,plant,kiln)=KilnData(market,plant,kiln,'AVCC');

*Compute Plant Supply Shift

c(market,plant)

= smax(kiln,(AVC(market,plant,kiln)+AVCC(market,plant,kiln)))

‐

smax(kiln,AVC(market,plant,kiln));

display c;

*identifies highest cost kiln with regulation

margkilnC(market,plant)= smax(kiln,(AVC(market,plant,k iln)+AVCC(market,plant,kiln)));

mkflag(market,plant,kiln)$((AVC(market, plant,kiln)+AVCC(market,plant,kiln))= margkilnC(market,plant)

and q0(market,plant))=1;

*populates table that lists the baseline production level for the marginal kiln

### margkilnQ0(market,plant,kiln)=

mkflag(market,plant,kiln)*KilnData(market,plant,kiln,'production');

option margkilnQ0: 0:1:2, mkflag: 0:1:2;

display margkilnQ0, mkflag;

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%

* PARTIAL EQUILIBRIUM MODEL

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

variables

dqi(market,plant) change in plant production

dqImp(market) change in imports

dQ(market) change in market quantity

dP(market) change in market price;

equations

domestic_supply(market,plant) first order condition for each plant (Eq 5b)

import_supply(market) import supply (Eq 6)

market_supply(market) market supply (Eq 7)

market_demand(market) market_demand (Eq 8);

domestic_supply(market,pla nt)$(q0(market,plant))..

### c(market,plant)*regid=e=

dP(market)*(1+(q0(market,plant)/(domestic0(m arket)+imports0(market )))/DemandElasticity)+

P0(market)/DemandElasticity*dqi(market,plant)/(domestic0(market)+imports0(market))

‐

P0(market)/DemandElasticity*dQ(m arket)*(q0(market,plant)/(domestic0(market)+imports0(market))**

2);

import_supply(market)..

dqImp(market) =e= ImportElasticity*dP(market)*imports0(market)/P0(market);

market_supply(market)..

* dQ(market) =e= sum(plant,(dqi(market,plant)$q0(market,plant)))

‐

sum(plant,(pflag(market,plant)*q 0(market,plant)))+dqimp(market);

dQ(market) =e= sum(plant,(dqi(market,plant)$q0( market,plant)))+dqImp(market);

market_demand(market)..

dQ(market) =e= DemandElasticity*dP(market)*(domestic0( market)+imports0(market))/P0(market);

*BASELINE MODEL

Model pecement/All/;

Option cns = path;

### Solve pecement using cns;

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%

* COUNTERFACTUAL SIMULATION

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%

*turn "on" control cost flag

regid=1;

*impose plant capacity constraint

dqi.up(market,plant)

= (CAP(market,plant)*1.08*0.95

‐ q0(market,plant));

*impose kiln output reduction constraint on marginal kiln

dqi.lo(market,plant)

= ‐ smax(kiln,margkilnQ0(market,plant,kiln));

Option cns = path;

Solve pecement using cns;plantconstraint11217499112111211121marketplantkilnAVCproductionkproductionpSicapacitykcapacitypAVCCWRdMCAtlanta21$38.0977877810%791 791$1.05 $39.14 $1.05Atlanta31$47.726386388%723 723$1.17 $48.89 $1.17Atlanta41$44.68 1,0141,01413%1,149 1,149$4.67 $49.35 $4.67Atlanta51$56.661224836%168 665$0.00 $56.66 $0.00Atlanta52$56.22 116160$0.00 $56.22 $0.00Atlanta53$55.80 122168$0.00 $55.80 $0.00Atlanta54$54.63 122168$0.00 $54.63 $0.00Atlanta61$42.667247249%997 997$5.92 $48.57 $5.92Atlanta71$41.47 1,3851,38517%1,908 1,908$0.00 $41.47 $0.00Atlanta81$45.376736738%684 684$4.99 $50.36 $4.99Max:$56.665,6956,918$56.66MarketInfomarketprice$81.31marketquantitybase7,965lineimportquantity2,270demandelasticity‐0.88importsupplyelastic2.4ity123456789 10 11AMATRIXsolution q0 q1 max+dq max‐dqdPdq2dq3dq4dq5dq6dq7dq8 dROWdQcvectordP2.60$1dq20.89‐0.0116000000 00.001113.03dq213 77879113‐7782dq30.910‐0.011600000 00.00091.17dq384 63872285‐6383dq40.8600‐0.01160000 00.00154.67dq4‐241 1,014773135‐10144dq50.93000‐0.011600000.0007182.28dq5182 483665182‐1225dq60.900000‐0.01160000.00115.92dq6‐330 724394273‐7246dq70.8000000‐0.0116000.00200.00dq7140 1,3851,525523‐13857dq80.9000000‐0.0116 00.00104.99dq8‐247 67342611‐6738dROW68.0890000000‐100dROW176d d9emaneq‐86.1950000000 0‐1d d0emaneq‐22310supplyeq0‐1‐1‐1‐1‐1‐1‐1‐110AMATRIX(CELLREFERENCE)dq20.89‐0.010.000.000.000.000.000.00 0.000.00$1.05dq30.910.00‐0.010.000.000.000.000.00 0.000.00$1.17dq40.860.000.00‐0.010.000.000.000.00 0.000.00$4.67dq50.930.000.000.00‐0.010.000.000.00 0.000.00$0.00dq60.900.000.000.000.00‐0.010.000.00 0.000.00$5.92dq70.800.000.000.000.000.00‐0.010.00 0.000.00$0.00dq80.900.000.000.000.000.000.00‐0.01 0.000.00$4.99dROW68.090.000.000.000.000.000.000.00‐1.00 0.00demandeq‐86.200.000.000.000.000.000.000.00 0.00‐1.00supplyeq0.00‐1.00‐1.00‐1.00‐1.00‐1.00‐1.00‐1.00‐1.00 1.00AMATRIX(VALUES)dq20.001.000.000.000.000.000.000.00 0.00 0.00dq30.910.00‐0.010.000.000.000.000.00 0.00 0.00dq40.860.000.00‐0.010.000.000.000.00 0.00 0.00dq50.000.000.000.001.000.000.000.00 0.00 0.00dq60.900.000.000.000.00‐0.010.000.00 0.00 0.00dq70.800.000.000.000.000.00‐0.010.00 0.00 0.00dq80.900.000.000.000.000.000.00‐0.01 0.00 0.00dROW68.090.000.000.000.000.000.000.00‐1.00 0.00demandeq‐86.200.000.000.000.000.000.000.00 0.00‐1.00supplyeq0.00‐1.00‐1.00‐1.00‐1.00‐1.00‐1.00‐1.00‐1.00 1.00AMATRIX^‐1)0.000.180.180.000.180.180.180.00 0.00 0.001.000.000.000.000.000.000.000.00 0.00 0.00‐0.15‐73.4412.76‐0.1512.7612.7612.760.15‐0.15‐0.150 1‐.31121.7499‐.0 1‐.31121.1121.1121.0 10 10 1.3‐.8‐.30.000.000.001.000.000.000.000.00 0.00 0.00‐0.1412.4012.40‐0.14‐73.8012.4012.400.14‐0.15‐0.14‐0.119.679.67‐0.119.67‐76.539.670.11‐0.22‐0.11‐0.1512.6112.61‐0.1512.6112.61‐73.590.15‐0.15‐0.15‐0.1412.1612.16‐0.1412.1612.1612.16‐0.86‐0.06‐0.140.18‐15.39‐15.390.18‐15.39‐15.39‐15.39‐0.18‐0.92 0.18SC104SCAtlanta525611617339156marketplantkilnAVCproductioncapacityAVCCAtlanta21$38778771$1.05791.046Atlanta31$48638705$1.17Atlanta41$4510141120$4.67Atlanta51$57122164$0.00Atlanta52$56116156$0.00Atlanta53$56122164$0.00Atlanta54$55122164$0.00Atlanta61$43724972$5.92Atlanta71$4113851860$0.00Atlanta81$45673667$4.99marketplantkilnAVCproductioncapacityAVCCGA201GAAtlanta2138.087038778.015377711.052077SC101SCAtlanta3147.719178638.157017051.172619SC102SCAtlanta4144.675171013.809711204.674658SC103SCAtlanta5156.655088122.131164SC104SCAtlanta5256.222252.222252116.17339156SC201SCAtlanta5355.804157122.131164SC401SCAtlanta5454.63338122.131164TN101TNAtlanta6142.655466723.849619725.916908TN201TNAtlanta7141.4704491385.14431860VA101VAAtlanta8145.371596673.069076674.990315