Example #1
0
 def mathForBioParkinCpp(self, idsToReplace=None):
     '''
     Creates and uses an AstConverter (with the BioParkinCppAstConverterTemplate) to
     convert the libsbml ASTNode into an PARKINcpp Expression object.
     '''
     astConverter = AstConverter(BioParkinCppAstConverterTemplate(), mainModel=self.mainModel, idsToReplace=idsToReplace)
     return astConverter.handle(self.mathNode)
Example #2
0
    def mathForBioParkinCpp(self, idsToReplace=None):
        """
        Creates and uses an AstConverter (with the BioParkinCppAstConverterTemplate) to
        convert the libsbml ASTNode into an PARKINcpp Expression object.
        """
        if self.localParams:
            if not idsToReplace:
                idsToReplace = {}
            for param in self.localParams:
                idsToReplace[param.getId()] = Expression(self.getCombinedId(param))


        astConverter = AstConverter(BioParkinCppAstConverterTemplate(), mainModel=self.mainModel, idsToReplace=idsToReplace)
        return astConverter.handle(self.kineticLaw.getMath())
Example #3
0
    def mathForBioParkinCpp(self, idsToReplace=None):
        """
        Creates and uses an AstConverter (with the BioParkinCppAstConverterTemplate) to
        convert the libsbml ASTNode into an PARKINcpp Expression object.
        """
        if self.localParams:
            if not idsToReplace:
                idsToReplace = {}
            for param in self.localParams:
                idsToReplace[param.getId()] = Expression(
                    self.getCombinedId(param))

        astConverter = AstConverter(BioParkinCppAstConverterTemplate(),
                                    mainModel=self.mainModel,
                                    idsToReplace=idsToReplace)
        return astConverter.handle(self.kineticLaw.getMath())