3

How to best clear and program Schedule Rules in OpenStudio measures

I am trying to write a measure that allows me to set the HVAC availability schedule for an air loop. Is there any easy way to clear all of the existing rules for a schedule and then assign new ones? From the documentation it doesn't appear that there is a method in the ScheduleRuleSet class to clear rules or to assign new schedule rules. Has anyone figured out a good way to accomplish these two tasks?

Any insights are very appreciated

dpud12's avatar
1.3k
dpud12
asked 2015-04-30 08:34:29 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-08-05 13:23:11 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

4

If you don't want to preserve any of the original data, it might be easiest to just create a new schedule and assign that to your HVAC system.

macumber's avatar
12k
macumber
answered 2015-04-30 08:40:28 -0500
edit flag offensive 0 remove flag delete link

Comments

I would like to preserve the original Design Day schedules, but could copy those original design days and then easily set them in the new schedule rulesets using the setWinterDesignDaySchedule and setSummerDesignDaySchedule methods. However, in this new workflow, what method can I use to assign a new ScheduleRule that I create to a ScheduleRuleset? I don't see a method for this in the ScheduleRuleset documentation

dpud12's avatar dpud12 (2015-04-30 11:42:30 -0500) edit

When you create a ScheduleRule you have to pass a ScheduleRuleset in the constructor, this associates the rule with the ruleset.

macumber's avatar macumber (2015-04-30 12:03:48 -0500) edit

Ahh I see, thanks @macumber

dpud12's avatar dpud12 (2015-05-01 07:11:39 -0500) edit
add a comment see more comments