-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Proposed notation for delay #191
Comments
Sounds reasonable to me, but I don't have much experience using the delay equation interface (so don't know how general it is or what we'd want to support). I guess once we see how it is done in MT we can have a similar level of support in the DSL here. |
Tricky. The mathematical notation uses round brackets. This gets a little bit confusing with Julia functions, but as long as he still know that X in your example is a variable then we should be good. Square brackets do not currently collide with anything in diffeqbio but what if we want to introduce spatial modelling? Square brackets would be natural for indexing. |
Looks reasonable to me. Note that adding delay lowering in MTK for ODEs and DDEs is something on my mind but isn't the easiest thing in the world, but I plan to get to it in the next month. Delays in jumps will be an issue for a bit though, since we would need to change the jump interface to include the integrator so that it could grab the sol to interpolate the history. |
Never thought about delays in Jumps. Yes, it may take some time until this might actually come to use. |
Given current development, I do not think this is the way to go. Something like @reaction_network begin
@delayed_variable Xτ ~ X(t-τ)
p, ∅ --> X
d*Xτ, X --> ∅
end might be better though |
|
Is it just constant lags currently? |
Exactly how would that look? E.g. @reaction_network begin
p, ∅ --> X
d*X(t-τ), X --> ∅
end and similar is problematic because currently |
How could it be multiplication? That isn't valid in Julia is it? |
No, you are right, I mixed it up! |
Yes, your approach seems like the way to go |
I wouldn't look at the implementation of delay into DiffEqBio just yet.
(we will let MTK handle that, and first, we need jack DiffEqBio into MTK. I hope to start working on the DiffEqBio side of things in the next couple of day)
We could, however, start looking at how to allow time-delays to be given in the DiffEqBio DSL. I suggest using
[]
for this:here
X[t-τ]
would denote the value of the variableX
at some previous time. I believe we have already reserved the value oft
for the current time (cannot be used for other variables or parameters).τ
would be a simple parameter to the model. One could also write a constant, such asX[t-2.5]
. Allowing[]
,X[t-...]
,probably would not make sense. We might also need some way to check that the
...
does not become negative. Or maybe we just let it become some error later on.Does this sound reasonable?
The text was updated successfully, but these errors were encountered: