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

Revision history [back]

If your Python code is memoryless, that is, the output of the Python code at time t only depends on the inputs at time t, then you could use the SystemCommand actor to call your Python script (http://simulationresearch.lbl.gov/bcvtb/releases/1.0.0/doc/manual/tit-CustomExeCon.xhtml) .

I will suggest following:

  • You use the BCVTB as your master program.
  • You use the Simulator actor to run E+ and expose the outputs you want to send to Python.
  • You use the SystemCommand actor to call your Python code with the inputs received from E+.
  • You send the outputs of the SystemCommand actor to the inputs of the Simulator actor which will pass your control actions to EMS.

I suggest you studied few BCVTB examples such as the one which uses an EMS actuator as well as the one which uses the systemComamnd actor. Once you understand the two you will be able to connect the dots.

Note that instead of using the Simulator actor in the BCVTB, you could export EnergyPlus as an FMU, and import it in the BCVTB.