for (int i = 0; i < ports.length; i++) {
String name = ports[i].getName();
TypedIOPort port = (TypedIOPort) _ptActor.getPort(name);
if (isInput) {
portMap.put(name, new SingleInputPort(name, new DFInputChannel(
port, 0)));
} else {
portMap.put(name, new SingleOutputPort(name,
new DFOutputChannel(port, 0)));
}