Streak split
The streak split is defined by the streak split buffer threshold in each matching configuration of a product. The threshold is a duration; its default is 15 minutes.
What is a streak?
When matching places pickup and dropoff tasks of a ride into a vehicle planning, the core determines which other tasks might be affected by the introduction of these new tasks as each new task may delay other tasks in the plan.
A streak is the collection of tasks that affect one another in a task list.
Imagine 100 tasks where task 34 is a pickup. The pickup is related to its surrounding tasks:
- If you move task 34, its neighboring tasks are likely affected.
- If you move the neighboring tasks, task 34 may also be affected.
However, not all neighbors are linked. For example, if the task before task 34 happens four hours earlier, with only 30 minutes of travel between them, there is still a 3.5-hour “free buffer”. In that case, the tasks are not considered linked. This “linkage” is what defines a streak.
Why streaks matter
Splitting a task list into streaks is a performance optimization. When matching inserts a new pickup or dropoff into a candidate task list, it does not re-check the whole list. It only re-validates the tasks in the streaks that contain the new tasks—recalculating their time windows and checking the time-deviation and deactivation constraints there. Tasks separated from the insertion by enough free buffer fall into different streaks and are assumed to be unaffected, so they are skipped.
A smaller threshold produces smaller streaks, and therefore less work per candidate, but it also makes the matcher assume that delays stop propagating sooner. A larger threshold links more tasks together, so the matcher accounts for delays rippling further, at the cost of more validation work.
Streak split buffer threshold
The streak split buffer threshold defines when tasks are considered linked in a streak.
Two tasks are 30 minutes apart, and travel between them takes 20 minutes.
- Free buffer: 10 minutes
- If the streak split buffer threshold is 8 minutes, the tasks are not linked.
- If the streak split buffer threshold is 15 minutes, the tasks are linked in the same streak.
A streak is therefore a sequence of tasks where the accumulated free buffer between them stays below the threshold.
The threshold controls how far the affected region reaches around the ride’s new pickup and dropoff:
- A higher threshold links more surrounding tasks into the streak, so more tasks (spanning more time) are treated as able to affect one another and are re-validated. If the regions around the pickup and the dropoff grow enough, they merge into a single affected streak.
- A lower threshold keeps the streak small, so fewer surrounding tasks are considered affected, and the pickup and dropoff are more likely to sit in separate streaks.
Beyond that reach—once there is no further task within the threshold’s worth of free buffer—matching treats the following tasks as unaffected and any accumulated delay is “reset”. This acts as a safety margin that keeps the departure and arrival time estimates valid.
Accumulated free buffers
The threshold also applies to accumulated buffers.
A dropoff task at position 60 has 40 successors, each 10 minutes apart and each with a 2-minute buffer. It’s desirable to “accumulate” buffers and stop the streak once their sum would reach the threshold. So if the streak split buffer threshold is 10 minutes, the streak includes the first 4 successors and stops at the 5th, because adding it would bring the accumulated buffer to 10 minutes—no longer below the threshold.
In other words, the streak split buffer threshold is the amount of accumulated free buffer time, where we consider delays not to propagate.
Special cases
If you set the streak split buffer threshold to zero, any free buffer at all splits the streak, so the new pickup and dropoff end up isolated in their own streaks. The matcher then behaves as if a delay never ripples into later tasks: it validates essentially only the inserted tasks and keeps accepting additional passengers on the assumption that the present delay will not affect upcoming commitments.