PGA/route.py
def delete_mutate(self):
        """
        delete a station in this route if not increase punish
        :return: None
        """
        idx = 0
        while idx < len(self.sequence):
            node = self.sequence[idx]
            if node > custom_number:
                new_sequence = self.sequence.copy()
                new_sequence.pop(idx)
                new_route = Route(g_map=self.g_map, punish=self.punish, sequence=new_sequence)
                if new_route.capacity_punish <= self.capacity_punish:
                    self.sequence.pop(idx)
                    idx -= 1
                    self.refresh_state()
                    del new_route
            idx += 1

        delete a station in this route if not increase punish
        :return: None
        
delete a station in this route if not increase punish
delete a station in this route if not increase punish
def delete_mutate(self):
        idx = 0
        while idx < len(self.sequence):
            node = self.sequence[idx]
            if node > custom_number:
                new_sequence = self.sequence.copy()
                new_sequence.pop(idx)
                new_route = Route(g_map=self.g_map, punish=self.punish, sequence=new_sequence)
                if new_route.capacity_punish <= self.capacity_punish:
                    self.sequence.pop(idx)
                    idx -= 1
                    self.refresh_state()
                    del new_route
            idx += 1
def delete_mutate ( self ) : idx = 0 while idx < len ( self . sequence ) : node = self . sequence [ idx ] if node > custom_number : new_sequence = self . sequence . copy ( ) new_sequence . pop ( idx ) new_route = Route ( g_map = self . g_map , punish = self . punish , sequence = new_sequence ) if new_route . capacity_punish <= self . capacity_punish : self . sequence . pop ( idx ) idx -= 1 self . refresh_state ( ) del new_route idx += 1
delete a station in this route if not increase punish
delete a station in this route if not increase punish
"""
        delete a station in this route if not increase punish
        :return: None
        """
None
self