- This feature is configurable via code for custom routing apps.
- You can find a list of all available features here.
- This how-to guide assumes you already completed the get started with vehicle routing tutorial.
The cluster objective is used to encourage cluster compactness of routes. As the engine assigns stops to vehicles, the objective encourages assignment to vehicles whose centroid is closer to a stop cluster than other vehicles. This can be useful if drivers have preferences to stay within a certain neighborhood/region after leaving the depot and are willing to drive longer distances if it means they can stick to a cluster of stops. Note, clustered routes can be handled with either this hard constraint or with the cluster constraint.
Here is an example using the cluster objective in a custom application with a weight of 1000. You can specify the option in code before creating the model in your solver.