def rmgen(self, idx):
        """
        Remove the static generators if their dynamic models exist

        Parameters
        ----------
        idx : list
            A list of static generator idx
        Returns
        -------
        None
        """
        stagens = []
        for device, stagen in zip(self.devman.devices, self.call.stagen):
            if stagen:
                stagens.append(device)
        for gen in idx:
            for stagen in stagens:
                if gen in self.__dict__[stagen].uid.keys():
                    self.__dict__[stagen].disable_gen(gen)