Skip to content

Conversation

@jtlangevin
Copy link
Collaborator

- Ensure that shares of homes requiring a panel upgrade are actually assessed when that option is provided.
- Remove any dependencies of cost data pre-incentives on subsequent incentive calculations.
- Handle primary/secondary keys for fuel type when pulling in panel upgrade shares data.
- Ensure that linked cooling equipment costs are properly assigned when processing a panel upgrade subsegment/technology name.
The unit test ensures that settings for panel upgrade share calculations are correctly read in and translated through the fill_mkts function to the measure's output data.
@jtlangevin jtlangevin requested review from jmythms and rHorsey January 15, 2026 15:25
@jtlangevin jtlangevin linked an issue Jan 15, 2026 that may be closed by this pull request
@jtlangevin jtlangevin requested review from yingli-NREL and removed request for jmythms January 22, 2026 17:46
and (self.technology_type == "demand" or (
self.technology_type != "demand" and not all([(
(x in y) or ("all" in y)) for x, y in zip([
"heating", "single family home", "existing"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are only heating upgrade technologies considered when allocating panel upgrade cost shares? Secondary heating, cooling, water heating, cooking, and drying may also trigger the need for a panel upgrade. In Line 4076 , secondary heating and cooling are already included in the panel upgrade determination. I suggest including secondary heating, cooling, water heating, cooking, and drying for there and Line 4076 at this stage. As future work, we can determine the relative contribution of each technology to the need for a panel upgrade. ResStock can now directly predict whether a home requires a panel upgrade, and this capability can be leveraged here.

user_master_mseg
)

def test_elec_upgrade_costs(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A general comments for the test. Add clearer documentation of expected cost calculations at the beginning of the code funtion. For example,
Expected costs breakdown:
Base ASHP cost: $14,000
Panel replacement cost: $1,500
Panel management cost: $500
Scenario 1 (ignore): $14,000 (no panel cost)
Scenario 2 (all): $14,000 + $1,500 = $15,500
Scenario 3 (shares): $14,000 + (0.8 * $1,500 + 0.1 * $500) = $14,000 + $1,250
I think the unit tests should focus on verifying the core functionality of the code. For example, ensuring that panel upgrade costs are correctly added or excluded, base equipment costs remain unchanged. If we want to use specific data as test inputs, I suggest storing that data in a separate data file (e.g., a pickle file). We can discuss the overall testing structure further, as this is also related to the ongoing ecm_prep_test refactor work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues with electrical panel upgrade cost assignment Previous PR comment loose ends Unit test for panel upgrade cost adjustment

3 participants