ecell4
ecell4 copied to clipboard
Mathematical functions in rate laws cannot be pre-defined
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.
This seems because numpy.exp(X) tries to return X.exp() without checking the type of X.