how to couple python + bcvtb + energyplus?

345 views
Skip to first unread message

yale liu

unread,
May 8, 2020, 10:53:06 AM5/8/20
to bcvtb
Dear all,

Recently I'm working on a project which requires me to interact with energyplus model (version 9.2.0) from python. I want to read from and write to energyplus at each timestep.  

I'm wondering if you have any comments or suggestions to couple python, bcvtb and energyplus together?

Thank you so much for your time.

Zachary Berzolla

unread,
May 8, 2020, 12:02:11 PM5/8/20
to bc...@googlegroups.com

Hello,


I’m by no means an expert BCVTB user so maybe someone else has more relevant experience but here are some thoughts to get you started.


I have never used python as part of BCVTB but in theory it should be similar to connecting to a MATLAB function. If you follow the MATLAB simulator actor documentation but instead create a python function and point the simulator actor to your python.exe that could be a good starting point. Then you add in the EnergyPlus component as has been done many times before and is well documented. 

 

Alternatively, you could explore creating an EnergyPlus FMU and interacting with that through PyFMI right from your python script. That’s not a BCVTB solution but could actually be better for your needs. 

 

Best,

Zach



On May 8, 2020, at 10:53 AM, yale liu <yapan...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bcvtb/af48170d-3308-41f4-81a0-b9265a29d72c%40googlegroups.com.

yapan

unread,
May 8, 2020, 1:13:17 PM5/8/20
to bcvtb
Thank you so much, Zach. I will explore both solutions you suggested. 

Best,
Yapan


On Friday, May 8, 2020 at 12:02:11 PM UTC-4, Zachary Berzolla wrote:

Hello,


I’m by no means an expert BCVTB user so maybe someone else has more relevant experience but here are some thoughts to get you started.


I have never used python as part of BCVTB but in theory it should be similar to connecting to a MATLAB function. If you follow the MATLAB simulator actor documentation but instead create a python function and point the simulator actor to your python.exe that could be a good starting point. Then you add in the EnergyPlus component as has been done many times before and is well documented. 

 

Alternatively, you could explore creating an EnergyPlus FMU and interacting with that through PyFMI right from your python script. That’s not a BCVTB solution but could actually be better for your needs. 

 

Best,

Zach



On May 8, 2020, at 10:53 AM, yale liu <yapan...@gmail.com> wrote:


Dear all,

Recently I'm working on a project which requires me to interact with energyplus model (version 9.2.0) from python. I want to read from and write to energyplus at each timestep.  

I'm wondering if you have any comments or suggestions to couple python, bcvtb and energyplus together?

Thank you so much for your time.

--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bc...@googlegroups.com.

Juanca Oviedo

unread,
Dec 18, 2020, 3:34:53 PM12/18/20
to bcvtb
Any thoughts on this?

In the long term will be better to use  BCVTB or EnergyPlus FMU and use it with PyFMI? It seems that BCVTB is no longer maintained while FMI seems constantly updated. 

I'm currently in the learning process, should I spend the time to learn BCVTB or learn better FMI? In the future which one will be better to know?

Kind regards, 

Michael Wetter

unread,
Dec 18, 2020, 4:44:15 PM12/18/20
to bc...@googlegroups.com
BCVTB is still distributed and there are many users. What is best depends on your needs and workflow. If it is just simulating an FMU, then PyFMI is perfectly fine. You could also use Modelica which provides many of the capabilities that BCVTB has, and can also call Python modules and link to EnergyPlus (on the Buildings Library master, to be part of the next release).

To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bcvtb/b3cf4833-5d1b-4743-b00c-941848163d80n%40googlegroups.com.

Juanca Oviedo

unread,
Dec 19, 2020, 9:14:40 AM12/19/20
to bcvtb
Thank you for your answer Michael. 

The way I'm planning to use the platform is to integrate EnergyPlus with AI-based controllers that come from python scripts. I see that BCVTB offers huge interoperability, which is really good. However, I'm a little scared about the maintenance of the project and the documentation, I can't find it. And this part seems to be better on the other option. I'm concerned about which one will be more useful in the future. However, I'm open to both. 

Can you suggest to me a way to learn how to use BCVTB?

Kind regards, 

Juanca Oviedo

unread,
Dec 19, 2020, 9:17:25 AM12/19/20
to bcvtb
And I forgot to ask, the next release you say is on BCVTB or in PyFMI? 

Thank you very much again, 

Regards, 

Michael Wetter

unread,
Dec 21, 2020, 10:03:31 AM12/21/20
to bc...@googlegroups.com
Juanca

E+ also has a python interface, you may want to look into that.
The link to the manual of the BCVTB is at https://simulationresearch.lbl.gov/bcvtb; it has examples for all features.
By next release, I referred to the release of the Modelica Buildings Library.

All the best,

Michael

Juanca Oviedo

unread,
Dec 21, 2020, 4:48:26 PM12/21/20
to bc...@googlegroups.com
Thank you very much, Professor Michael, I will check your suggestions, 

Thank you for your time, 

All the best, 


Reply all
Reply to author
Forward
0 new messages