Cluster2 
Top Previous Next 
This function solves the problem of clustering customers (with weights defined through demands property), so total distance between cluster center and customers is minimized.
Cost is defined through a matrix, which can be calculated by TCalc.Matrix, TCalc.MatrixDyn, TNetwork.Matrix, TNetwork.MatrixDyn or on your own.
If Demand parameter is nil (not set), the algorithm assumes 1 for all customers.
You can also call the function with NCluster = 1, if you just want to find the weighted center.
The function do not return any values, but populates these properties:
•Property Assignment holds a number in the range 0 .. NCluster1 about the cluster ID. •Property Center holds information about which customer is the center of the cluster.
Sample calculation time:
Syntax: Cluster2(NCluster: integer);
