Cluster optimization allows users to create Routes and optimize them based on a cluster or Tasks. In eLogii, a cluster represents a group of Tasks in an approximate vicinity, which can be adjusted based on your preferences, meaning that a Cluster can be expanded or broken down.
Cluster optimization can be performed as a general optimization for all your Tasks, or you can perform it as a part of Team-based optimization by selecting the Team (or Teams) you want to perform this type of optimization for. You can do this by clicking on the Teams section on the planning screen option bar. If you select a specific Team to optimize for, only the Tasks assigned to that Team will be shown on the map, and only those Tasks will be taken into account for optimization.
How Cluster Optimization Works
Once this feature is enabled, an additional option will appear in the Optimization dialogue called Cluster Optimization. Once you click this option, a pop-up will appear, as shown in the image below.
You will be presented with the option to choose the clustering basis, which can be by the number of clusters or by distance, and you will be able to make adjustments within these bases.
By Number of Clusters – Allows you to specify the maximum number of clusters to generate. The system then adjusts the cluster distances as needed to reach that specified count.
By Distance – Places no limit on the number of clusters. You simply set the maximum distance allowed between points (Tasks), and clusters are formed accordingly. The final number of clusters depends entirely on the data distribution.
Number of Clusters
This basis allows you to select a method based on which clusters are formed. It is possible to choose between the following 3 methods.
K-Means++ (Non-deterministic) – This is the default option and a faster, improved variant of standard K-Means that helps avoid local minima.
Because it’s non-deterministic, running it multiple times on the same data can produce slightly different clustering results each time..Constrained K-Means – Adds flexibility by letting you set both a minimum and maximum number of Tasks per cluster. This pairs well with other constraints, for example, you can match the maximum cluster size to your Route Stop Limit, or set a minimum to avoid very small clusters. It is also important to note that the number we get by multiplying Cluster count by the Maximum number of items must be greater than the number of Tasks you have available. If we define a smaller number than the number of available Tasks, it will be impossible to perform clustering because not all Tasks can be included. This method is especially useful for balancing workloads when the number of available Drivers is not fixed.
K-Means (Deterministic) – This approach applies the standard K-Means algorithm, which can encounter local-minimum issues. However, because it’s deterministic, running it multiple times on the same dataset will always produce identical results.
Distance
This process uses a single algorithm, and the number of clusters depends entirely on the set distance threshold and the geographical spread of the points.
Start Location Type
Clustering can also be based on the custom Driver start locations or Depots. To create clusters, at least two distinct location inputs (either driver start locations or depot locations) are necessary.
Cluster Actions
Clusters are interactable, meaning they can be broken down or combined.
To join clusters, drag and drop one cluster onto another, or press Shift and click on the desired cluster to split it. The split will be based on Task vicinity.
Task selection also works here, so you can select any Task and drag it to a desired cluster. Press Ctrl + Shift to select the Task (or Tasks) you want to join into a specific cluster and drag them onto that cluster.
In some cases, you might want to join specific Tasks from one cluster to another without merging the two clusters. In that case, you can select those Tasks by pressing Ctrl + clicking on the Tasks you want to move into another cluster, then grabbing the Tasks and dragging and dropping them onto the new cluster.
This will automatically break down the original cluster into two halves without merging them.
💡 Pro tip
Cluster keyboard shortcuts:
Shift + Click - Breaks the cluster in half.
Ctrl + Shift + Mouse drag - Rectangular selection.
Alt + Click - Polygon selection.
Ctrl + Click - Select specific points (Tasks).
Optimization
Once you've set up your clusters, you can run the optimization. The engine will take into account all our presets regarding clustering, as well as other constraints, and run the optimization.
It is important to note that this feature is available on both engines.
Additional options
Once you generate clusters, before optimizing, you can view basic data such as the number of Tasks associated with each cluster, the total service duration for each cluster, and the total dimension sum for all Tasks in each cluster.
It's also possible to assign one or more Drivers to a specific cluster by selecting them and dragging and dropping them into the desired cluster on the list. This will also prompt a custom optimization dialogue, allowing you to customize each assignment. Once you're happy with your optimization setup, click Optimize.