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

Script for autosizing OS models?

asked 2018-10-03 18:14:27 -0500

Ranjani gravatar image

updated 2018-10-04 08:31:54 -0500

Hello everyone,

I exported an OSM file from CBECC-Com which already had the proposed system capacities. Instead of manually autosizing the system, I wanted to know if there is a script I can use. I tried the 'Autosize' measure from BCL, but the capacities weren't autosized. Am I missing anything? Can I get some help on this? I am using OS 2.5 version. Thanks

edit retag flag offensive close merge delete


What is the name of the measure on the BCL that you are using?

David Goldwasser gravatar imageDavid Goldwasser ( 2018-10-03 22:04:58 -0500 )edit

@davidgoldwasser Sorry I am not able to find the measure in the BCL library. Is there a script available that I can use?

Ranjani gravatar imageRanjani ( 2018-10-03 22:30:08 -0500 )edit

David- Do you know if there are any scripts available for autoszing the OS model extracted from CBecc-Com?

Ranjani gravatar imageRanjani ( 2018-10-04 14:12:42 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2018-10-08 13:49:07 -0500

When you run CBECC, and assuming you are retaining output files (see settings under Tools -> Program and Analysis Options, and set Simulation and Analysis output options to 2 or higher), there is an intermediate SDD file that we call the 'Sim SDD' xml. One of these is created for each run, and named accordingly, for example, * - ap.xml is the Annual Proposed model, or in other words, your input model as processed by the ruleset for the final T24 compliance run.

If you open this file in a text editor, change the property (Proj) 'HVACAutoSizing' from 0 to 1, and then load the SDD file into OpenStudio (File -> Import - > SDD), OS will ignore all the system capacities defined in your CBECC model.

I'm hoping we can make this more accessible in the CBECC interface in the next release, though it would be a feature that isn't valid for compliance, but could be useful for debugging capacity/unmet hour issues.

edit flag offensive delete link more


@DavidReddy this actually helped and saves time from manually autosizing the systems Thanks

Ranjani gravatar imageRanjani ( 2018-10-10 19:43:49 -0500 )edit

answered 2018-10-07 23:20:07 -0500

@Ranjani I am not aware of a measure setup to do this, but should be pretty easy, as there is a supporting method for this in the openstudio-standards gem. This Link identifies which objects the method below alters.

require 'openstudio-standards'

If you use the OS app or PAT to make a new measure, just replace what is between the initial and final condition with the two lines above.

edit flag offensive delete link more


Nice! Another way to code that would be...

class_names = ['all', 'the', 'class', 'names', 'to', 'autosize', ...]
class_names.each do |class_name|
  self.send('get' + class_name + 's').sort.each { |obj| obj.autosize }
MatthewSteen gravatar imageMatthewSteen ( 2018-10-08 16:51:30 -0500 )edit

answered 2018-10-11 00:07:41 -0500

As of OpenStudio 2.5.0, model.autosize is part of the OpenStudio API. So in a measure, just write:


No need to require openstudio-standards for this.

edit flag offensive delete link more


@aparker thanks for the reply. Should I have to open the OSM in text editor and try it or write a measure? Can you explain, as I am quite new to using this software

Ranjani gravatar imageRanjani ( 2018-10-11 13:57:41 -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: 2018-10-03 18:14:27 -0500

Seen: 129 times

Last updated: Oct 11