}
// Create vertices and edges for assignment and rate rules
for (i = 0; i < model.getRuleCount(); i++) {
equation = new InnerNode<SBase>(model.getRule(i));
Rule r = model.getRule(i);
if (r instanceof RateRule) {
equations.add(equation);
variable = variableHash.get(((RateRule) r)
.getVariableInstance());
// link
variable.addNode(equation);
equation.addNode(variable);
}
else if (r instanceof AssignmentRule) {
variable = variableHash.get(((AssignmentRule) r)
.getVariableInstance());
// link
if (variable!=null) {
equations.add(equation);
variable.addNode(equation);
equation.addNode(variable);
}
}
}
// Create vertices and edges for algebraic rules
for (i = 0; i < model.getRuleCount(); i++) {
equation = new InnerNode<SBase>(model.getRule(i));
Rule r = model.getRule(i);
if (r instanceof AlgebraicRule) {
equations.add(equation);
// all identifiers withn the MathML of this AlgebraicRule
svariables.clear();
getVariables(null, model.getRule(i).getMath(), svariables, model.getLevel());