throw new IllegalActionException(this, container,
"IORelation can only be contained by CompositeActor.");
}
// Invalidate schedule and type resolution of the old container.
Nameable oldContainer = getContainer();
if (oldContainer instanceof CompositeActor) {
Director director = ((CompositeActor) oldContainer).getDirector();
if (director != null) {