Team:Evry/Programming
From 2013.igem.org
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.< | + | <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=""/><br/> | <img src=""/><br/> | ||
- | + | Considering the following Taylor expansion:<br/> | |
- | + | ||
- | + | ||
<img src=""/><br/> | <img src=""/><br/> | ||
- | + | On défini la suite <img src=""/> tel que <img src=""/> et <img src=""/><br> | |
- | + | et ainsi on définie <img src=""/> tel que <img src=""/> et <img src=""/><br/> | |
- | + | Thus, we can define the Euler method:<br/> | |
- | 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=""/> | + | |
- | + | ||
- | + | ||
<img src=""/><br/> | <img src=""/><br/> | ||
- | + | Which, standardized, becomes <img src=""/>. | |
- | + | </p> | |
- | + | <p> | |
- | + | In the end, all our differential equation systems are implemented like so:<br/> | |
<img src=""/><br/> | <img src=""/><br/> | ||
- | + | where N is the number of equations in the system.<br/> | |
- | + | </p> | |
- | + | ||
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. | 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. | ||
Revision as of 23:10, 4 October 2013
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:
On défini la suite tel que et
et ainsi on définie tel que et
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.
Display
We used the Matplot library to display 2D and 3D curves.