3

Changing schedule based on Artificial Neural Network using values from energy plus

Hi...

Is it possible to supply the indoor temperature, indoor RH and other values to the ANN model that can predict the opening and closing of the windows? I already have the model. I have to figure out how can I supply the indoor air parameters like temperature and RH from the energy plus to my ANN model. And also how to replace the Window Open/Close values predicted by ANN model as the schedule to window opening?

I believe this can be done using python but I am not sure how to start.

Thank you so much for your time.

prp92's avatar
125
prp92
asked 2022-01-14 10:06:48 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2022-01-14 14:55:37 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

I would check out the new EMS Python API and see if it suits your needs. It provides the EMS feature of EnergyPlus with a nice Python API for actuating and sensing simulation objects at runtime. I'd check out the EMS Application Guide from the EnergyPlus documentation and the Python API

Using the Python API you can fetch sensor values of indoor parameters at each timestep, feed them to your ANN, then use actuators to implement the output. You should first check if EMS provides actuators for window opening/closing. I know window shading is possible, but unfamiliar with the rest. If window open/close is schedule driven, you can actuate the schedule itself.

mechyai's avatar
312
mechyai
answered 2022-01-16 18:54:51 -0500
edit flag offensive 0 remove flag delete link

Comments

Hi @mechyai,

thank you so much for replying. I spend last two weeks trying to understand EMS python API and it is still super hard to understand it.

I found that using plugin method 'EnergyPlusPlugin' might be easier for a beginner like me. Is it possible to do all the process like sensing, reading ANN models and actuating using the python plugin mode?

thanks..

prp92's avatar prp92 (2022-01-29 12:09:50 -0500) edit

@prp92 I am not sure as I have only used used EnergyPlus as a "library" with the Python EMS API, not Python as a plugin in EnergyPlus. I made this workflow decision a while ago so I don't remember all my motivations, but I think I remember choosing running E+ as a library in Python because of the ability to keep my namespace (for instance NN model params) in Python for the longevity of the simulation and Python script. If I remember correctly, Python plugin's namespace only persist within the individual call, you would have to read/write your NN model params at each call.

mechyai's avatar mechyai (2022-01-30 12:18:06 -0500) edit

@prp92, also I believe if using Python as a plugin you have to bottle your ENTIRE Python workflow into the single plugin script. When using EnergyPlus as a library in Python, I can have a normal programming workflow, say with a bunch of PyTorch NN stuff, in Python, then only pass EnergyPlus specific things via a callback function at specific calling points. If I take an OOP approach in Python, I can pass a whole slew of variables and objects (.ie NN models, etc.) into EnergyPlus, preserving namespace inside and outside E+ for the entire simulation run period.

mechyai's avatar mechyai (2022-01-30 12:23:46 -0500) edit

@prp92 using E+ as a library in Python with the EMS Python API should make sense once you understand how to pass callback functions and calling points. The callback function is the single piece of Python code that gets passed to E+ at runtime, the calling point is specifically when this happens.

mechyai's avatar mechyai (2022-01-30 12:25:10 -0500) edit
1

@prp92 see @jmarrec great notebook at "Run EnergyPlus in API mode" to see examples of how to use E+ as a library/API

mechyai's avatar mechyai (2022-01-30 12:27:57 -0500) edit
add a comment see more comments