Skip to content

Commit

Permalink
Adjust prep to manage minimum efficiency flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlangevin committed Jan 15, 2025
1 parent 864882c commit 914788d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions scout/ecm_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,19 +2303,19 @@ def __init__(
self.market_exit_year) > (int(
self.handyvars.aeo_years[-1]) + 1)):
self.market_exit_year = int(self.handyvars.aeo_years[-1]) + 1
# Check for flag that measure should be removed from market under
# user-specified increased in global minimum performance floor
# Check for flag that measure is of a minimum efficiency level. Such measures will be
# removed from market under user-specified increased in global minimum performance floor
try:
self.global_exit_flag
self.min_eff_elec_flag
except AttributeError:
self.global_exit_flag = None
self.min_eff_elec_flag = None
# If a global year by which an elevated performance floor is
# implemented has been imposed by the user and the measure is flagged
# for removal under the global minimum floor, or the measure has been
# added as a reference case copy of existing measures in the analysis,
# for removal under an increase in the global minimum efficiency floor, or the measure has
# been added as a reference case copy of existing measures in the analysis,
# remove measure from the market once elevated floor goes into effect
if self.usr_opts["floor_start"] is not None and (
self.global_exit_flag or (
self.min_eff_elec_flag is not None or (
self.usr_opts["add_typ_eff"] is not False and
any([x in self.name for x in ["Ref. Case", "Min. Eff."]]))):
self.market_exit_year = self.usr_opts["floor_start"]
Expand Down
4 changes: 2 additions & 2 deletions tests/ecm_prep_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -128354,12 +128354,12 @@ def setUpClass(cls):
"name", "remove", "retro_rate", 'tech_switch_to', 'technology',
'end_use', 'technology_type', "htcl_tech_link",
'yrs_on_mkt', 'measure_type', 'usr_opts', 'fuel_switch_to',
'hp_convert_flag', 'add_cool_anchor_tech', 'global_exit_flag'],
'hp_convert_flag', 'add_cool_anchor_tech', 'min_eff_elec_flag'],
["market_entry_year", "market_exit_year", "markets",
"name", "remove", "retro_rate", 'tech_switch_to', 'technology',
'end_use', 'technology_type', "htcl_tech_link",
'yrs_on_mkt', 'measure_type', 'usr_opts', 'fuel_switch_to',
'hp_convert_flag', 'add_cool_anchor_tech', 'global_exit_flag'],
'hp_convert_flag', 'add_cool_anchor_tech', 'min_eff_elec_flag'],
['benefits', 'bldg_type', 'climate_zone', 'end_use', 'fuel_type',
'tech_switch_to', "htcl_tech_link", "technology",
"technology_type", "market_entry_year", "market_exit_year",
Expand Down

0 comments on commit 914788d

Please sign in to comment.