ecell4 icon indicating copy to clipboard operation
ecell4 copied to clipboard

Mathematical functions in rate laws cannot be pre-defined

Open kaizu opened this issue 9 years ago • 1 comments

from numpy import exp
from ecell4 import *

with reaction_rules():
    A > B | exp(A) * A

m = get_model()
print([rr.as_string() for rr in m.reaction_rules()])

must show ['A+A.exp>B+A.exp|(A.exp*A)']. Without the first line, it will show ['A>B|(exp(A)*A)']. This is not wrong, but confusing.

kaizu avatar Feb 08 '16 02:02 kaizu

This seems because numpy.exp(X) tries to return X.exp() without checking the type of X.

kaizu avatar May 10 '16 09:05 kaizu