|Top Previous Next|
Demand should be a much smaller number than sCapacity. Otherwise the algorithm isn't very good at finding a solution.
If Demand parameter is nil (not set), the algorithm assumes 1 for all customers. See also Swap.
The function returns number of clusters. Property Center holds information about which customer is the center of the cluster.
Sample calculation time (demand = 1 for all customers):
With 50000 customers the matrix has reached a size of 10 GB - to give an indication of the largest instances that can be handled.
On win32 the limit is appr. 25000 customers.
Syntax: Cluster1(sCapacity: TCost): integer;
This is an example with 1000 customers and 10 clusters. Clusters are here highlighted as polygons: