Progress this Week
The Runge Kutta Fehlberg integrator was completed last week with help from mentors during our weekly meeting. After that, I started working on Rate Rules.
I also modified the data structure I had built earlier and it's a lot more robust now. Earlier, I was using the parsed model directly from the sbml-rs package. That was a problem because the SBML specification allows various ways to set values for quantities like species. For example, it is possible to assign initial amounts/concentrations to species using the initialAmount or initialConcentration attributes on <species> tags directly, but it's also possible to assign these values using an initialAssignment. Due to this, while parsing the model, the amount field on a species struct is an Option<f64>.
This creates trouble later while simulating because you have to pattern-match at each step. Hence, this week I created similar structs in the sbml-sim package which process the parsed model and create, for example, a species struct where the amount field is an f64, instead of an Option<f64>. This eliminates the need for pattern-matching henceforth.
Later, I worked on rate rules and that's mostly complete now. Rate rules are being parsed and simulated properly and I've verified this with some test cases.
However, certain test cases, where the compartment size is determined by a rate rule, fail. I'll work on this in the coming week.
Progress so Far
As per discussion with my project mentors, we had diverged from the initially proposed timeline. The first half was completed as proposed and the next two weeks were spent in building support for more SBML features instead of the Runge-Kutta-Fehlberg integrator. Work on the RKF integrator was started and completed in week 8. From week 9 onwards, we're working on implementing more features of SBML.
Plan for the Coming Week
* For models where a species can have concentration units, convert occurrences of that species in each AST to (species / compartment). This allows the simulator to use amounts wherever the species appears, regardless of whether it is in terms of amount or concentration.
Comments
Post a Comment