Skip to main content

Week 4

 

Progress this Week

This week I worked implemented the Euler method in the simulator, along with some helper functions in the parsers. 

The SBML parser now provides a .assignments() method on an SBML model, which returns initial values of all parameters, species and compartments in a HashMap. This hashmap can then be passed to the MathML parser's evaluate_node() function, in order to evaluate an AST node.

The sbml-sim package then simulates the model using the euler_integrator() method. The simulator can be executed as follows: 

    
    cargo run <path to model>


And produces results like the following:

  
   t S1 S2 S3
    0.00 0.0001000 0.0002000 0.0001000     0.10 0.0001050 0.0002025 0.0000975     0.20 0.0001098 0.0002049 0.0000951     0.30 0.0001145 0.0002073 0.0000927     0.40 0.0001191 0.0002096 0.0000904


I have compared the results of the first 24 models of the core semantic SBML test suite with their expected results and they match up with an absolute error of 0.006. The accuracy is expected to go up with the implementation of better numerical integration methods in the coming weeks.

Progress so Far

According to the proposed timeline, the Euler integrator was supposed to be implemented last week but due to delays with the parser, the timeline has shifted slightly, as explained last week. This week, however, I'm planning to implement the Runge-Kutta method and if that is done by the end of the week, I'll be back on track with the timeline.

Plan for the Coming Week

Implementing the Runge-Kutta numerical integration method.

Comments