1

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

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?

gambero's avatar
11
gambero
asked 2023-06-21 09:15:38 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2023-06-22 10:02:21 -0500
edit flag offensive 0 remove flag close merge delete

Comments

1

Here's how the OpenStudio application (C++) runs the model: https://github.com/openstudiocoalitio...

shorowit's avatar shorowit (2023-06-21 18:55:17 -0500) edit
add a comment see more comments

1 Answer

1

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

Masoud's avatar
100
Masoud
answered 2023-06-21 16:04:54 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments