Skip to main content

Week 6

 

Progress this Week

This week I fixed errors in my implementation of the Runge-Kutta method for the simulator, added support for FunctionDefinitions and ModifierSpeciesReferences in the SBML parser and lambda functions, piecewise functions, operators, constants and conditions in the MathML parser.

Simulator

After comparing results from the Rust simulator with the expected results in the SBML test suite, I realized there was an error in the way I had set up differential equations for the integrator. The models I had tested last week specified amounts for species, while differential equations needed concentrations. Last week's test comprised of models that had compartments with size = 1, which is why I didn't realize the error until I checked the results for model 00021. 

Now the simulator evaluates the differential equations in terms of concentrations, but reports amounts in the result, just as the expected results in the SBML test suite do.

SBML Parser

The SBML parser now supports FunctionDefinitions and ModifierSpeciesReferences. 

MathML Parser

In order to support FunctionDefinitions in SBML, the MathML parser is required to support lambda functions and piecewise functions. Since piecewise functions contain conditions and constants (such as true/false), support for those was required too. I have implemented all these this week and carried out tests as described in the next section.

Testing

Until last week, I had tested the Rust simulator and parsers on the first 25 models in the Core Semantic SBML test suite. However, at the start of the project, I had classified all the tests according to testTags and componentTags in the test suite. Here's a link to the classification. This leads to the models with the lowest complexity. Filters can be seen by clicking on "Filter" on the top right, and other tables can be seen by selecting from the dropdown on the top left.

As half of the project period is now over, I thought it was a good idea to start testing models beyond the first 25, so I have gone through the first half of the classification labelled "No BoundaryCondition" (till model 00196). (Just to clarify, this doesn't mean the simulator doesn't support BoundaryConditions - I have checked that with one of the first 25 models - these tests are just for a more comprehensive evaluation).

By doing this, I realized support for some mathematical operators (like ceiling and factorial) was missing, so I have added that. The "type" attribute on <cn> in MathML was required by the simulator, while MathML specification declares as optional with "real" being the default, so I have fixed that too.

In the coming weeks, I'll test the remaining models and post the results here.

Progress so Far

According to the proposed timeline, the Runge-Kutta integrator was supposed to be implemented in week 5 and had been completed on time. The initial plan was to implement the Runge-Kutta-Fehlberg integrator but last week, in a meeting with project mentors, we decided that the way forward would be to work on SBML constructs, rather than working on more numerical integrators. 

Plan for the Coming Week

  1. I was also supposed to work on InitialAssignments as per the discussion last week, but fixing the RK integrator took more time than expected so I was unable to work on this. I'll do it in the coming week.
  2. Test the remaining models in the "No BoundaryCondition" classification, fix failures, and test some more if possible.

Comments