-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculation and documentation fixes and enhancements #420
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trynthink
force-pushed
the
calc-tw2
branch
3 times, most recently
from
September 25, 2024 22:55
574e27d
to
ebfbb03
Compare
aspeake
reviewed
Sep 26, 2024
Remove secondary heating and wood stoves from being subject to exogenous switching rates, as they were not intended to be covered by these rates. Allow users to set ‘tech_switch_to’ to the value ‘same’ and have the code calculate a switchover to the same technology under exogenous switching rates. This is sometimes necessary for accounting purposes – for example, if exogenous rates are represented and a baseline segment is included that is subject to those rates, but without a complementary measure in the analysis to switch that baseline segment to, the results will show a decline in that baseline segment without a complementary increase in a switched to segment, thus under-representing that baseline segment’s influence on the total results. Add ASHP to technology list where zero costs are expected (in EIA new construction data ASHP costs are zero for cooling, all costs are in the heating end use). Remove water services as a distinct technology type as it appears to be counted already under “unspecified” (see issue #394). Refactor calculation of hourly TSV load adjustment factors to ensure that each end use in the tsv_load.gz data will be leveraged (previous approach had resulted in skipping some edge case end uses in those data like clothes washing, pool pumps and pool heaters that are under ‘other’ in the Scout data). Ensure that once cumulative measure-captured or cumulative competed stock fractions reach 1 in a given modeling year, these fractions are not updated in any subsequent years of the modeling time horizon. Improve warning message for units conversion issues. Add measure JSON check to ensure that measures that are set to fuel switch to electricity apply to non-electric fuels in the baseline. Suppress check for 'other' and 'unspecified' building type input breakouts when these categories are also present in measure end uses (prioritize correct end use input breakouts, which are more commonly used).
Measures that apply to both heating and cooling equipment microsegments will now see stock turnover and (where applicable) exogenous HP switching rates linked across those microsegments. The linked calculations are anchored on a single end use and technology from the measure’s applicable market. The default end use anchor is set to heating (in UsefulVars), while the anchor technology is determined uniquely for each measure by comparing the technologies in the measure’s 'technology' attribute to a candidate list of anchor technologies for each building type (residential or commercial) and end use; the list order sets the priority for which anchor technology is used when the measure applies to multiple candidate technologies in the list. In ecm_prep.py, for measures with linked stock turnover dynamics for cooling with heating microsegments (e.g., HPs), competed cooling stock are ultimately set to zero to avoid double counting across the heating and cooling microsegments; therefore, use of those competed cooling stock data in run.py would make it appear as though there was no cooling stock turnover at all to drive the competition of cooling segments. Modifications to run.py ensure that, for those measures, competed heating (or other linked mseg) stock data that are not set to zero in ecm_prep.py are used. To ensure the anchor end use and technology are always updated first in the preparation routine, given the dependence of linked microsegments on these updates, the iterable list of microsegments to update for each measure is reordered in fill_mkts so that microsegments that include the anchor end use and technology come first. The rank order of heating/cooling technologies to choose as anchors for such within-measure linkages when multiple such technologies are present in the measure definition is harmonized across ecm_prep and run. A slight adjustment to run.py was needed to handle a new string that is now added to the measure competition information to signify the specific heating/cooling linkages that the measure represents, if any (see use of variable “tch_apnd”). Add reporting of efficient stock that remains with baseline technology when applicable (previously only reported measure stock under the efficient key). Ensure that a measure's baseline and efficient market microsegment breakouts are always adjusted to reflect measure competition when breakout values are not None or zero across all years.
trynthink
force-pushed
the
calc-tw3
branch
2 times, most recently
from
October 17, 2024 06:34
65a4ef9
to
9340cca
Compare
Generalize approach to linking stock turnover across paired heating/cooling microsegments to any other microsegments that are included in the same measure (e.g., for commercial measures, sometimes ventilation will be paired). Do the same for cases where measure heating/cooling is constrained to certain market sub-segments (e.g., assume that when heating/cooling is scaled via mkt_scaling_fractions to match a certain equipment subset of the AEO classes, associated ventilation or other microsegments included in the measure will be scaled to represent the same subset and should only be competed with other measures that have the same scaling constraint).
aspeake
approved these changes
Oct 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, latest results appear to have been correctly brought in from the bug fix in #424 and the next set of results should not change from removal of the unit test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Incorporate changes from
and address issue #383.