trynthink / scout

A tool for estimating the future energy use, carbon emissions, and capital and operating cost impacts of energy efficiency and demand flexibility technologies in the U.S. residential and commercial building sectors.
https://scout.energy.gov
Other
61 stars 23 forks source link

ValueError: Cost units of '2017$/kBtu/h heating' are incompatible with definition of measure 'Commercial Electric WH, 90.1 c. 2019'; check definition #270

Closed dewittpe closed 2 years ago

dewittpe commented 2 years ago

This behavior is on the master branch....

python ecm_prep.py

Runs to completion as expected on commit 1e84548.

On the next commit, 1dea735, there is an error

[~/NREL/scout] ((1dea735...))
$ python ecm_prep.py     

Importing supporting data...Complete
Initializing measures...Complete
Updating ECM 'Prospective Commercial CCHP'...Success
Updating ECM 'Com. Air Sealing (Exist), 90.1 c. 2019'...Success (cost units converted)
Updating ECM 'ENERGY STAR Gas Furnace v. 4.1'...Success (cost units converted)
Updating ECM 'Prospective Commercial Adv Refrigerator'...Success (cost units converted)
Updating ECM 'Prospective Residential HP Dryer'...Success
Updating ECM 'Best Commercial Electric HPWH (FS)'...Success
Updating ECM 'Residential Walls, IECC c. 2021'...Success (cost units converted)
Updating ECM 'Prospective Commercial NVC HVAC'...Success
Updating ECM 'Prospective Commercial Air Seal (Exist)'...Success (cost units converted)
Updating ECM 'Commercial Electric WH, 90.1 c. 2019'...Traceback (most recent call last):
  File "/Users/peterdewitt/NREL/scout/ecm_prep.py", line 12445, in <module>
    main(base_dir)
  File "/Users/peterdewitt/NREL/scout/ecm_prep.py", line 12203, in main
    meas_prepped_objs = prepare_measures(
  File "/Users/peterdewitt/NREL/scout/ecm_prep.py", line 10966, in prepare_measures
    [m.fill_mkts(
  File "/Users/peterdewitt/NREL/scout/ecm_prep.py", line 10966, in <listcomp>
    [m.fill_mkts(
  File "/Users/peterdewitt/NREL/scout/ecm_prep.py", line 4111, in fill_mkts
    raise ValueError(
ValueError: Cost units of '2017$/kBtu/h heating' are incompatible with definition of measure 'Commercial Electric WH, 90.1 c. 2019'; check definition

To reproduce this error do the flowing

git checkout 1e84548
touch ecm_definitions/* # to force ecm_prep.py to ran on all the ecms
python ecm_prep.py # this should run to completion without error
git checkout 1dea735
touch ecm_definitions/* # if you do not touch the ecm definition(s) the error will not reproduced
python ecm_prep.py # should error
jtlangevin commented 2 years ago

@dewittpe it appears that measure is posted with the wrong cost units; the units should be in 'kBtu/h water heating' not 'heating'. That should fix the error.

dewittpe commented 2 years ago

I'm going to submit a PR to fix this very soon. In the mean time I'm going to record additional, similar, issues that I found will testing the aforementioned fix.

dewittpe commented 2 years ago

After changing the cost_units for Comercial Electric WH, 90.1 c. 2019 the following value error is thrown

ValueError: Cost units of '2017$/kBtu/h heating' are incompatible with definition of measure 'Commercial Oil WH, 90.1 c. 2019'; check definition
dewittpe commented 2 years ago

Another one:

ValueError: Cost units of '2017$/kBtu/h heating' are incompatible with definition of measure 'Commercial Elec. WH, 90.1 c. 2019 (FS)'; check definition
dewittpe commented 2 years ago

and then there is:

ValueError: Cost units of '2013$/kBtu/h heating' are incompatible with definition of measure 'Prospective Commercial NG Sorption HPWH'; check definition
dewittpe commented 2 years ago

And then:

ValueError: Cost units of '2017$/kBtu/h heating' are incompatible with definition of measure 'Best Commercial Oil WH'; check definition