def add_to_ps(self):
        """
        Add the current Pareto optimal set (POS) to the Pareto set (PS) with individual keys.
        """

        PS_counter = 0

        for individual in self.opt:

            if isinstance(individual.X, list):
                individual.X = np.asarray(individual.X)

            centroid = self.calculate_cluster_centroid(individual.X)

            self.ps[str(PS_counter) + "-" + str(self.t)] = {
                "solutions": [individual.X.tolist()],
                "centroid": centroid,
            }

            PS_counter += 1

        Add the current Pareto optimal set (POS) to the Pareto set (PS) with individual keys.
        
pymoo/algorithms/moo/kgb.py