// Connect the corresponding ports of both actors.
IOPort matchingPort = (IOPort) clone.getPort(port.getName());
IORelation relation = (IORelation) newRelation("r_" + i++);
port.link(relation);
matchingPort.link(relation);
if (port.isMultiport()) {
relation.setWidth(port.getWidth());
}
}