Team:Evry/Programming

From 2013.igem.org

(Difference between revisions)
 
(6 intermediate revisions not shown)
Line 6: Line 6:
<h1>Programming methods</h1>
<h1>Programming methods</h1>
-
This part exposes our technical and algorithmical choices, the implementation and the numerical resolution of our models.<br/>
+
<p>This part exposes our technical and algorithmical choices, the implementation and the numerical resolution of our models.</p>
<h2>Models implementation</h2>
<h2>Models implementation</h2>
-
All our models are using the Python language. Python has several major perks:
+
<p>All our models are using the Python language. Python has several major perks:
<ul>
<ul>
<li>Very good floating numbers management</li>
<li>Very good floating numbers management</li>
Line 16: Line 16:
<li>Not an exclusively numerical tool, which allows much more options than Scilab or Matlab</li>
<li>Not an exclusively numerical tool, which allows much more options than Scilab or Matlab</li>
</ul>
</ul>
 +
</p>
<h2>Numerical resolution of ODEs</h2>
<h2>Numerical resolution of ODEs</h2>
 +
<p>
We chose not to use the resolution functions included in Scipy to have more coding liberties.<br/>
We chose not to use the resolution functions included in Scipy to have more coding liberties.<br/>
To solve our ODEs, we used a simple Euler method. Here is an example:<br/>
To solve our ODEs, we used a simple Euler method. Here is an example:<br/>
 +
Let the following be a Cauchy problem:<br/>
 +
<img src="https://static.igem.org/mediawiki/2013/9/9b/Pro1.png"/><br/>
 +
Considering the following Taylor expansion:<br/>
 +
<img src="https://static.igem.org/mediawiki/2013/1/13/Pro2.png"/><br/>
 +
<img src="https://static.igem.org/mediawiki/2013/c/c2/Pro3.png"/><br/>
 +
Let us define the sequence <img src="https://static.igem.org/mediawiki/2013/1/19/Pro4.png"/> such as <img src="https://static.igem.org/mediawiki/2013/9/9e/Pro5.png"/> and <img src="https://static.igem.org/mediawiki/2013/0/0c/Pro6.png"/><br>
 +
And thus, the sequence <img src="https://static.igem.org/mediawiki/2013/f/f1/Pro7.png"/> such as <img src="https://static.igem.org/mediawiki/2013/d/dc/Pro8.png"/> and <img src="https://static.igem.org/mediawiki/2013/9/9d/Pro9.png"/><br/>
 +
Thus, we can define the Euler method:<br/>
 +
<img src="https://static.igem.org/mediawiki/2013/4/4f/Pro10.png"/><br/>
 +
Which, standardized, becomes <img src="https://static.igem.org/mediawiki/2013/b/b0/Pro11.png"/>.
 +
</p>
 +
<p>
 +
In the end, all our differential equation systems are implemented like so:<br/>
 +
<img src="https://static.igem.org/mediawiki/2013/d/d1/ProSystem.png"/><br/>
 +
where N is the number of equations in the system.<br/>
 +
</p>
 +
<p>
 +
This is how we implemented the equation systems in Python. The fact that we didn't use ODE-solving libraries allowed us to introduce definition domains for some variables, which improved the overall stability in numerical resolutions.<br/>
 +
For a simpler and quicker use of repetitive tasks, we also encapsulated everything in a class scheme.
 +
</p>
-
Soit un le problème de Cauchy suivant :
+
<h2>Flux Balance Analysis</h2>
-
<img src=""/><br/>
+
<p>
 +
</p>
-
On considére le dévellopement limité :
+
<h2>Cellular automaton</h2>
-
<img src=""/><br/>
+
<p>
-
 
-
 
-
On défini la suite <img src=""/> tel que <img src=""/> et <img src=""/>
 
-
et ainsi on définie <img src=""/> tel que <img src=""/> et <img src=""/>
 
-
 
-
Ainsi on peut définir le schéma d'euler :
 
-
<img src=""/><br/>
 
-
 
-
 
-
Ce qui donne en forme standard : <img src=""/>
 
-
Ainsi tout nos systèmes se présentent dans le code sous la forme suivante :
 
-
<img src=""/><br/>
 
-
 
-
où N est le nombre d'équations du système
 
-
 
-
On implémente ainsi les système en python. L’accès au code source de la résolutions numériques nous permet d'introduire des domaines de définitions pour les variables d'états. Ce qui permet d'avoir plus de stabilité dans la résolutions numériques.
 
-
 
-
Le tout est encapsulé dans une classe python pour une utilisation plus simple.
 
-
 
-
 
-
 
-
 
-
<h2>Display</h2>
 
-
<p>
 
-
We used the Matplot library to display 2D and 3D curves.
 
</p>
</p>

Latest revision as of 10:51, 26 October 2013

Iron coli project

Programming methods

This part exposes our technical and algorithmical choices, the implementation and the numerical resolution of our models.

Models implementation

All our models are using the Python language. Python has several major perks:

  • Very good floating numbers management
  • High level programming
  • Object-oriented
  • Not an exclusively numerical tool, which allows much more options than Scilab or Matlab

Numerical resolution of ODEs

We chose not to use the resolution functions included in Scipy to have more coding liberties.
To solve our ODEs, we used a simple Euler method. Here is an example:
Let the following be a Cauchy problem:

Considering the following Taylor expansion:


Let us define the sequence such as and
And thus, the sequence such as and
Thus, we can define the Euler method:

Which, standardized, becomes .

In the end, all our differential equation systems are implemented like so:

where N is the number of equations in the system.

This is how we implemented the equation systems in Python. The fact that we didn't use ODE-solving libraries allowed us to introduce definition domains for some variables, which improved the overall stability in numerical resolutions.
For a simpler and quicker use of repetitive tasks, we also encapsulated everything in a class scheme.

Flux Balance Analysis

Cellular automaton