-
Notifications
You must be signed in to change notification settings - Fork 8
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Reset examples chapter: info needed #330
Comments
Unless I'm missing something, this should just say "coincides with a turning point of the" ? I thought a root was any old crossing? |
|
I'd reword as
The why is that it's very hard to detect. The "aka" bit is how root-finding algorithms would formulate this: monitor "y - test-value" and see if it changes sign at any point, then zoom in on that area to find the root. |
A more high-level answer to question no 2 would be: Reset values are intended as a way to encode discontinuities into CellML models in a way that provides information to solvers and other tools for how to deal with them (without doing symbolic interpretation of the equations). So instead of writing "x = 0 if t < 0.5 else 1" and just letting it run, we're explicitly telling the solver "there is a discontinuity when t == 0.5". So if you then take a conditional statement (possibly introducing a continuity), and stick that inside a reset, then you're missing the whole point (or trying to annoy Alan) |
So maybe the intro line is
|
Many electrophysiology models in PMR contain statements such as
These statements encode discontinuities directly into the mathematics (at t=0, t=1000, t=2000,... and at t=2, t=1002, t=2002, ...), and so can be replaced by reset statements. |
The initial condition for B should be dropped so that we have
This isn't really "misuse", it's just another edge case we were trying to consider. The example definitely shouldn't talk about assignment, I think, that was just us trying to work out how you'd implement this in code. (A's value is set by the ODE solver, B's value is set by an assignment statement |
I think we should separate the two entirely. If we had enough resources the libcellml team and the cellml spec writers should be entirely separate teams :D |
I don't see how the touching-not-crossing issue is avoided if |
Oh sorry. No syntactical way to avoid that! |
That I can think of |
I needed to merge the examples PR in to development so that other PRs could be worked on, but there are still some outstanding things needed:
The text was updated successfully, but these errors were encountered: