def name_changed(self, old, new):
        """Change any workflows or delegates that reference the old
        name of an object that has now been changed to a new name.

        old: string
            Original name of the object

        new: string
            New name of the object
        """

        # alert any delegates of the name change
        if hasattr(self, '_delegates_'):
            for dname in self._delegates_:
                inst = getattr(self, dname)
                if isinstance(inst, (HasParameters, HasConstraints,
                                     HasEqConstraints, HasIneqConstraints,
                                     HasObjective, HasObjectives, HasResponses)):
                    inst.name_changed(old, new)

        # update our workflow
        for i, name in enumerate(self.workflow._explicit_names):
            if name == old:
                self.workflow._explicit_names[i] = new

        # force update of workflow full names
        self.workflow.config_changed()
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/driver.py/Driver.name_changed/original