if ((rulesIds != null) && (rulesIds.length > 0)) {
for (String ruleId : rulesIds) {
for (Rule modelRule : model.getListOfRules()) {
if (modelRule.getMetaId().equals(ruleId)) {
subModel.addRule(modelRule.clone());
if (modelRule.getMath() != null) {
getRelatedFunctionsId(relatedFunctionsIdSet, allFunctionsIdSet, modelRule.getMath());
// TODO: analyze the math to add missing Species, ...
}
}