GSoC Week 11

Last week, I mainly worked on passing the current failing stochastic tests and ran Travis CI successfully. With this, we also started working on refactoring the SBMLinterpreter class, which has become quite a big class doing many things. Here is the quick summary of the updates from the weekly meeting with the work updates:


  • In the meeting, we mainly discussed the failing stochastic tests. We decided to work on them and check whether the results were converging towards the pre-defined results on increasing the number of simulations or not. If they don't, then it was for sure that there is some issue in the implementation.

  • So, I started working on that, and the small issue I found was that while comparing with the pre-defined results, the wrong column was considered from the pre-defined results, which made some tests fail. It is fixed now through this commit.

  • After this, on further checking, we saw that some of the tests were like failing all the time regardless of the number of simulations. And, these models contained events, so it directly pointed out that there was some issue in the events.

  • And finally, I got that there was an issue in triggering the events. The ASTNodeInterpreter calculating the trigger condition's value didn't get the correct value, which resulted in wrong outputs. As time was taken from the SBMLValueHolder, we had to update the simulator's time value to the SBMLValueHolder. On updating this, the issue got resolved (Commit Links - [1] [2]).

  • After all these updates, 36 out of 39 were passing successfully (sometimes failing because of stochasticity). For the occasionally failing problem of tests, there was an issue of Travis CI failing. So, we decided to store the seeds of all the test cases when they passed and use it for further simulation so that the test cases can pass successfully. I collected the seeds of all the 36 test cases and stored them in the stochasticSeeds array in the StochasticTestSuiteTest file. With this, the tests started passing, and the three failing tests were skipped currently till the new features are added to SBSCL.

  • On solving the above issues and some other issues of Gnuplot (Fix Link), the Travis CI now passes successfully (at the fern branch of the forked repository).

  • After this, now we decided to start working on adding new features like support for rules, species without substance units, etc., in SBSCL. But, mentors suggested first to refactor the SBMLinterpreter class instead and make it a central class for interpreting models for both the semantic and stochastic simulations.

  • I have currently separated SBMLinterpreter into EquationSystem (an abstract class) and SBMLinterpreter (extending the EquationSystem). EquationSystem contains all the initializations of the model, and SBMLinterpreter contains all the required methods for processing. This made the SBMLinterpreter class shorter, and more explanatory while also will help to make updates in the initialization without interfering with the processing part and vice-versa. Also, currently, SBMLinterpreter was like doing everything which even made quite cumbersome on making any updates to it. The current updates of the refactoring SBML can be found at the refactor-interpreter branch at my forked repository.


These were the main contributions that I made to SBSCL last week that now makes it a fully-fledged simulation library. Complete updates can be found at the refactor-interpreter branch, while the stochastic simulation updates can be found at the fern branch. Thanks for giving the read😊, stay tuned for further updates😉!


Regards!

Comments

Popular posts from this blog

GSoC Week 10

Starting Google Summer of Code 2020