I am sorry, let me clarify the situation.

The point K is taken within the trip #2, it means that formula should skip trip #3 and not consider point Q and R as chosen. It is needed to consider all three point within each trip number.

Thanks