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)
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())
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())