# Methodology

## Ordinary Differential Equations (ODEs) as an analytical tool

ODEs are an established method of representing chemical kinetics [1]. Smooth, continuous time evolution is a very important feature when modelling chemical reactions, and differential equations make it easy to represent this type of behaviour.

Differential equations describe the change in quantity of a particular variable over time. The rate of change of a variable 'A' can be a function of several variables and constants, and can even depend on the current quantity of A itself. By 'coupling' differential equations (i.e. having multiple equations that depend on each other) one can fully describe complex processes, and apply tools from nonlinear dynamics to find useful solutions.

## Numerical schemes for solving ODEs

MATLAB uses a version of the explicit Runge-Kutta(4,5) formula for approximating the solution to a differential equation using numerical methods [2] . This is generally referred to as the ODE45 scheme by users of MATLAB. ODE45 is a quick and relatively computationally cheap way of processing ODEs as it works using only the immediately preceding time step. It can approximate solutions for non-stiff problems to a decent level of accuracy. Since MATLAB uses ODE45 as its default solver, BSim also adopted ODE45. This helps to keep both programs consistent and compatible.

## MATLAB or BSim?

BSim was developed as an agent-based modelling tool, which means that ODE handling was always a secondary function. For analysing single systems of ODEs, MATLAB is more appropriate. This is because MATLAB has many more plotting tools available, and can produce data faster than BSim. However, when analysing population-level behaviour (i.e. many bacteria each running slightly different ODEs), BSim is a far more appropriate tool. BSim produces its results in the form of CSV files. These can easily be exported to MATLAB or Microsoft Excel (or similar products) to make use of their plotting tools.

## References

 [1] Alon, Uri An Introduction to Systems Biology: Design Principles of Biological Circuits. London : Chapman & Hall, 2006. [2] MathWorks MATLAB ODE45