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

Revision history [back]

click to hide/show revision 1
initial version

Communicate end of RunPeriod to Python Plugin

Is there a mechanism in the Python Plugin API to communicate the impending end of a RunPeriod to a Python Plugin? I have checked the various Python classes (datatransfer.py, plugin.py, state.py, etc), and I don't see an obvious way to do this. My specific use case is signaling to a Python Plugin the end of a RunPeriod / simluation so that it can dump a log file at the end of a simulation. If I continuously log data at each time-step, this nearly doubles the simulation time. It would be much more efficient to write this log file to disk a single time at the end of the simulation.

I could see other use cases where knowing that a RunPeriod is in it's last timestep would be helpful for a plugin developer, especially as plugins become more complex and more than just simple ERL script replacements.