-
Notifications
You must be signed in to change notification settings - Fork 21
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
All assumptions applied to functions of time should be transferred to their discrete versions #215
Comments
A related issue is that the CSE variables don't have the assumptions of the expressions they replace. See #216 for related info. |
As far as opty is concerned, does this mean the following: Similar with other variables that will be discretized? |
Yes, but this may need more thought than I've explained here. I recall thinking the fix isn't so simple. That's why I didn't pursue. |
Yes, this is a bit deeper issue: #215 (comment) |
So I better stay away from it. |
If you have symbols with assumptions and your form an expression with those symbols, you can then ask what assumptions hold for the expression. When you apply CSE to a large expression you get all these subexpressions and the associated substitution variable. You then have to ask what assumptions apply to that substitution variable. This needs to be thought out wrt to the CSEd jacobian we do. |
If I understand correctly:
If this is right, then if c = arbitrary_function(a1, a2, ...., an) pretty much the only assumption left for c is real=True? |
What if the arbitrary function calculates eigenvalues, then real=True can't be assumed! |
....unless the matrix in question is guaranteed to be symmetric. |
Technically these kinds of things can be with sympy's "new" assumption system. |
I think, I keep my hands off this one. |
The generation of discrete variables looks like:
This sets a
real=True
assumption on each new discrete symbol but any other assumptions that may have been applied to the continuous symbol would be lost. This can have an unexpected effect when the Jacobian is calculated if some assumptions would change the output of the Jacobian wrt to any discrete symbol.The text was updated successfully, but these errors were encountered: