//
// TODO : if a function need an other function that in turn need an other function, the generated model will be invalid
// with the current code
for (String functionDefinitionId : relatedFunctionsIdSet) {
FunctionDefinition func = model.getFunctionDefinition(functionDefinitionId);
getRelatedFunctionsId(relatedFunctionsIdSet, allFunctionsIdSet, func.getMath());
}
for (String functionDefinitionId : relatedFunctionsIdSet) {
subModel.addFunctionDefinition(model.getFunctionDefinition(functionDefinitionId).clone());
}