how does get_trend_sum() api work?
If the simulation comes to the 100th timesteps, what will get_trend_sum(state, handles, 3) return?
the sum of timesteps from 97, 98, 99? or 1~97? or 98, 99, 100?
First time here? Check out the Help page!
If the simulation comes to the 100th timesteps, what will get_trend_sum(state, handles, 3) return?
the sum of timesteps from 97, 98, 99? or 1~97? or 98, 99, 100?
Read the documentation: https://nrel.github.io/EnergyPlus/api...
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
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2022-01-28 10:46:10 -0600
Seen: 138 times
Last updated: Sep 06 '22