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

Revision history [back]

Read the documentation: https://nrel.github.io/EnergyPlus/api/python/datatransfer.html#datatransfer.DataExchange.get_trend_sum

Parameters trend_handle – An integer returned from the get_trend_handle function. count – The number of time steps to search back in history to evaluate this function.

Returns Floating point value representation of the specific evaluation.

Whether it will get 97, 98, 99 or 98, 99, 100 depends on when your callback happens (at the beginning of the timestep or at the end, before or after the new incoming value is added).

Note that it is pretty pointless (and more confusing IMHO) to use these E+-provided trend sum/average ones in python. Instead just make a python list (or numpy array, or whatever) of your historical values and compute the average/sum yourself using python's sum and mean