Skip to content

Commit

Permalink
Add euler integrator description
Browse files Browse the repository at this point in the history
  • Loading branch information
katekaseth committed Sep 10, 2018
1 parent 7069bfa commit 646ac59
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions wrappers/Python/doc/mod_roadrunner/cls_Integrator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,14 @@ Gillespie

RoadRunner's implementation of the standard Gillespie Direct Method SSA. The granularity of this simulator is individual molecules and kinetic processes are stochastic. Results will, in general, be different in each run, but a sufficiently large ensemble of runs should be statistically correct.

Can be used with the `r.gillespie function <https://libroadrunner.readthedocs.io/en/latest/api_reference.html?highlight=r%20gillespie#RoadRunner.RoadRunner.gillespie/>`_ or by setting integrator to gillespie (see below)

.. attribute:: Integrator.initial_time_step

Specifies the initial time step size. If inappropriate, CVODE will attempt to estimate a better initial time step. Default value is 0.0

>>> r.setIntegrator('gillespie') # set integrator first
>>> r.integrator.seed = '1234'
>>> r.integrator.initial_time_step = 2


.. attribute:: Integrator.maximum_time_step
Expand All @@ -154,11 +155,19 @@ Gillespie

Perform a variable time step simulation. Enabling this setting will allow the integrator to adapt the size of each time step. This will result in a non-uniform time column. Default value is flase.

Euler
-----

The Euler method is one of the simplest approaches to solving a first order ODE. Given the rate of change of function f at time t, it computes the new value of f as ``f(t+h) = f(t) + h*f'(t)``, where h is the time step. Euler's method is rarely used in practice due to poor numerical robustness. Can be used with:

>>> r.setIntegrator('euler')

RK4
---

Runge-Kutta methods are a family of algorithms for solving ODEs. They have considerably better accuracy than the Euler method. This integrator is a standard 4th order Runge-Kutta solver.
Runge-Kutta methods are a family of algorithms for solving ODEs. They have considerably better accuracy than the Euler method. This integrator is a standard 4th order Runge-Kutta solver. Can be used with:

>>> r.setIntegrator('rk4')


RK45
Expand Down

0 comments on commit 646ac59

Please sign in to comment.