Team:Paris/Modeling/modele

From 2008.igem.org

Revision as of 15:43, 8 August 2008 by YannLC (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To go back to the previous page : Clic here.


function dx = modele(t,x)

function dx = modele(t,x)

% This function defines the ordinary differential equations that provides

% a large scale description of our system.

%

% CALL: [dx] = modele(t, x)

% t = scalar value, time

% x = vector representing the concentrations of the genes ( 5 genes )

% dx = derivative of the concentrations

%

% This function uses the following formalism dx=x'=f(x)

%

% nombre cellules

global Ncell

global Next

global B

global b

global R

global D

global O

global g

%% Auxilliary Functions, describing a decreasing step function

%cell1

function xs = f(x)

T(1)=noise(10);

Pa(1)=noise(10);

if x>T(1)

xs=0;

else

xs=Pa(1);

end

end

%% Ordinary Differential Equations

% calc intermediate sum

y = 0;

for k=1:Ncell

y = y + (D(2,k))*(x(5+8*(k-1)) - x(Next));

end

x=max(x,0);

for k=1:Ncell

% int cells

dx(1+8*(k-1)) = -(g(1+8*(k-1)))*x(1+8*(k-1)) + (B(1,k))*x(8+8*(k-1)) + (b(1,k))*x(1+8*(k-1)) ; %% fliA

dx(2+8*(k-1)) = -(g(2+8*(k-1)))*x(2+8*(k-1)) + (B(2,k))*x(8+8*(k-1)) + (b(2,k))*x(1+8*(k-1)) ; %% fliL

dx(3+8*(k-1)) = -(g(3+8*(k-1)))*x(3+8*(k-1)) + (B(3,k))*x(8+8*(k-1)) + (b(3,k))*x(1+8*(k-1)) ; %% flgA

dx(4+8*(k-1)) = -(g(4+8*(k-1)))*x(4+8*(k-1)) + (B(4,k))*x(8+8*(k-1)) + (b(4,k))*x(1+8*(k-1)) ; %% flhB

dx(5+8*(k-1)) = -(g(5+8*(k-1)))*x(5+8*(k-1)) + (B(5,k))*x(4+8*(k-1)) - (D(1,k))*(x(5+8*(k-1)) - x(Next)) ; %% HSL int

dx(6+8*(k-1)) = -(g(6+8*(k-1)))*x(6+8*(k-1)) + ((R(k))*x(5+8*(k-1)))/(1 + x(5+8*(k-1))) ; %% tetR mRNA

dx(7+8*(k-1)) = (O(k))*(x(6+8*(k-1)) - x(7+8*(k-1))) ; %% tetR

dx(8+8*(k-1)) = - (g(8+8*(k-1)))*x(8+8*(k-1)) + f(x(7+8*(k-1))); %% flhDC

end

%% Outside of the cells

dx(Next)= -(g(Next))*x(Next) + y; %% HSL ext

dx=dx(:);

end