Clustering for optimization.