Skip to content

Handle derivatives of observed variables #2574

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

Merged
merged 2 commits into from
Apr 1, 2024
Merged

Conversation

ChrisRackauckas
Copy link
Member

If you have a variable x which is not a state and substitute it out because some equation y ~ x, you would hope that D(x) => 1 effectively means D(y) => 1. This PR does a fixed point substitution on any derivative of observed variables in order to rephrase it into the chosen variable. This fixes the case of aliasing but not the general case of if you are doing the derivative of some observed expression, i.e. x ~ y + z where x is factored out to be an observed variable, then you want to set D(x) => 1.

If you have a variable `x` which is not a state and substitute it out because some equation `y ~ x`, you would hope that `D(x) => 1` effectively means `D(y) => 1`. This PR does a fixed point substitution on any derivative of observed variables in order to rephrase it into the chosen variable. This fixes the case of aliasing but not the general case of if you are doing the derivative of some observed expression, i.e. `x ~ y + z` where `x` is factored out to be an observed variable, then you want to set `D(x) => 1`.
@ChrisRackauckas ChrisRackauckas merged commit 13ab6d9 into master Apr 1, 2024
@ChrisRackauckas ChrisRackauckas deleted the fixedpoint_sub_diff branch April 1, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant