-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
SDEProblem with OrnsteinUhlenbeckProcess! does not work for scalar state #36
Comments
The in place version will always require that the state is a mutable type. For scalars, use the out-of-place version: noise = OrnsteinUhlenbeckProcess(1.0, 0.0, 1.0, 0.0, 0.0, 0.0) Note that for this to be correct though, I'm pretty sure you're going to need to use Euler-Maruyama: sol = solve(prob, EM(),dt=1e-3, adaptive=false) The higher order methods will probably converge with only order 0.5 with colored noise. I'm not sure the |
Thanks. I should have tried the out-of-place version. Though I think it'd be better if And also thanks for the advice on the method. I wasn't paying attention to the method at all at this point since I wanted to make the code run in the first place (so that I can see what the |
Julia doesn't have a compile-time trait for mutability. Hopefully it's a 1.x thing, then we can throw a good error for it. |
I know it's not cool but can't you do that at run time in the constructor manually? |
Not in a way that's always correct. A good example is here: SciML/RecursiveArrayTools.jl#19 Many times a mutable array can be wrapped in an immutable wrapper and |
I see. Thanks. |
This works:
But this doesn't (notice
W0
,Z0
andu0
are scalar this time):Here is the whole stack trace:
Tested against current master (d424fcd). DiffEqNoiseProcess.jl is v0.5.0.
I found the issue 29 but not sure if it is related.
The text was updated successfully, but these errors were encountered: