EnergyInnovation / eps-us

Energy Policy Simulator - United States
GNU General Public License v3.0
22 stars 7 forks source link

Bug fix for Change in Total Pollutant Emissions by Sector Excluding Imported Electricity Emissions variable #193

Closed mkmahajan closed 2 years ago

mkmahajan commented 2 years ago

Olivia helped find a bug that was leading to avoided deaths in the BAU case in the Oregon EPS. This issue had not shown up in the US 3.3 outputs, since the US does not include emissions from imported electricity in its emissions totals. I changed the variable Change in Total Pollutant Emissions by Sector Excluding Imported Electricity Emissions to be calculated as:

(Total Pollutant Emissions by Sector[electricity sector,Pollutant]
- SUM(Absolute Change in In Scope Emissions due to Electricity Imports[Pollutant,Electricity Source!]))
- (BAU Total Pollutant Emissions by Sector[electricity sector,Pollutant]
- SUM(BAU Absolute Change in In Scope Emissions due to Electricity Imports[Pollutant,Electricity Source!]))

Before, the variable had only accounted for the Absolute Change in In Scope Emissions but hadn't included the BAU version of this variable, which was leading to avoided deaths in the BAU case.

I made this edit for the .mdl and .vpmx files on the develop branch. But @jrissman, let me know if you'd like to take a look to verify the change looks good. Otherwise I will close this issue.

jrissman commented 2 years ago

I verified this fix. Thanks for finding and fixing this bug. I adjusted the whitespace for clarity in reading the equation and added it to the Version History doc. Closing this issue.