-
Notifications
You must be signed in to change notification settings - Fork 0
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
Not correctly matching the SciML interface #2
Comments
# The total number of steps to end the simulation
sol.totalSteps
498
# The number of simultaneous steps during the simulation
sol.simulStepCount
132
# The total number of events during the simulation
sol.evCount
53
# The actual data is stored in two vectors:
sol.savedTimes
sol.savedVars Those would be designed to be in the sol.stats |
Is there a reason why this isn't able to take a standard ODEProblem? Could the codegen to QSS be handled automatically in ModelingToolkit? |
Noted. I will add these.
At a time step, the QSS method does not update all variables (it needs to decide which variables to update). So, it uses some dependency matrices (Vector{Vector{Int}} in code) and a personalized function that holds the differential equations and events in a special format**. These datastructures are stored in a NLODEProblem{PRTYPE,T,Z,D,CS} wich is different from a standard ODEProblem. However, we can have it as a subtype then make the solve function dispatch on the QSS algorithm and NLODEProblem. ** The QSS solver uses variables of type "Taylor" from the TaylorSeries.jl for approximation to make calculation easier and cheaper. But all operations from the TaylorSeries.jl allocate, so I redid internally this package with added cache to every operation. To exploit this, I had to change the AST of the differential equations upfront to obtain the personalized function.
Becomes
As mentioned above, QSS needs the datastructures stored in the NLODEProblem. So if ModelingToolkit can transform a set of differential equations with events (if-statements) to a NLODEProblem{PRTYPE,T,Z,D,CS} then YES. |
That is incorrect. It should be matching the interface, i.e.
sol(0.0005, idxs = 2)
The text was updated successfully, but these errors were encountered: