Comments (6)
The biggest issue, the reason for the two integrators, is because during the iterations it will need to be disconnected so that way you're building the new interval solution while using the old interpolation, and iteratively contracting based on full interval interpolations. I don't think that you can refine that step-by-step since otherwise the interpolation may oscillate.
from delaydiffeq.jl.
Yes, that's clearly the biggest issue, and maybe one has to adapt or change some of the ideas. Maybe this would work:
- define
DDEFunction
as outlined above - define only one
DDEIntegrator
(and noODEIntegrator
)- would basically extend
ODEIntegrator
with additional fields for fixed-point iterations and a duplicate cache (in, more or less, the same way it is currently done) (by the way, maybe macros could ensure thatDDEIntegrator
is an extension ofODEIntegrator
by adding those fields to the type definition) - before every iteration interpolation cache is adjusted
- since there would be specific arrays, cache, etc. just for the interpolation and not a complete second integrator the setup is maybe also easier to understand - with different integrators it is not completely clear what's their purpose and in particular that most fields of
ODEIntegrator
are not used (or abused)
- would basically extend
- would still be interesting to restrict the dense solution to certain indices
But maybe there are other problems with this approach...
from delaydiffeq.jl.
would still be interesting to restrict the dense solution to certain indices
That could be done by allowing a choice of indices for which the k
is then copied over as. It just needs an option and a handling in savevalues!
.
It sounds like we're heading down the same path we did before. I cannot say I enjoy the current code at all (this an MultiScaleArrays.jl are what I consider my nightmare ideas, but since they give so many nice features I can't get rid of them), but it's difficult to do much more. However, I would like to give the "integrator as parameters" approach a try, and it's one of the reasons for allowing that option. But it will take a significant refactor of the OrdinaryDiffEq.jl code to allow for it, and I will want to do it in StochasticDiffEq.jl as well if we can (and that will give us SDDEs!).
from delaydiffeq.jl.
If we wanted, we can make (du,u,integrator,t) -> f(du,u,integrator,p,t)
or even build the history function there, so the interface is similar but using the OrdinaryDiffEq integrator passing instead of enclosing.
from delaydiffeq.jl.
That could be done by allowing a choice of indices for which the
k
is then copied over as. It just needs an option and a handling insavevalues!
.
I hope I can put together a PR in the next days/week (this feature has to be added to OrdinaryDiffEq though, it seems).
It sounds like we're heading down the same path we did before.
Yes, the revised idea is more similar to the current approach but it is still not the same. In my opinion, it would have some advantages, the biggest being that it avoids these multiple layers of closures and prevents any abuse of fields or side-effects that are currently possible within the interpolating ODEIntegrator
.
However, I would like to give the "integrator as parameters" approach a try, and it's one of the reasons for allowing that option. But it will take a significant refactor of the OrdinaryDiffEq.jl code to allow for it, and I will want to do it in StochasticDiffEq.jl as well if we can (and that will give us SDDEs!).
Sure, so far this was just me dreaming about a more pleasant setup. I noticed that you mentioned this idea some time ago but that it's not implemented yet. At which level should one decide whether to call f
with integrator
or integrator.p
? Just during every function evaluation? Just by creating (du,u,integrator,t) -> f(du,u,integrator.p,t)
if the user does not specify a certain argument in solve
?
If we wanted, we can make
(du,u,integrator,t) -> f(du,u,integrator,p,t)
Instead of something like DDEFunction
?
even build the history function there
Wouldn't this be quite some overhead if the history function is built during every function evaluation?
from delaydiffeq.jl.
I hope I can put together a PR in the next days/week (this feature has to be added to OrdinaryDiffEq though, it seems).
Yeah, it would have to go there first.
Wouldn't this be quite some overhead if the history function is built during every function evaluation?
Maybe. Depends on compiler optimizations.
At which level should one decide whether to call f with integrator or integrator.p? Just during every function evaluation? Just by creating (du,u,integrator,t) -> f(du,u,integrator.p,t) if the user does not specify a certain argument in solve?
I was just going to go into every perform_step!
and have to make a choice based on an argument which would be a value-type in the integrator, but there may be a more elegant way to do this.
from delaydiffeq.jl.
Related Issues (20)
- Estimations of the interpolation error HOT 2
- Test Rosenbrock methods on RADAR5_waltman HOT 5
- Test failures on master HOT 1
- Bizzare error with DDE system HOT 2
- Event Handling Test Failure HOT 2
- Cache tests fail on master HOT 1
- behavior of step! with tstop HOT 6
- Discontinuity tracking can miss discontinuity at 0
- TagBot trigger issue HOT 58
- DDE too stiff? radau method required? HOT 6
- SavingCallback does not seem to save the right values HOT 1
- In DDEs constant_lags break PresetTimeCallback
- Performance regressions since Julia v1.4 HOT 1
- More efficient evaluation of the history function for multiple time points
- Significant allocations in DDE interpolation for multiple time points HOT 3
- Call to HistoryFunction gets replaced by call to ODEFunction HOT 5
- initial conditions not decaying according to dynamics function HOT 1
- missing cache.alg causing runtime dispatch in LinearSolve HOT 7
- Incorrect jacobian with Zygote + ReverseDiffAdjoint HOT 4
- Precompilation issue (DelayDiffEq v5.40.6) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delaydiffeq.jl.