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

what is features of EnergyPlus Python API 1.0 comparing with other APIs

asked 2020-08-22 21:40:48 -0500

Lantonshen gravatar image

We know that the new version of EnergyPlus provides the API by Python. What are features of it? What are the differences between it and Openstudio (c++), eppy (python), jEPlus, Modelkit/Params? If I wanna do lots of building geometry/zone layout sensitivity analysis, which one you will recommend? Thanks

edit retag flag offensive close merge delete

Comments

2

There is a similar post here asking about EnergyPlus APIs in general for more context. There are also good posts here explaining the main goal of the Python API created by the EnergyPlus development team and here with links to EnergyPlus documentation about this feature. A full write-up of differences between each API you mention will likely be pretty lengthy.

Aaron Boranian gravatar image Aaron Boranian  ( 2020-08-23 07:53:31 -0500 )edit

Thanks for sharing all these. It helped!

Lantonshen gravatar image Lantonshen  ( 2020-08-23 14:50:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
5

answered 2020-08-23 11:14:37 -0500

updated 2020-08-23 17:22:44 -0500

The new EnergyPlus Python API is really a different beast that the other APIs you listed. The key for each API is to understand what it does and when it is used.

OpenStudio, eppy, jEPlus, and Modelkit/Params are all APIs to modify/generate simulation input files, manage simulation execution, and read/process simulation output files. There are differences in functionality, programming language, and other details but each of these APIs has functionality in these areas.

The EnergyPlus Python API is really almost two APIs. Library mode allows another program to call routines in EnergyPlus directly, previously the only way to access these routines was to write an IDF file and execute a system call to EnergyPlus. Plugin mode allows EnergyPlus to call Python scripts at each timestep during simulation runtime as part of the simulation itself. For instance, your Python script could be used to control some piece of EnergyPlus HVAC equipment during the simulation based on logic in your Python script.

A user could easily use multiple APIs as part of a workflow. For instance, you could use OpenStudio, eppy, jEPlus, or Modelkit/Params to generate a large number of IDFs and call EnergyPlus to simulate them. Then, during the simulations, EnergyPlus could call Plugin API Python Scripts as part of the simulation to control HVAC systems. After the simulation, OpenStudio, eppy, jEPlus, or Modelkit/Params would read the simulation results and format them for the user.

edit flag offensive delete link more

Comments

Thank you for sharing. It is remarkable! That means plugin mode make EnergyPlus to be a real BMS which you can optimize the system during the operational state. Thanks!

Lantonshen gravatar image Lantonshen  ( 2020-08-23 11:35:15 -0500 )edit

Plugin Mode is replace of the EMS in python: instead of writing an EMS program inside your IDF in ERL language, you write a python script, and in your IDF you tell E+ to launch this python script.

The alternative is running in API mode, where you basically define functions that will be called at each timestep, and can launch a simulation thereafter. That's the mode you would use if were looking to do fancy stuff like update a graph at each timestep, etc.

Julien Marrec gravatar image Julien Marrec  ( 2020-08-25 10:02:12 -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

4 followers

Stats

Asked: 2020-08-22 21:40:48 -0500

Seen: 288 times

Last updated: Aug 23 '20