Commit f9213580 authored by Mathieu Hemery's avatar Mathieu Hemery
Browse files

Update cmsb_2020 benchmark

parent 568ac870
%% 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_reactions).
```
%% 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:
```
with_timer(compile_from_pivp((1.0, d(x)/dt = y^3);(1.0, d(y)/dt = x^3), x)).
list_reactions.
list_molecules.
```
%%%% Output: execute_result
14
The previous command takes 96.3223 ms
[0] MA(1.0) for x3=>x3+y
[1] MA(2.0) for x3+y=>x3+y+y2
[2] MA(3.0) for x3+y2=>x3+y2+y3
[3] MA(1.0) for y3=>x+y3
[4] MA(2.0) for x+y3=>x+x2+y3
[5] MA(3.0) for x2+y3=>x2+x3+y3
[0] x3
[1] y
[2] y2
[3] y3
[4] x
[5] x2
%% Cell type:markdown id: tags:
## Circular 2,4
%% Cell type:code id: tags:
```
with_timer(compile_from_pivp((1.0, d(x)/dt = y^4);(1.0, d(y)/dt = x^4), x)).
list_reactions.
list_molecules.
```
%%%% Output: execute_result
23
The previous command takes 130.957 ms
[0] MA(1.0) for x4=>x4+y
[1] MA(2.0) for x4+y=>x4+y+y2
[2] MA(3.0) for x4+y2=>x4+y2+y3
[3] MA(4.0) for x4+y3=>x4+y3+y4
[4] MA(1.0) for y4=>x+y4
[5] MA(2.0) for x+y4=>x+x2+y4
[6] MA(3.0) for x2+y4=>x2+x3+y4
[7] MA(4.0) for x3+y4=>x3+x4+y4
[0] x4
[1] y
[2] y2
[3] y3
[4] y4
[5] x
[6] x2
[7] x3
%% Cell type:markdown id: tags:
## Circular 2,5
%% Cell type:code id: tags:
```
with_timer(compile_from_pivp((1.0, d(x)/dt = y^5);(1.0, d(y)/dt = x^5), x)).
list_reactions.
list_molecules.
```
%%%% Output: execute_result
34
The previous command takes 903.916 ms
[0] MA(1.0) for x+x4=>x+x4+y
[1] MA(4.0) for x4+xy3=>x4+xy3+y4
[2] MA(1.0) for y+y4=>x+y+y4
[3] MA(1.0) for 2*y4=>xy3+2*y4
[4] MA(3.0) for 2*x3y=>xy3+2*x3y
[5] MA(3.0) for 2*xy3=>x3y+2*xy3
[6] MA(1.0) for 2*x4=>x3y+2*x4
[7] MA(4.0) for x3y+y4=>x3y+x4+y4
[0] x
[1] x4
[2] y
[3] xy3
[4] y4
[5] x3y
%% Cell type:markdown id: tags:
## Circular 2,6
%% Cell type:code id: tags:
```
with_timer(compile_from_pivp((1.0, d(x)/dt = y^6);(1.0, d(y)/dt = x^6), x)).
list_reactions.
list_molecules.
```
%%%% Output: execute_result
47
The previous command takes 54118 ms
[0] MA(1.0) for x+x5=>x+x5+y
[1] MA(5.0) for x5+xy4=>x5+xy4+y5
[2] MA(1.0) for y+y5=>x+y+y5
[3] MA(1.0) for 2*y5=>xy4+2*y5
[4] MA(4.0) for x3y2+x4y=>x3y2+x4y+xy4
[5] MA(3.0) for 2*xy4=>x3y2+2*xy4
[6] MA(2.0) for x4y+x5=>x3y2+x4y+x5
[7] MA(4.0) for x3y2+y5=>x3y2+x4y+y5
[8] MA(1.0) for 2*x5=>x4y+2*x5
[9] MA(5.0) for x4y+y5=>x4y+x5+y5
[0] x
[1] x5
[2] y
[3] xy4
[4] y5
[5] x3y2
[6] x4y
%% 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:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
34
The previous command takes 1588.38 ms
[0] MA(1.0) for b2=>b2+c
[1] MA(2.0) for b2c=>b2c+c2
[2] MA(3.0) for b2c2=>b2c2+c3
[3] MA(1.0) for a2=>a2+b
[4] MA(3.0) for b+b2c2=>b+b2c2+bc3
[5] MA(1.0) for a2+c3=>a2+bc3+c3
[6] MA(2.0) for a2b=>a2b+b2
[7] MA(1.0) for 2*b2=>b2c+2*b2
[8] MA(2.0) for a2b+c=>a2b+b2c+c
[9] MA(2.0) for b2+b2c=>b2+b2c+b2c2
[10] MA(2.0) for a2b+c2=>a2b+b2c2+c2
[11] MA(1.0) for c3=>a+c3
[12] MA(1.0) for a2b+bc3=>a+a2b+bc3
[13] MA(1.0) for 2*c3=>ac3+2*c3
[14] MA(3.0) for ab2+c2=>ab2+ac3+c2
[15] MA(1.0) for ab2c3+ac3=>ab2c3+2*ac3
[16] MA(1.0) for b2c2+c=>ab2+b2c2+c
[17] MA(1.0) for ab2+ab2c3=>ab2c3+2*ab2
[18] MA(2.0) for a+a2b=>a+a2b+ab2
[19] MA(1.0) for 2*bc3=>ab2c3+2*bc3
[20] MA(3.0) for ab2+b2c2=>ab2+ab2c3+b2c2
[21] MA(1.0) for 2*ab2c3=>3*ab2c3
[22] MA(2.0) for a2b+ac3=>a2b+ab2c3+ac3
[23] MA(2.0) for ac3=>a2+ac3
[24] MA(2.0) for a2+ab2c3=>ab2c3+2*a2
[25] MA(2.0) for ac3+b=>a2b+ac3+b
[26] MA(2.0) for a2b+ab2c3=>ab2c3+2*a2b
[27] MA(1.0) for 2*a2=>a2b+2*a2
[0] b2
[1] c
[2] b2c
[3] c2
[4] b2c2
[5] c3
[6] a2
[7] b
[8] bc3
[9] a2b
[10] a
[11] ac3
[12] ab2
[13] ab2c3
%% 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:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
43
The previous command takes 29196.3 ms
[0] MA(1.0) for b2=>b2+c
[1] MA(2.0) for b2c=>b2c+c2
[2] MA(3.0) for b2c2=>b2c2+c3
[3] MA(4.0) for b2c3=>b2c3+c4
[4] MA(1.0) for a2=>a2+b
[5] MA(4.0) for b+b2c3=>b+b2c3+bc4
[6] MA(1.0) for a2+c4=>a2+bc4+c4
[7] MA(2.0) for a2b=>a2b+b2
[8] MA(1.0) for 2*b2=>b2c+2*b2
[9] MA(2.0) for a2b+c=>a2b+b2c+c
[10] MA(2.0) for b2+b2c=>b2+b2c+b2c2
[11] MA(2.0) for a2b+c2=>a2b+b2c2+c2
[12] MA(3.0) for b2+b2c2=>b2+b2c2+b2c3
[13] MA(2.0) for a2b+c3=>a2b+b2c3+c3
[14] MA(1.0) for c4=>a+c4
[15] MA(1.0) for a2+b2c3=>a+a2+b2c3
[16] MA(1.0) for c3+c4=>ac3+c3+c4
[17] MA(3.0) for ab2+c2=>ab2+ac3+c2
[18] MA(1.0) for ab2c3+ac3=>ab2c3+2*ac3
[19] MA(1.0) for b2c3+c=>ab2+b2c3+c
[20] MA(1.0) for ab2+ab2c3=>ab2c3+2*ab2
[21] MA(2.0) for a+a2b=>a+a2b+ab2
[22] MA(1.0) for b2c3+c4=>ab2c3+b2c3+c4
[23] MA(3.0) for ab2+b2c2=>ab2+ab2c3+b2c2
[24] MA(1.0) for 2*ab2c3=>3*ab2c3
[25] MA(2.0) for a2b+ac3=>a2b+ab2c3+ac3
[26] MA(2.0) for ac3+c=>a2+ac3+c
[27] MA(2.0) for a2+ab2c3=>ab2c3+2*a2
[28] MA(2.0) for a+bc4=>a+a2b+bc4
[29] MA(2.0) for a2b+ab2c3=>ab2c3+2*a2b
[30] MA(1.0) for 2*a2=>a2b+2*a2
[0] b2
[1] c
[2] b2c
[3] c2
[4] b2c2
[5] c3
[6] b2c3
[7] c4
[8] a2
[9] b
[10] bc4
[11] a2b
[12] a
[13] ac3
[14] ab2
[15] ab2c3
%% 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:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
5
The previous command takes 81.6991 ms
[0] MA(2.0) for i+it=>h+it
[1] MA(1.0) for i=>i+it
[2] MA(2.0) for 2*it=>it
[0] i
[1] it
[2] h
%% Cell type:markdown id: tags:
## Hill 2 (input)
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
11
The previous command takes 85.5587 ms
[0] MA(2.0) for i+itx=>h+itx
[1] MA(1.0) for x=>_
[2] MA(1.0) for ix=>_
[3] MA(2.0) for itx+ix=>itx
[4] MA(1.0) for ix+x=>itx+ix+x
[5] MA(1.0) for itx=>_
[6] MA(2.0) for 2*itx=>itx
[0] i
[1] itx
[2] h
[3] x
[4] ix
%% Cell type:markdown id: tags:
## Hill 3
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
8
The previous command takes 81.023 ms
[0] MA(3.0) for i+it2=>h+it2
[1] MA(1.0) for _=>t
[2] MA(2.0) for i+t=>i+it2+t
[3] MA(3.0) for 2*it2=>it2
[0] i
[1] it2
[2] h
[3] t
%% Cell type:markdown id: tags:
## Hill 3 (input)
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
17
The previous command takes 101.417 ms
[0] MA(3.0) for i+it2x=>h+it2x
[1] MA(1.0) for x=>_
[2] MA(1.0) for 2*x=>tx+2*x
[3] MA(1.0) for tx=>_
[4] MA(1.0) for ix=>_
[5] MA(3.0) for it2x+ix=>it2x
[6] MA(2.0) for ix+tx=>it2x+ix+tx
[7] MA(1.0) for it2x=>_
[8] MA(3.0) for 2*it2x=>it2x
[0] i
[1] it2x
[2] h
[3] x
[4] tx
[5] ix
%% Cell type:markdown id: tags:
## Hill 4
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
11
The previous command takes 86.036 ms
[0] MA(4.0) for i+it3=>h+it3
[1] MA(1.0) for _=>t
[2] MA(2.0) for t=>t+t2
[3] MA(3.0) for i+t2=>i+it3+t2
[4] MA(4.0) for 2*it3=>it3
[0] i
[1] it3
[2] h
[3] t
[4] t2
%% Cell type:markdown id: tags:
## Hill 4 (input)
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
23
The previous command takes 154.526 ms
[0] MA(4.0) for i+it3x=>h+it3x
[1] MA(1.0) for x=>t
[2] MA(1.0) for 2*x=>tx+2*x
[3] MA(1.0) for tx=>_
[4] MA(2.0) for tx+x=>t2x+tx+x
[5] MA(1.0) for t2x=>_
[6] MA(1.0) for ix=>_
[7] MA(4.0) for it3x+ix=>it3x
[8] MA(3.0) for ix+t2x=>it3x+ix+t2x
[9] MA(1.0) for it3x=>_
[10] MA(4.0) for 2*it3x=>it3x
[0] i
[1] it3x
[2] h
[3] x
[4] t
[5] tx
[6] t2x
[7] ix
%% Cell type:markdown id: tags:
## Hill 5
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
14
The previous command takes 90.5654 ms
[0] MA(5.0) for i+it4=>h+it4
[1] MA(1.0) for _=>t
[2] MA(3.0) for 2*t=>t3+2*t
[3] MA(4.0) for i+t3=>i+it4+t3
[4] MA(5.0) for 2*it4=>it4
[0] i
[1] it4
[2] h
[3] t
[4] t3
%% Cell type:markdown id: tags:
## Hill 5 (input)
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
29
The previous command takes 542.729 ms
[0] MA(5.0) for i+it4x=>h+it4x
[1] MA(1.0) for x=>t
[2] MA(1.0) for 2*x=>tx+2*x
[3] MA(1.0) for tx=>_
[4] MA(3.0) for 2*tx=>t3x+2*tx
[5] MA(1.0) for t3x=>_
[6] MA(1.0) for ix=>_
[7] MA(5.0) for it4x+ix=>it4x
[8] MA(4.0) for ix+t3x=>it4x+ix+t3x
[9] MA(1.0) for it4x=>_
[10] MA(5.0) for 2*it4x=>it4x
[0] i
[1] it4x
[2] h
[3] x
[4] t
[5] tx
[6] t3x
[7] ix
%% Cell type:markdown id: tags:
## Hill 6
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
17
The previous command takes 98.6066 ms
[0] MA(6.0) for i+it5=>h+it5
[1] MA(1.0) for _=>t
[2] MA(2.0) for t=>t+t2
[3] MA(4.0) for t+t2=>t+t2+t4
[4] MA(5.0) for i+t4=>i+it5+t4
[5] MA(6.0) for 2*it5=>it5
[0] i
[1] it5
[2] h
[3] t
[4] t2
[5] t4
%% Cell type:markdown id: tags:
## Hill 6 (input)
%% Cell type:code id: tags:
```
with_timer(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_reactions.
list_molecules.
```
%%%% Output: execute_result
35
The previous command takes 3957.06 ms
[0] MA(6.0) for i+it5x=>h+it5x
[1] MA(1.0) for x=>t
[2] MA(1.0) for 2*x=>tx+2*x
[3] MA(1.0) for tx=>_
[4] MA(3.0) for 2*tx=>t3x+2*tx
[5] MA(1.0) for t3x=>_
[6] MA(4.0) for t3x+x=>t3x+t4x+x
[7] MA(1.0) for t4x=>_
[8] MA(1.0) for ix=>_
[9] MA(6.0) for it5x+ix=>it5x
[10] MA(5.0) for ix+t4x=>it5x+ix+t4x
[11] MA(1.0) for it5x=>_
[12] MA(6.0) for 2*it5x=>it5x
[0] i
[1] it5x
[2] h
[3] x
[4] t
[5] tx
[6] t3x
[7] t4x
[8] ix
%% Cell type:markdown id: tags:
## Hill 7