-
Notifications
You must be signed in to change notification settings - Fork 195
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
RunPeriodControlSpecialDays are not Forward Translated #4064
Comments
@chriswmackey there is a flag, that is false by default, that will tell the FT whether it should translate the special days or not... It's been there for at least 7 years. OpenStudio/src/energyplus/ForwardTranslator.cpp Lines 106 to 112 in fa9a77b
As I indicated in https://github.com/NREL/OpenStudio/pull/3814/files#discussion_r356545389, I think it may be time to remove the flag, or rather, to set it to You can use model = OpenStudio::Model::Model.new
os_hol = OpenStudio::Model::RunPeriodControlSpecialDays.new(
OpenStudio::MonthOfYear.new(7), 4, model )
os_hol.setDuration(1)
os_hol.setSpecialDayType('Holiday')
ft = OpenStudio::EnergyPlus::ForwardTranslator.new
w.getObjectsByType("RunPeriodControl:SpecialDays").size
=> 0 ft.setKeepRunControlSpecialDays(true)
w = ft.translateModel(model)
w.getObjectsByType("RunPeriodControl:SpecialDays").size
=> 1 |
Thank you for the response, @jmarrec . It would be very helpful if the flag could be set to True by default or if it could be exposed in the OSW schema since I have no means of setting it to True in our current Ladybug Tools workflows. We transitioned from using the C# bindings in our old (legacy) plugin to using measures, Ruby bindings, and the OpenStudio CLI in out latest plugins. Generally, it's been a big improvement since we no longer have the whole plugin failing with PINVOKE errors from incorrectly-built C# bindings and it has allowed us to easily integrate into other Ruby-based projects at NREL, especially openstudio-standards. However, it seems the one major downside of this transition is that there's no way for us to access the forward translator. So we cannot support holidays in our latest plugin even though we have support for it in our old plugin. |
@chriswmackey thanks for the context that is helpful to know. I did the changes already in the linked PR #4072 a few days ago, but it is still pending review |
Fix #4064 - RunPeriodControlSpecialDays are not Forward Translated
Wonderful! Thank you, @jmarrec ! |
Issue overview
Even though ScheduleRuleset officially supports holidays now thanks to @jmarrec 's addressing of this issue it seems I'm still unable to get the
RunPeriodControlSpecialDays
that I add to the Model to show up in the IDF.Current Behavior
I would expect the following code to add a holiday to the IDF:
I can
puts
this Holiday object and get it from the Model with themodel.getRunPeriodControlSpecialDayss
method.However, this special day never makes it into the IDF with the Forward Translating done by the OpenStudio CLI.
Expected Behavior
I'd expect the holiday to make it into the IDF.
Environment
https://drive.google.com/file/d/1kVARVzqDdCNTAUHYHZfV-5eA2B_aNHwy/view?usp=sharing
The text was updated successfully, but these errors were encountered: