import copy from evolalg.repair.repair import Repair class ConstRepair(Repair): def __init__(self, value, excepted_size): super(ConstRepair, self).__init__(excepted_size) self.value = value def generate_new(self, population, missing_count): return copy.deepcopy(self.value)