Grouped routes

With RouteQ, you can build routes in which orders are grouped closer to each other or localized in a certain area. To do this, use the options.proximity_factor and options.global_proximity_factor options.

Option Description
proximity_factor Routes are built taking into account the distance to the nearest orders. This option helps build routes with closer distances between neighboring orders. In practice, such routes are more resistant to changes in order time windows: when the order receipt time is postponed, the courier can drive to the next order and then return to the previous one.
global_proximity_factor Routes are built taking into account the distance to the last order. This option helps build geographically grouped routes. Use sequence post-optimization together with this option. You can also group orders around a so-called hotspot.
Option Description
proximity_factor Routes are built taking into account the distance to the nearest orders. This option helps build routes with closer distances between neighboring orders. In practice, such routes are more resistant to changes in order time windows: when the order receipt time is postponed, the courier can drive to the next order and then return to the previous one.
global_proximity_factor Routes are built taking into account the distance to the last order. This option helps build geographically grouped routes. Use sequence post-optimization together with this option. You can also group orders around a so-called hotspot.

Options can take a value between 0 and 10 where 0 means no order grouping, and 10 means maximum order grouping. The recommended value range is from 0 to 1. Higher values may negatively affect solution metrics: mileage, route time, or the number of couriers. To disable options for individual orders, use the location.use_in_proximity field.

To learn more about grouping options, see the Grouped routes case.

Example 1

cost.km = 8 (the default value), while the proximity_factor and global_proximity_factor values are set to zero. The routes are optimal in mileage, but geographically stretched and not localized in any area.

API request (JSON) API response View on map

Example 2

The same as example 1, but the proximity_factor value is increased to 0.5. Routes are built so that neighboring orders are closer to each other.

API request (JSON) API response View on map

Example 3

The same as example 1, but the global_proximity_factor value is increased to 0.5 and the post_optimization option is enabled. The routes are geographically grouped.

API request (JSON) API response View on map

Contact support