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

Is there any documentation on using python bindings for openstudio measures?

asked 2 years ago

arjundesai's avatar

updated 2 years ago

Hi, I am trying to use python bindings for creating, manipulating and running openstudio simulations using openstudio server. This means I will use python bindings for generating a seed model, creating and running openstudio, eneryplus and reporting measures for openstudio and upoading them to openstudio server for simulation. I have created openstudio server locally using the docker container images and used python bindings to create a seed model from scratch. I am not able to find any documentation on how to use python bindings for creating and applying measures on the seed file and creating an OSA file for submitting to openstudio server. Any lead would be appreciated.

Preview: (hide)

Comments

There have been previous questions about this. See https://unmethours.com/question/57173... for example.

shorowit's avatar shorowit  ( 2 years ago )

1 Answer

Sort by » oldest newest most voted
-2

answered 2 years ago

I believe the Python API is only used for running the simulation and manipulating parameters during the simulation, not for creating the IDF itself. Basically, it's a new(ish) way to specify EMS programs, using Python instead of Erl. When used as a library, it allows you to call into the program during simulation, to call separate algorithms with which you can use to manipulate the parameters at each timestep. To my knowledge, there is no way to use Python to apply OS measures, as the Python API is for EnergyPlus, not OpenStudio.

I'm curious how you were able to use Python bindings to create a seed model from scratch, without OS? Perhaps you used Eppy (which is different from the Python API)?

Preview: (hide)
link

Comments

Hi, I am not talking about Python API to EnergyPlus. I am talking about Openstudio SDK which has python bindings for openstudio.

arjundesai's avatar arjundesai  ( 2 years ago )
3

python measures are currently in development.

BrianLBall's avatar BrianLBall  ( 2 years ago )

Thanks Brian. Is there any way I can create an OSW file and push it for runs on Openstudio server from jupyter python kernal? Can you lead me to some example? I have read the Openstudio SDK documentation and the meta CLI notebooks but they are all in Ruby format and I am not proficient with Ruby.

arjundesai's avatar arjundesai  ( 2 years ago )

the meta_cli is a ruby file, however in the ruby notebooks, we are just doing system calls which look like:

"/opt/OpenStudio-server/bin/openstudio_meta run_analysis --debug --verbose '/opt/OpenStudio-server/server/spec/files/SEB_calibration_single_run_2013.json' 'http://192.168.65.3' -z 'SEB_calibration_NSGA_2013' -a single_run"

you could do a similar system call in python if you wanted.

BrianLBall's avatar BrianLBall  ( 2 years ago )

Thank you, Brian for your help. But the question is I an not sure how do I create "SEB_calibration_single_run_2013.json" in the first place. I have a seed model in *.osm format that I created using openstudio python bindings. Lets say for now, I use the measures "SEB_calibration_single_run_2013". Is there some built in method that makes the *.json file with the information of measures, seed model and weather file that I missed in the documentation? I tried using the setWorkFlowJSON method. It generates an *.osw file. But I am not sure how do I add measures using jupyter (ipython kernal).

arjundesai's avatar arjundesai  ( 2 years ago )

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2 years ago

Seen: 1,377 times

Last updated: Jul 05 '22