Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question

how to rename the schedule name by measure?

asked 2015-05-28 11:09:59 -0500

building_performance gravatar image

updated 2017-08-05 13:23:21 -0500

(1)I generated a new schedule by measure script, by:,stuckpercentage); (2)Then i assigned the schedule "myschedule" to my Outdoor Air Damper, by: controlleroa.setMinimumFractionofOutdoorAirSchedule(myschedule); (3)Finally, after i applied the measure to OpenStudio test, the schedule name shown is: "Schedule Ruleset 1" from the schedule list. But i checked the values of "Schedule Ruleset 1" is what i gave during implementing the measure. So, how to rename the "Schedule Ruleset 1" to "myschedule"? I checked the source code of OpenStudio, there are no methods like: ResetScheduleName().

A snapshot from OpenStudio Measure is shown below:

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-28 14:45:36 -0500

Should look something like this.

# create new schedule
sch_ruleset =
sch_ruleset.setName("My Schedule")

If you just look at the ScheduleRuleset object you won't see "setName"

But if you click "List of all members" you will see it.

The second link shows all methods inherited from parent objects. You can click the "inheritance diagram" to see and jump to those objects. image description

edit flag offensive delete link more


Thanks a lot. But from the source code of OpenStudio, how can i get the inherited methods, like setName() method?

building_performance gravatar image building_performance  ( 2015-05-28 15:48:46 -0500 )edit

The links I provided are built from the header files of the source code, so you are kind of browsing the source code. You can view as of the last major release or the last iteration (choose 'model' for the most part) . If you are going to browse code on GitHub you just have to get more familiar with the object inheritance.

David Goldwasser gravatar image David Goldwasser  ( 2015-05-28 16:31:52 -0500 )edit

If you are browsing the source code directly it is more tedious. You have to find out what the base class is and then go open that base class's header file separately. For ScheduleRuleset you'll find here that it derives from Schedule. From here you will find that Schedule derives from ScheduleBase. Eventually you end up at ModelObject which defines ::setName.

Kyle Benne gravatar image Kyle Benne  ( 2015-05-30 09:31:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer


Question Tools

1 follower


Asked: 2015-05-28 11:09:59 -0500

Seen: 93 times

Last updated: May 28 '15