Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Naveen/zone profile gen #34

Open
wants to merge 5 commits into
base: bldg_elec
Choose a base branch
from
Open

Conversation

NaveenGopan
Copy link
Collaborator

@NaveenGopan NaveenGopan commented May 11, 2022

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:
current algorithm
Proposed Algorithm:
proposed algorithm

Time estimate

How long will it take for reviewers and observers to understand this code change?

Comment on lines 288 to 295
np.array(
[
[
load_temp_hr_heat["hourly_dark_frac"][j],
]
for j in range(len(load_temp_hr_heat))
]
),
Copy link
Collaborator

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).

Copy link
Collaborator Author

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.

@danielolsen
Copy link
Collaborator

danielolsen commented May 11, 2022

This is unrelated to these changes, but I noticed that we're using sklearn, but this isn't specified as a dependency in the requirements.txt/Pipfile/Pipfile.lock. We'll want to add that so that the pipeline works out of the box in a freshly-specified environment.

@@ -294,6 +313,9 @@ def make_hourly_series(load_temp_df, i):
):
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

@danielolsen danielolsen left a 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.

Copy link
Collaborator

@BainanXia BainanXia left a 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.

@jmbott
Copy link
Contributor

jmbott commented May 26, 2022

Please see SEL-Columbia/PreREISE#1
This repo is being moved and will be archived.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants