-
Notifications
You must be signed in to change notification settings - Fork 11
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
Force a dummy value for SHW in modelica loads even if not present #626
Conversation
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.
I wish we chatted... I wrote a helper method to do this in the 5G stuff. The method is ultimately in Modelica Builder.
mos_file = ModelicaMOS(save_filename)
total_heating_load += mos_file.retrieve_header_variable_value('Peak space heating load', cast_type=float)
total_cooling_load += mos_file.retrieve_header_variable_value('Peak space cooling load', cast_type=float)
peak_water = mos_file.retrieve_header_variable_value('Peak water heating load', cast_type=float)
total_swh_load += peak_water
if peak_water == 0:
peak_heat = mos_file.retrieve_header_variable_value('Peak space heating load', cast_type=float)
peak_swh = max(peak_heat / 10, 5000)
mos_file.replace_header_variable_value('Peak water heating load', peak_swh)
mos_file.save()
@nllong You mean... have the modelica package do the modelica editing, and keep log messages consistent? |
I know, it's complicated. haha |
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 using Modelica Builder! love it.
Any background context you want to provide?
MBLv10 requires a value in the Service Hot Water column of the loads timeseries, even if it isn't used. Modelica-Builder has a feature that can update values in .mos files, so lets use that.
The UO SDK populates this column as of v0.11.0 with urbanopt/urbanopt-reporting-gem#143. Load files generated before then may be missing this data.
What does this PR accomplish?
How should this be manually tested?
Generate a model using timeseries data that does not have the SHW column populated. The updated file is
modelica_project/Loads/Resources/Data/<buildingname>/<load_timeseries>.mos