Configuration parameters for real-time business rules of pick-drop orders
String Collection: A string separated by semicolons ( ; )
Team Configure parameters
In the real-time pick-drop scenario, the following configuration parameters are involved, starting with the team level:
Parameter Name | Type | Description |
---|---|---|
enabled_rule_codes | String Collection | Enable those "preliminary selection" rules. Available rules:basic;area_code;tolerance_check;geo_merge;max_pick2drop_merge;worker_radius |
meter_search_radius | Integer | How far away can an order be assigned to an employee |
meter_search_radius_whitelist | Integer | If a whitelist is enforced, how far away can an order be assigned to an employee? |
peak_period_spec | ||
enable_accum_items | ||
enable_level_items | ||
enable_skills | ||
allow_mixed_area | ||
meter_same_area | ||
meter_other_area | ||
enable_accum_items | ||
enable_accum_items | ||
limit_same_location_stack | 0 | |
peak_period_spec | String Collection | |
period_unit_second | 3600 | |
meter_same_location_match | 10 | |
meter_priority_merge_pick | 300 | |
meter_priority_merge_drop | 1000 | |
meter_allowed_merge_pick | 2000 | |
meter_allowed_merge_drop | 4000 | |
meter_merge_drop_scaling | 20000 | |
meter_max_pick2drop_merge | 1000 | |
tolerance_seconds | 0 | |
nbr_jobs_per_slot | 0 | |
... | ... | ... |
Rule lists
Based on the above parameter combinations, the pick-drop orders support the following business rules:
Order Dispatch Priority
All orders and riders belong to an area code (area_code). If your business operates in a single area, you can specify a constant such as "A". When a new order arrives:
- Riders within the same area who are within meter_same_area distance and are idle will be prioritized based on the closest proximity.
- Riders from other areas who are within meter_other_area distance and are idle will be considered next, also prioritizing the closest ones.
Configuration can be made to prioritize either order consolidation or selecting idle riders during specific peak periods:
- If order consolidation is prioritized, orders will be consolidated based on pickup within meter_priority_merge_pick meters and dropoff within meter_priority_merge_drop meters, prioritizing distance. Other riders will not be considered.
- If selecting idle riders is prioritized, idle riders within meter_same_area kilometers from the order will be prioritized first, followed by riders from other areas within meter_other_area kilometers, directly assigning them without considering riders already carrying orders.
If the pickup and dropoff addresses for an order are the same, and limit_same_location_stack equals 0, an unlimited number of orders can be stacked, even if they exceed the configured maximum.
If no matches are found through the above priority searches, the algorithm will look for other orders to consolidate based on configured maximum order counts and maximum distances, selecting the allocation that minimizes the "newly added distance" across all eligible riders.
In any case, if consolidation occurs, the distance between the dropoffs of the existing and new orders must be within meter_allowed_merge_drop. The following three parameters jointly control the maximum distance for consolidation:
- "max_meters_radius_merge_drop": "500",
- "max_meters_radius_merge_drop_scaling_distance_km": "15",
- "max_meters_radius_merge_pick": "2000" For example, if the current order distance from restaurant to customer is 5 kilometers, riders with existing dropoffs within 666 meters of the new order's dropoff will be considered for consolidation: 500 * (1 + 5 / 15) == 666
If the distance is 20 kilometers, riders with existing dropoffs within 1100 meters of the new order's dropoff will be considered: 500 * (1 + 20 / 15) == 1100
Riders can be forcibly assigned, ignoring previous rule restrictions, as long as they are within meter_search_radius_whitelist distance. After this assignment, TSP (Traveling Salesman Problem) optimization will be performed.
Under normal circumstances, the number of tasks assigned to any rider cannot exceed nbr_jobs_per_slot.