Closed ghost closed 1 year ago
There is a test case in here. However, I cannot run it, so I tried a couple of modifications to make it work.
That test passes on latest versions, so just make sure you're on latest (Julia v1.9 with latest DiffEqFlux and SciMLSensitivity). I just ran the test suite and it went fine.
The end result of both scripts is similar but not exactly the same (don't know way, but I guess some floating point round-off)
Solving to 1e-4 accuracy locally is about 1e-3 - 1e-2 globally each step of an optimization for 100 steps of an optimization, so digits of accuracy each step of an optimization. Yeah that's not going to be the most stable. If you need more stability then lower the tolerances.
However, the computational time is very high. Did I do something wrong that is costing a lot of resources? Or are uDAE expensive by themselves? What can I do to make the code faster?
Using Rodas5 will be quite expensive here with this choice of adjoint. Using sensealg=GaussAdjoint()
(which just merged today) should be a lot faster for this use case. Also, you may want to look into using FBDF()
as the solver here. Both should cut the cost down a lot in the adjoint pass.
But there doesn't seem to be anything actionable here, so I'm closing it. Feel free to keep asking questions, though for usage questions non-bug reports we recommend using the Discourse https://discourse.julialang.org/
Hello,
I have been trying to create a universal Differential Algebraic Equation (I want to enforce some physical constraints).
There is a test case in here. However, I cannot run it, so I tried a couple of modifications to make it work.
Here is what I got:
script 1
In the context of uDAE I created a script based on uODE with the lotka-volterra system:
script 2
The end result of both scripts is similar but not exactly the same (don't know way, but I guess some floating point round-off)
However, the computational time is very high. Did I do something wrong that is costing a lot of resources? Or are uDAE expensive by themselves? What can I do to make the code faster?
Best Regards