use of org.jlibsedml.IIdentifiable in project vcell by virtualcell.
the class MathMLValidator method checkFunctions.
private List<SedMLError> checkFunctions() {
List<SedMLError> errors = new ArrayList<SedMLError>();
ASTNode node = mathContainer.getMath();
EvaluationContext cont = new EvaluationContext();
for (IIdentifiable id : mathContainer.getListOfParameters()) {
cont.setValueFor(id.getId(), 0.0);
}
for (IIdentifiable id : mathContainer.getListOfVariables()) {
cont.setValueFor(id.getId(), 0.0);
}
if (!node.canEvaluate(cont)) {
errors.add(new SedMLError(0, "This node [" + node.getName() + "] cannot be evaluated", ERROR_SEVERITY.WARNING));
}
return errors;
}
Aggregations