Please reload

Recent Posts

Version Control OpenStudio? You Got It!

August 16, 2017

Please reload

Featured Posts

Build Your Modeling Cycle 1 with BuildSim Cloud

April 26, 2018

The ASHRAE Standard 209  is finally here! The standard defines consistent energy modeling procedures to quantify the impact of design decisions when they are being made, help design team scope their modeling tasks and procure modeling services that add value to the design process.


For anyone who has read this latest standard, you will find it emphasizes a lot on the early design process when the cost and effort of changing designs are minimal. As first possible modeling task in the standard, simple box modeling cycle provides insights on the local energy end uses and demand characteristics that may affect building conceptual design. In this blog, we will do a step-by-step tutorial on how to create a modeling cycle one python script on BuildSim Cloud.


1. Preparation! 

One pre-condition is to get a BuildSimHub account. It is free of charge and you can have a demo project filled up with a few free CPU hours for simulation.


1. Create a project and get project_api_key (highlighted)!


2. Import a reference model from BuildSim standard whole model library as a seed model - in this case, we will copy a small office reference model to the project.


3. Making sure the model is correctly copied to your project and then copy the model_api_key.


 2. Start Coding!

So first thing first, import the BuildSimHubAPI client for simulation. In this tutorial, we will need to import postprocess module for results process.

Then, insert your project_api_key and model_api_key to the relevant variables. 

Lastly, define variable values. You can see we are investigating window-wall-ratio for four orientations, wall and roof insulations and window thermal properties.


Second, initiate connections to BuildSim Cloud and create a new parametric job.




Third, define all the measures - simply call the method, and insert it into a measures list. In the end, we will need to put the measure list into the new parametric job.

Finally, the most exciting part! Let's start parametric run!

When you hit the run button, the API library will automatically communicate with the server and track the job status:


Submitting parametric simulation job request...

Received server response

Total progress 4%, success: 12, failure: 0, running: 7, queue: 237

Total progress 4%, success: 12, failure: 0, running: 7, queue: 237

Total progress 6%, success: 16, failure: 0, running: 4, queue: 236

Total progress 7%, success: 19, failure: 0, running: 6, queue: 231


3. Get Results!

Simulations are critical and time-consuming, but more importantly, we need to collect all the results for analysis to make the wait worth! Don't worry, BuildSim python API takes care of it.

Once you retrieve the results, you can do:

Import the postprocess module to get results in pandas data frame.  Or you can even get a parallel_coordinate plot! In this example, we are getting EUIs, but there are more data, including energy end uses and demand, can be retrieved. A full list of data can be found here.


         Roof_R  WWRE  WWRN  WWRS  WWRW  Wall_R  Window_SHGC  Window_U  Value

case1      40.0   0.4   0.4   0.6   0.4    30.0          0.5     0.247  19.87

case2      40.0   0.4   0.3   0.6   0.4    30.0          0.5     0.247  19.80

case3      40.0   0.3   0.4   0.6   0.4    30.0          0.5     0.247  19.84

case4      40.0   0.3   0.3   0.6   0.4    30.0          0.5     0.247  19.79

case5      40.0   0.4   0.4   0.6   0.3    30.0          0.5     0.247  19.80

case6      40.0   0.4   0.3   0.6   0.3    30.0          0.5     0.247  19.75

case7      40.0   0.3   0.4   0.6   0.3    30.0          0.5     0.247  19.72

case8      40.0   0.3   0.3   0.6   0.3    30.0          0.5     0.247  19.60



4. Summary

The sample code can be found in