Re: AST_NAME_TIME from libsbml.parseFormula
05 Mar '10 02:08
Just following on from Sarah's email, you might be interested in this code snippet from SBML-shorthand (http://www.staff.ncl.ac.uk/d.j.wilkinson/software/sbml-sh/):
if ((ast.getName()=='t') or (ast.getName()=='time')):
for node in range(ast.getNumChildren()):
--- On Thu, 4/3/10, Jordan Atlas <firstname.lastname@example.org> wrote:
> From: Jordan Atlas <email@example.com>
> Subject: [libsbml-development] AST_NAME_TIME from libsbml.parseFormula
> To: firstname.lastname@example.org
> Date: Thursday, 4 March, 2010, 21:40
> Dear Forum,
> What is the proper way to enter a formula that references
> "time" (i.e. the model simulation time) into libSBML's
> "parseFormula" function?
> When I call libsbml.parseFormula('time') in python the
> resulting AST has type AST_NAME rather than
> AST_NAME_TIME. This is causing an error in the
> resulting SBML validation because the name 'time' is not
> recognized as a species/reaction/parameter/etc.
> I am using libSBML-4.0.0-xerces-vc90 from Python on Windows
> There is a similar problem posted here, but I don't see any
> follow up.
> Thanks for your help.
> --Jordan Atlas
> To manage your libsbml-development list subscription, visit
> For a web interface to the libsbml-development mailing
> list, visit
> For questions or feedback about the libsbml-development
> contact email@example.com
To manage your libsbml-development list subscription, visit
For a web interface to the libsbml-development mailing list, visit
For questions or feedback about the libsbml-development list,
Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)