Cluster3

Top  Previous  Next

This function solves the problem of clustering customers, so maximum distance within each cluster between 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.

 

You can also call the function with NCluster = 1.

 

The function do not return any values, but populates these properties:

 

Property Assignment holds a number in the range 0 .. NCluster-1 about the cluster ID.

Property Center holds information about which customer is the center of the cluster.

 

Property

Dimension

Matrix

No of customers x customers

Assignment (output)

No of customers

Center (output)

No of clusters

 

Sample calculation time:

 

Customers

No of clusters

Calculation time (msec)

100

10

~0

1000

1

16

1000

10

47

1000

100

31

10000

10

7031

10000

100

3968

10000

1000

3281

20000

100

19469

20000

1000

13750

 

Syntax: Cluster3(NCluster: integer);