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

How do I run a simulation using the C++ API?

asked 2023-06-21 09:15:38 -0500

gambero's avatar

updated 2023-06-22 10:02:21 -0500

Good morning everyone, I'm pretty new to the topic and I 'm moving my first steps with EnergyPlus and OpenStudio. I apologize if this question is silly.

I would like to use OpenStudio C++ SDK to run building energy simulations. I checked the C++ SDK documentation and I'm confused, there is extensive explanation of the Model but I didn't find anything about actually running a simulation and getting the results.

It may be my fault, maybe I didn't look in the right place but I really could use some explanation. Also, it would be very useful to see an example of use of the C++ API to do something like creating a model, starting a simulation and getting the result. Is there any tutorial, or any example for this use case?

edit retag flag offensive close merge delete



Here's how the OpenStudio application (C++) runs the model:

shorowit's avatar shorowit  ( 2023-06-21 18:55:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2023-06-21 16:04:54 -0500

You need to make a system call to the openstudio CLI , You should create osw file based on model class and epw file. To start the simulation, call the osw file using openstudio CLI , This example is to start simulation in C# language, I think it will help you

link text

edit flag offensive delete link more

Your Answer

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

Add Answer

Training Workshops


Question Tools

1 follower


Asked: 2023-06-21 09:15:38 -0500

Seen: 279 times

Last updated: Jun 21 '23