-
Notifications
You must be signed in to change notification settings - Fork 0
Naveen/zone profile gen #34
base: bldg_elec
Are you sure you want to change the base?
Conversation
np.array( | ||
[ | ||
[ | ||
load_temp_hr_heat["hourly_dark_frac"][j], | ||
] | ||
for j in range(len(load_temp_hr_heat)) | ||
] | ||
), |
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.
It seems like what we're doing here is creating a Nx1 array from the data in load_temp_hr_heat["hourly_dark_frac"]
, yeah? If so, I think we might be able to do it more simply via something like np.expand_dims(load_temp_hr_heat["hourly_dark_frac"], 1)
.
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.
Thank you for the correction Mr. Olsen, I have made the necessary changes to the code.
This is unrelated to these changes, but I noticed that we're using |
@@ -294,6 +313,9 @@ def make_hourly_series(load_temp_df, i): | |||
): |
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.
Where does the 0.3 comes from. Sorry if you already explains it earlier
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.
For the hours that include sunrise or sunset the hourly darkness fraction would be the ratio of sunlight period within the hour. Based on the fits that were produced during the sunrise and sunset hours empirically we came to the conclusion that for these hours when the difference in max and min darkness fraction is less than 0.3 there would be no relation between load and darkness fraction.
For the hours before sunrise and after sunset the darkness fraction is set to 1. For the hours in between sunrise and sunset the darkness fraction is 0.
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.
Thanks for the explanation. It would be nice to have the meaning of this constant defined a little more clearly, perhaps within const.py
.
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.
Hi Daniel, thanks for the comments. This variable is in the original model that Mike and Evan developed, and it's prepared and documented in the script "weather data agg.py". For those hours with fully sun light or no sun light year around, the darkness fraction becomes almost a constant. The 0.3 differece between its maximum value and minimum value is then chosen, for the purpose to avoid darkness fraction mess up with the constant base load.
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.
The code changes seem straightforward. I'll trust your judgement about the logic.
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 to me. Thanks for the illustration.
Please see SEL-Columbia/PreREISE#1 |
Pull Request doc
Purpose
What is the larger goal of this change?
solving the positive slope scenario in the heating cure regression model
What the code is doing
How is the purpose executed?
when the s_heat (slope) >0, there would be relation between temperature and load. 2 additional cases arises with this conclusion.
1.load dependent only on darkness fraction (regression model with only darkness fraction)
2.load independent on both temp and darkness fraction
Testing
How did you test this change (unit/functional testing, manual testing, etc.)?
Where to look
It's helpful to clarify where your new code lives if you moved files around or there could be confusion/
zone_profile_gen
What files are most important?
Usage Example/Visuals
How the code can be used and/or images of any graphs, tables or other visuals (not always applicable).
Current Algorithm:
Proposed Algorithm:
Time estimate
How long will it take for reviewers and observers to understand this code change?