-
-
Notifications
You must be signed in to change notification settings - Fork 233
JumpSystem cleanup #3180
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
JumpSystem cleanup #3180
Conversation
My plan is to next make the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could you check if removing the if !(sys isa JumpSystem)
here now works? It was added because collect_vars!
didn't work
Will update later for that. I think we need a dispatch on the trait I added in |
Should be updated now. |
Lots of failures here, but as far as I can tell none are related to this PR. I formatted with JuliaFormatter v1.0.62 so not sure why that is failing either. Locally it reports there is nothing to format when run on the repo. |
@ChrisRackauckas I think this is good to merge now -- the test failures all seem unrelated. |
This looks good for now. Though I think the path forward really is that a symbolic JumpSystem should have its variables as discretes and use the hybrid system stuff when possible. The reason is the purely discrete variables would then not be in the ODE when the two are mixed, that could be a big performance win. We probably need to sync about this. |
Happy to chat about that at some point. Maybe we can talk at the next office hours. That would require changes in JumpProcesses too presumably? I thought what we are setting up here — really in the other WIP PR — would be pretty similar to what one would normally write by hand. |
I don't think JumpProcesses.jl would need to change in order to accomodate it. It should just be a codegen change. |
As a first step before working on making JumpSystems support coupled ODEs/SDEs, I wanted to clean up the code a bit. This
collect_vars!
forJumpSystems
.Note that JumpSystems would still need some more work to support hierarchical modeling (i.e. sub-systems and scoping).