-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Plotting no longer works for MTK JumpSystems over ODEProblems #3188
Comments
@AayushSabharwal are jumps captured as discrete variables now? |
I don't think so. There's nothing special we do for discrete variables in JumpSystem to my knowledge |
The problem here is that solutions of jump systems seem to do some black magic that SII isn't aware of: infil> sol
retcode: Success
Interpolation: specialized 4th order "free" interpolation
t: 36-element Vector{Float64}:
0.0
# ...
u: 36-element Vector{ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}}:
[0.0, 0.0]
# ... Note how it appears julia> sol.u[1]
3-element ExtendedJumpArray{Float64, 1, Vector{Float64}, Vector{Float64}}:
0.0
0.0
-0.2529329586712836 I'm not aware of what this is or what it's supposed to mean. As far as SII/the |
Yeah they have pseudo variables that are used for the event handling in jump detection. They aren't real variables. I have thought for over a year now that we should probably just not hide them from the user and just use a ComponentArray by default or something. But SII validation needs to somehow allow this. Maybe we need to declare pseudonames for them in the MTK side? |
If the system specification can determine the number and names of pseudo variables, SII will be happy. Right now, The true solution would be for |
Yes, that will be the case for the general solution. But for a more immediate solution, maybe we just need an interface |
Do we not want to plot the first two? |
You want to plot only the first two. |
Alright yeah then |
I'd need an MWE to tell you more. Just from the stacktrace, it could be either of the two reasons. |
Note that propensities/intensities in JumpProcesses arising from VariableRateJumps, the "pseudo-variables" in the discussion above, can be continuous in time. So it wouldn't be appropriate to treat them as discrete (or even as piecewise-constant in general). |
gives
Environment:
For a JumpProblem over a DiscreteProblem things still seem to work:
The text was updated successfully, but these errors were encountered: