// One port for each state variable.
for (int k = 0; k < n; k++) {
TypedIOPort port = new TypedIOPort(equations[i], states[k],
true, false);
port.setTypeEquals(BaseType.DOUBLE);
port.link(stateRelations[k]);
}
// One port for each input variable.
for (int k = 0; k < m; k++) {
TypedIOPort port = new TypedIOPort(equations[i], inputs[k],