Looking Backwards

One key thing to keep in mind is that the lag correction classes only work backwards.

This is because you can easily reach 'now' when scanning forwards, meaning you need data from the future in order to synchronise your data.

To prevent this, you should always work in reverse - starting from the end asset and working backwards from there.

Example

If you have a production line that passes product from…

 A => B => C => D => E => F

…you should use 'F' as your end asset. All of your distances that you'll use in calls to AddQuery will be relative to F.