Research Article

Optimal BESS Sizing for Industrial Facilities Participating in RTP DR

Algorithm 1

k-means algorithm.
(1)Specify the number of k clusters to assign.
(2)Randomly initialize k centroids.
(3)repeat
(4)expectation: Assign each point to its closest centroid.
(5)  maximization: Compute the new centroid (mean) of each cluster.
(6)until The centroid positions do not change.