Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 2ae0d11a authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

Bench Binomialisation (nom peu parlant)

parent 5326fe84
%% Cell type:markdown id: tags:
Biocham 4.4.9
Copyright (C) 2003-2020 Inria, EPI Lifeware, Saclay-Île de France, France,
license GNU GPL 2, http://lifeware.inria.fr/biocham4/
%% Cell type:markdown id: tags:
Biocham 4.4.9
Copyright (C) 2003-2020 Inria, EPI Lifeware, Saclay-Île de France, France,
license GNU GPL 2, http://lifeware.inria.fr/biocham4/
%% Cell type:markdown id: tags:
Biocham 4.4.9
Copyright (C) 2003-2020 Inria, EPI Lifeware, Saclay-Île de France, France,
license GNU GPL 2, http://lifeware.inria.fr/biocham4/
%% Cell type:markdown id: tags:
# Benchmark: Binomial Transformation
%% Cell type:markdown id: tags:
## Options and settings
%% Cell type:code id: tags:
```
prolog(set_prolog_flag(stack_limit, 4_294_967_296)).
option(binomial_reduction:sat_species).
```
%% Cell type:markdown id: tags:
# Circular
Circular PODE with 2 variables as described here are of the form:
$$dx/dt = y^k \\ dy/dt = x^k$$
%% Cell type:markdown id: tags:
## Circular 2,3
%% Cell type:code id: tags:
```
compile_from_pivp((1.0, d(x)/dt = y^3);(1.0, d(y)/dt = x^3), x).
list_model.
```
%%%% Output: execute_result
14
MA(1) for x+x2=>y+x+x2.
2*xy*x2 for xy+x2=>y2+xy+x2.
MA(1) for y+y2=>x+y+y2.
MA(1) for 2*y2=>xy+2*y2.
MA(1) for 2*x2=>xy+2*x2.
2*y2*xy for y2+xy=>x2+y2+xy.
present(y,1.0).
present(y2,1.0).
present(x,1.0).
present(xy,1.0).
present(x2,1.0).
%% Cell type:markdown id: tags:
## Circular 2,4
%% Cell type:code id: tags:
```
compile_from_pivp((1.0, d(x)/dt = y^4);(1.0, d(y)/dt = x^4), x).
list_model.
```
%%%% Output: execute_result
23
MA(1) for x+x3=>y+x+x3.
3*xy2*x3 for xy2+x3=>y3+xy2+x3.
MA(1) for y+y3=>x+y+y3.
MA(1) for 2*y3=>xy2+2*y3.
2*x2y*x3 for x2y+x3=>xy2+x2y+x3.
2*y3*xy2 for y3+xy2=>x2y+y3+xy2.
MA(1) for 2*x3=>x2y+2*x3.
3*y3*x2y for y3+x2y=>x3+y3+x2y.
present(y,1.0).
present(y3,1.0).
present(x,1.0).
present(xy2,1.0).
present(x2y,1.0).
present(x3,1.0).
%% Cell type:markdown id: tags:
## Circular 2,5
%% Cell type:code id: tags:
```
compile_from_pivp((1.0, d(x)/dt = y^5);(1.0, d(y)/dt = x^5), x).
list_model.
```
%%%% Output: execute_result
34
MA(1) for x+x4=>y+x+x4.
4*xy3*x4 for xy3+x4=>y4+xy3+x4.
MA(1) for y+y4=>x+y+y4.
MA(1) for 2*y4=>xy3+2*y4.
3*x3y^2 for 2*x3y=>xy3+2*x3y.
3*xy3^2 for 2*xy3=>x3y+2*xy3.
MA(1) for 2*x4=>x3y+2*x4.
4*y4*x3y for y4+x3y=>x4+y4+x3y.
present(y,1.0).
present(y4,1.0).
present(x,1.0).
present(xy3,1.0).
present(x3y,1.0).
present(x4,1.0).
%% Cell type:markdown id: tags:
## Circular 2,6
%% Cell type:code id: tags:
```
compile_from_pivp((1.0, d(x)/dt = y^6);(1.0, d(y)/dt = x^6), x).
list_model.
```
%%%% Output: execute_result
47
MA(1) for x+x5=>y+x+x5.
5*xy4*x5 for xy4+x5=>y5+xy4+x5.
MA(1) for y+y5=>x+y+y5.
MA(1) for 2*y5=>xy4+2*y5.
4*x3y2*x4y for x3y2+x4y=>xy4+x3y2+x4y.
3*xy4^2 for 2*xy4=>x3y2+2*xy4.
2*x4y*x5 for x4y+x5=>x3y2+x4y+x5.
4*y5*x3y2 for y5+x3y2=>x4y+y5+x3y2.
MA(1) for 2*x5=>x4y+2*x5.
5*y5*x4y for y5+x4y=>x5+y5+x4y.
present(y,1.0).
present(y5,1.0).
present(x,1.0).
present(xy4,1.0).
present(x3y2,1.0).
present(x4y,1.0).
present(x5,1.0).
%% Cell type:markdown id: tags:
## Hard 3
$$ \frac{da}{dt} = c^3+a^2 b^2 c^3 \\
\frac{db}{dt} = a^2 \\
\frac{dc}{dt} = b^2 $$
%% Cell type:code id: tags:
```
compile_from_pivp((1.0, d(a)/dt = c^3+a^2*b^2*c^3);
(1.0, d(b)/dt = a^2);
(1.0, d(c)/dt = b^2), a).
list_model.
```
%%%% Output: execute_result
34
MA(1) for b2=>c+b2.
3*c*b2c for c+b2c=>c3+c+b2c.
MA(1) for a2=>b+a2.
2*a2b for a2b=>b2+a2b.
MA(1) for 2*b2=>b2c+2*b2.
2*c*a2b for c+a2b=>b2c+c+a2b.
3*b2c^2 for 2*b2c=>b2c3+2*b2c.
2*c3*a2b for c3+a2b=>b2c3+c3+a2b.
MA(1) for c3=>a+c3.
MA(1) for b2c3+a2=>a+b2c3+a2.
MA(1) for c+c3=>ac+c+c3.
MA(1) for ab2=>ac+ab2.
MA(1) for ac+ab2c3=>2*ac+ab2c3.
MA(1) for 2*c3=>ac3+2*c3.
3*c*ab2c for c+ab2c=>ac3+c+ab2c.
MA(1) for ac3+ab2c3=>2*ac3+ab2c3.
MA(1) for b2c3=>ab2+b2c3.
MA(1) for ab2+ab2c3=>2*ab2+ab2c3.
2*a*a2b for a+a2b=>ab2+a+a2b.
MA(1) for c+b2c3=>ab2c+c+b2c3.
MA(1) for b2+ab2=>ab2c+b2+ab2.
MA(1) for ab2c+ab2c3=>2*ab2c+ab2c3.
2*ac*a2b for ac+a2b=>ab2c+ac+a2b.
MA(1) for c3+b2c3=>ab2c3+c3+b2c3.
3*b2c*ab2c for b2c+ab2c=>ab2c3+b2c+ab2c.
MA(1) for 2*ab2c3=>3*ab2c3.
2*ac3*a2b for ac3+a2b=>ab2c3+ac3+a2b.
2*ac3 for ac3=>a2+ac3.
2*ab2c3*a2 for ab2c3+a2=>2*a2+ab2c3.
2*b*ac3 for b+ac3=>a2b+b+ac3.
2*ab2c3*a2b for ab2c3+a2b=>2*a2b+ab2c3.
MA(1) for 2*a2=>a2b+2*a2.
present(c,1.0).
present(c3,1.0).
present(b,1.0).
present(b2,1.0).
present(b2c,1.0).
present(b2c3,1.0).
present(a,1.0).
present(ac,1.0).
present(ac3,1.0).
present(ab2,1.0).
present(ab2c,1.0).
present(ab2c3,1.0).
present(a2,1.0).
present(a2b,1.0).
%% Cell type:markdown id: tags:
## Hard 4
$$ \frac{da}{dt} = c^4+a^2 b^2 c^3 \\
\frac{db}{dt} = a^2 \\
\frac{dc}{dt} = b^2 $$
%% Cell type:code id: tags:
```
compile_from_pivp((1.0, d(a)/dt = c^4+a^2*b^2*c^3);
(1.0, d(b)/dt = a^2);
(1.0, d(c)/dt = b^2), a).
list_model.
```
%%%% Output: execute_result
43
MA(1) for b2=>c+b2.
3*b2c2 for b2c2=>c3+b2c2.
4*c*b2c2 for c+b2c2=>c4+c+b2c2.
MA(1) for a2=>b+a2.
3*b*b2c2 for b+b2c2=>bc3+b+b2c2.
MA(1) for c+a2c2=>bc3+c+a2c2.
4*bc3*b2 for bc3+b2=>bc4+bc3+b2.
MA(1) for c4+a2=>bc4+c4+a2.
2*a2b for a2b=>b2+a2b.
MA(1) for 2*b2=>b2c+2*b2.
2*c*a2b for c+a2b=>b2c+c+a2b.
2*b2*b2c for b2+b2c=>b2c2+b2+b2c.
2*b*a2c2 for b+a2c2=>b2c2+b+a2c2.
MA(1) for c4=>a+c4.
MA(1) for bc3+a2b=>a+bc3+a2b.
MA(1) for c3+c4=>ac3+c3+c4.
3*b2c2*a for b2c2+a=>ac3+b2c2+a.
MA(1) for ac3+ab2c3=>2*ac3+ab2c3.
MA(1) for c3+b2c=>ab2+c3+b2c.
MA(1) for ab2+ab2c3=>2*ab2+ab2c3.
2*a*a2b for a+a2b=>ab2+a+a2b.
MA(1) for bc3+bc4=>ab2c3+bc3+bc4.
3*b2c2*ab2 for b2c2+ab2=>ab2c3+b2c2+ab2.
MA(1) for 2*ab2c3=>3*ab2c3.
2*ac3*a2b for ac3+a2b=>ab2c3+ac3+a2b.
2*c*ac3 for c+ac3=>a2+c+ac3.
2*ab2c3*a2 for ab2c3+a2=>2*a2+ab2c3.
2*c3*ac3 for c3+ac3=>a2c2+c3+ac3.
2*b2c*a2 for b2c+a2=>a2c2+b2c+a2.
2*ab2c3*a2c2 for ab2c3+a2c2=>2*a2c2+ab2c3.
2*bc4*a for bc4+a=>a2b+bc4+a.
2*ab2c3*a2b for ab2c3+a2b=>2*a2b+ab2c3.
MA(1) for 2*a2=>a2b+2*a2.
present(c,1.0).
present(c3,1.0).
present(c4,1.0).
present(b,1.0).
present(bc3,1.0).
present(bc4,1.0).
present(b2,1.0).
present(b2c,1.0).
present(b2c2,1.0).
present(a,1.0).
present(ac3,1.0).
present(ab2,1.0).
present(ab2c3,1.0).
present(a2,1.0).
present(a2c2,1.0).
present(a2b,1.0).
%% Cell type:markdown id: tags:
# Hill functions
The hill function of order $k$ is described with the PODE of three variables:
$$ \frac{dh}{dt} = k i^2 t^{k-1},\\
\frac{di}{dt} = -k i^2 t^{k-1},\\
\frac{dt}{dt} = 1.$$
Note that the third species is a proxy to use the time as an explicit variable.
%% Cell type:markdown id: tags:
## Hill 2
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 2*i^2*t^1);
(1.0, d(i)/dt = -2*i^2*t^1);
(0.0, d(t)/dt = 1.0), h).
list_model.
list_molecules.
```
%%%% Output: execute_result
5
2*i*it for i+it=>h+i+it.
2*i*it for i+it=>it.
1*i for i=>it+i.
2*it^2 for 2*it=>it.
present(i,1.0).
%% Cell type:markdown id: tags:
## Hill 2 (input)
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 2*i^2*t^1);
(1.0, d(i)/dt = -2*i^2*t^1);
(0.0, d(t)/dt = 1.0), x, h).
list_model.
list_molecules.
```
%%%% Output: execute_result
11
2*i*itx for i+itx=>h+i+itx.
MA(1) for x=>_.
2*i*itx for i+itx=>itx.
MA(1) for ix=>_.
2*ix*itx for ix+itx=>itx.
1*x*ix for x+ix=>itx+x+ix.
MA(1) for itx=>_.
2*itx^2 for 2*itx=>itx.
present(x,input).
present(i,1.0).
present(ix,input).
parameter(
input = 1.0
).
[0] i
[1] itx
[2] h
[3] x
[4] ix
%% Cell type:markdown id: tags:
## Hill 3
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 3*i^2*t^2);
(1.0, d(i)/dt = -3*i^2*t^2);
(0.0, d(t)/dt = 1.0), h).
list_model.
list_molecules.
```
%%%% Output: execute_result
8
3*i*it2 for i+it2=>h+i+it2.
3*i*it2 for i+it2=>it2.
1*i for i=>it+i.
3*it*it2 for it+it2=>it2.
2*it for it=>it2+it.
3*it2^2 for 2*it2=>it2.
present(i,1.0).
[0] i
[1] it2
[2] h
[3] it
%% Cell type:markdown id: tags:
## Hill 3 (input)
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 3*i^2*t^2);
(1.0, d(i)/dt = -3*i^2*t^2);
(0.0, d(t)/dt = 1.0), x, h).
list_model.
list_molecules.
```
%%%% Output: execute_result
17
3*i*it2x for i+it2x=>h+i+it2x.
MA(1) for x=>_.
3*i*it2x for i+it2x=>it2x.
MA(1) for ix=>_.
3*ix*it2x for ix+it2x=>it2x.
1*x*ix for x+ix=>itx+x+ix.
MA(1) for itx=>_.
3*itx*it2x for itx+it2x=>it2x.
2*x*itx for x+itx=>it2x+x+itx.
MA(1) for it2x=>_.
3*it2x^2 for 2*it2x=>it2x.
present(x,input).
present(i,1.0).
present(ix,input).
parameter(
input = 1.0
).
[0] i
[1] it2x
[2] h
[3] x
[4] ix
[5] itx
%% Cell type:markdown id: tags:
## Hill 4
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 4*i^2*t^3);
(1.0, d(i)/dt = -4*i^2*t^3);
(0.0, d(t)/dt = 1.0), h).
list_model.
list_molecules.
```
%%%% Output: execute_result
11
4*i*it3 for i+it3=>h+i+it3.
MA(1) for _=>t.
4*i*it3 for i+it3=>it3.
2*t*i for t+i=>it2+t+i.
4*it2*it3 for it2+it3=>it3.
3*it2 for it2=>it3+it2.
4*it3^2 for 2*it3=>it3.
present(i,1.0).
[0] i
[1] it3
[2] h
[3] t
[4] it2
%% Cell type:markdown id: tags:
## Hill 4 (input)
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 4*i^2*t^3);
(1.0, d(i)/dt = -4*i^2*t^3);
(0.0, d(t)/dt = 1.0), x, h).
list_model.
list_molecules.
```
%%%% Output: execute_result
23
4*i*it3x for i+it3x=>h+i+it3x.
MA(1) for x=>_.
1*x^2 for 2*x=>tx+2*x.
MA(1) for tx=>_.
4*i*it3x for i+it3x=>it3x.
MA(1) for ix=>_.
4*ix*it3x for ix+it3x=>it3x.
1*x*ix for x+ix=>itx+x+ix.
MA(1) for itx=>_.
4*itx*it3x for itx+it3x=>it3x.
3*tx*itx for tx+itx=>it3x+tx+itx.
MA(1) for it3x=>_.
4*it3x^2 for 2*it3x=>it3x.
present(x,input).
present(i,1.0).
present(ix,input).
parameter(
input = 1.0
).
[0] i
[1] it3x
[2] h
[3] x
[4] tx
[5] ix
[6] itx
%% Cell type:markdown id: tags:
## Hill 5
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 5*i^2*t^4);
(1.0, d(i)/dt = -5*i^2*t^4);
(0.0, d(t)/dt = 1.0), h).
list_model.
list_molecules.
```
%%%% Output: execute_result
14
5*i*it4 for i+it4=>h+i+it4.
MA(1) for _=>t.
3*t^2 for 2*t=>t3+2*t.
5*i*it4 for i+it4=>it4.
4*t3*i for t3+i=>it4+t3+i.
5*it4^2 for 2*it4=>it4.
present(i,1.0).
[0] i
[1] it4
[2] h
[3] t
[4] t3
%% Cell type:markdown id: tags:
## Hill 5 (input)
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 5*i^2*t^4);
(1.0, d(i)/dt = -5*i^2*t^4);
(0.0, d(t)/dt = 1.0), x, h).
list_model.
list_molecules.
```
%%%% Output: execute_result
29
5*i*it4x for i+it4x=>h+i+it4x.
MA(1) for x=>_.
1*x^2 for 2*x=>tx+2*x.
MA(1) for tx=>_.
3*tx^2 for 2*tx=>t3x+2*tx.
MA(1) for t3x=>_.
5*i*it4x for i+it4x=>it4x.
MA(1) for ix=>_.
5*ix*it4x for ix+it4x=>it4x.
4*t3x*ix for t3x+ix=>it4x+t3x+ix.
MA(1) for it4x=>_.
5*it4x^2 for 2*it4x=>it4x.
present(x,input).
present(i,1.0).
present(ix,input).
parameter(
input = 1.0
).
[0] i
[1] it4x
[2] h
[3] x
[4] tx
[5] t3x
[6] ix
%% Cell type:markdown id: tags:
## Hill 6
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 6*i^2*t^5);
(1.0, d(i)/dt = -6*i^2*t^5);
(0.0, d(t)/dt = 1.0), h).
list_model.
list_molecules.
```
%%%% Output: execute_result
17
6*i*it5 for i+it5=>h+i+it5.
MA(1) for _=>t.
6*i*it5 for i+it5=>it5.
2*t*i for t+i=>it2+t+i.
6*it2*it5 for it2+it5=>it5.
4*t*it2 for t+it2=>it4+t+it2.
6*it4*it5 for it4+it5=>it5.
5*it4 for it4=>it5+it4.
6*it5^2 for 2*it5=>it5.
present(i,1.0).
[0] i
[1] it5
[2] h
[3] t
[4] it2
[5] it4
%% Cell type:markdown id: tags:
## Hill 6 (input)
%% Cell type:code id: tags:
```
compile_from_pivp((0.0, d(h)/dt = 6*i^2*t^5);
(1.0, d(i)/dt = -6*i^2*t^5);
(0.0, d(t)/dt = 1.0), x, h).
list_model.
list_molecules.