-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type error in SSA after substitution of rates #322
Comments
This seems to have the same root cause as issue #321 and originates in |
Updated notebook showing that it is the equations themselves that are truncated by As a temporary workaround where this bug crops up, constructing models from scratch rather than using |
This seems very likely to be an error in simpy's |
So this is not a Sympy error, but rather an unhandled side effect of substituting in rates that lead to simplification of the equation system (see sympy/sympy#17627) - need to figure out precisely where the logic is that leads to that happening and deal with it... |
Alternatively could use |
Also using |
Having now delved some way down into this I have concluded that this is an error around how The issue for |
N.B. branch |
It seems that all widgets are generated from Line 1713 in 8dcd2c3
In fact, if I print the @jarmarshall , from which variable can I get the rate |
Can you dig around a bit for the best place to take it from? It's definitely in |
@jarmarshall , I think that the only place where to find the missing rate is the stoichiometry... but my stoichiometry parser may fail for special cases which I did not test... hopefully not |
Thanks - do you want to make a pull request for review? |
yes, but before doing so I wanted to locally run some test notebook to see if there were errors, but I notice that the user-manual hangs at cell 19 |
If you’ve pulled all changes in from |
My attempted patch is not correct. I don't know where we can get the rates from...in case they must be taken from the stoichiometry it will require quite an articulated parser because sometimes they can get quite messy. For instance, in my tests the run was hung up at model4. If I ask
So, I don't know if we need to parse this stuff, or there could be an easier way to get the rates. |
I think you can use |
This is a kludge for now and we may think of a better way of doing it in the future, at a lower level in the base model class, e.g. keeping separate lists of rates from equations, and from interaction rules. |
it wasn't so easy but it should be now sorted... waiting for tests to finish. |
The error message is
TypeError: cannot determine truth value of Relational
Attached is a minimal example producing the error:
SSAerror.ipynb.zip
In this example
ssa1
works whereasssa2
produces the error messageThe text was updated successfully, but these errors were encountered: