Skip to content
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

Fix ASHP min allowable size enforcement #449

Merged
merged 5 commits into from
Oct 12, 2024
Merged

Conversation

zolanaj
Copy link
Collaborator

@zolanaj zolanaj commented Oct 11, 2024

Addresses #448

@zolanaj zolanaj requested a review from Bill-Becker October 11, 2024 19:20
@Bill-Becker
Copy link
Collaborator

Hey Alex, this is more of a question from the original PR than this fix, but it looks like there's a couple of places where we have default values hard-coded in various places which seem redundant to defaults which are either stored in the ashp_defaults.json file or in other locations in /core/ashp.jl:

This peak_load_thermal_factor looks like it's meant to be the same value as the min_allowable_peak_capacity_fraction:

peak_load_thermal_factor::Real = 0.5

And this default for the value of back_up_temp_threshold_degF for this function:

back_up_temp_threshold_degF = 10.0

Not a big deal, but ideally we would only have to make changes to the default values in one place in the future. If you want to punt on updating for now, maybe we could at least make a comment for the first time these parameters are assigned the default value that if the default changes, you also need to update in these other locations.

Copy link
Collaborator

@Bill-Becker Bill-Becker left a comment

Choose a reason for hiding this comment

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

Approved with a suggestion about linking defaults for a couple of parameters.

@zolanaj
Copy link
Collaborator Author

zolanaj commented Oct 11, 2024

Hey Alex, this is more of a question from the original PR than this fix, but it looks like there's a couple of places where we have default values hard-coded in various places which seem redundant to defaults which are either stored in the ashp_defaults.json file or in other locations in /core/ashp.jl:

This peak_load_thermal_factor looks like it's meant to be the same value as the min_allowable_peak_capacity_fraction:

peak_load_thermal_factor::Real = 0.5

And this default for the value of back_up_temp_threshold_degF for this function:

back_up_temp_threshold_degF = 10.0

Not a big deal, but ideally we would only have to make changes to the default values in one place in the future. If you want to punt on updating for now, maybe we could at least make a comment for the first time these parameters are assigned the default value that if the default changes, you also need to update in these other locations.

Thanks @Bill-Becker! I agree, we should not have these defaults in place within the function definition - they should be in one place. I've pushed an update that should remove then and a fix to some tests that were previously incomplete. Neither function exports to the API so it shouldn't be a breaking change. I'll merge once I've confirmed tests pass.

@zolanaj zolanaj merged commit bac9593 into develop Oct 12, 2024
2 checks passed
@zolanaj zolanaj deleted the fix-ashp-min-allowable-size branch October 12, 2024 02:10
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.

2 participants