As far as I can tell this question hasn’t been fully answered. I would like to do some operation that uses the state from two adjacent timesteps. And hopefully be able to do this for all sets of adjacent timesteps in my model (unlike temporal array operator which must specify the timesteps and doesn’t get updated with time).
shows how to set data that is time varying in the programmable filter. However, it does not specify how to access data from multiple timesteps in the script since it assumes that data will be read in from file. Also, it’s somewhat unclear why the request information script is necessary since the model after the filter includes all of the original timesteps, not just those specified in request information.
Is using the GroupTimesteps filter as mentioned here: Timesteps in ProgrammableFilter the recommended solution here?