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

Jérôme's profile - activity

2022-09-20 01:32:13 -0500 received badge  Popular Question (source)
2016-05-19 11:33:22 -0500 received badge  Scholar (source)
2015-07-28 14:19:50 -0500 commented answer Call Python code from EnergyPlus simulation

The second part of my E+ paragraph was about creating (and integrating into E+) a generic module that would be some sort of socket for Python extensions. Basically, it would call a user-defined Python module with a user-defined list of arguments (variables from the simulation step) and inject the return values back into the simulation. With this, Python extensions would be easy to plug in. This could be done for other languages, too. I realize that I know very little about E+ and that this may well be total heresy.

2015-07-28 14:09:38 -0500 commented answer Call Python code from EnergyPlus simulation

Thank you for your answer. Although new to E+, I know about FOSS. I don't think our model qualifies as an E+ feature. It is specific to a product, which currently is only a prototype. And it may take a while before it reaches E+ quality, if it ever does. I'm not aiming as high as integration. I've been digging into FMU today. Not straightforward, but I'll try to dig further. Anyway, thanks for narrowing down my search, particularly for telling me that there is no way to provide a dynamically linked E+ module, apart from going the FMU way.

2015-07-28 09:24:57 -0500 received badge  Student (source)
2015-07-28 09:24:15 -0500 asked a question Call Python code from EnergyPlus simulation

We're developing a PCM technology for which we have a physical model implemented in Matlab. Currently, the model can run standalone in Matlab, or along with a building simulation using the MLE+ toolbox.

We want to develop an implementation of the model (language to be defined, could be Python) we could distribute to allow integrating the PCM product into building simulations.

Is there such thing as generic Python bindings that would call custom Python code at each simulation step? I naively imagined so, but I can't find anything like this. This could allow anyone with light development experience (scientific, researcher) to easily plug his model into E+.

I did a bit of searching and identified two different approaches:

E+ Module

We might provide our model as an E+ Module. Does this mean the module would have to be integrated into E+ (with validation from the team, etc.), or is there a way to add own/custom modules to an E+ installation, maybe even in user space (not system-wide)? I suppose it could be a C++ module calling Python code if we find it more practical to develop the model with Python.

We may even collaborate on an E+ Module that would act as a generic Python proxy. Not sure how much more work this would represent and who would be interested in doing this. Has this been planned by anyone already?

Functional Mock-up Interface

This post (both question an answer) indicates FMI would be the way.

If looking for E+ (and only E+) compliance, wouldn't it be easier to skip the FMI layer and plug the Python code into an E+ module? What in FMI makes it easier to achieve what we want?

I feel like I'm missing the obvious. Any hint appreciated.

Related question: FMU Export of Python Code or Python Interface with FMI Standard for Use in EnergyPlus Co-Simulation

2015-07-28 03:21:58 -0500 received badge  Supporter (source)