Adaptive Buffer¶
- class pathsim.utils.adaptivebuffer.AdaptiveBuffer(delay)[source]¶
Bases:
objectA class that manages an adaptive buffer for delay modeling which is primarily used in the pathsim ‘Delay’ block but might have future applications aswell.
It implements a linear interpolation for arbitrary time lookup.
- Parameters:
delay (float) – time delay in seconds
- buffer_t¶
deque that collects the time data for buffering
- Type:
deque
- buffer_v¶
deque that collects the value data for buffering
- Type:
deque
- get(t)[source]¶
lookup datapoint from buffer with delay at t_lookup = t - delay
- Parameters:
t (float) – time for lookup with delay