-
Notifications
You must be signed in to change notification settings - Fork 95
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
integrator-using functions should return NaN on non-successful integrator steps #184
Comments
when the diction of parameters is set as:
the warning comes immediately. |
what does |
it seems that the loop would never end when the instability warning comes, I don't know but I guess it would be the NaN, so as the function please check the following codes with the warning:
I think the warning may be solved by changing the solver. But since it works in some of the parameter sets, we can't do that during a loop, and that is why I need your help. |
The answer to my question is not clear though. What is |
|
Okay. So we need to make |
If you want to do a PR that solves this, check for the |
Because this problem comes from the ODE solver, the same warning would take place in other functions like I think these functions should return 'NaN' value so that we can create a filter by applying the Thank you for your advice, I would try |
Yes, that is true, but the only way to handle this, as far as I can tell, is to have such a special handling of the integrator for each individual function that uses an integrator. I don't see any other way.
What's the benefit to that? If the integrator structure already has a
You are very welcome! |
Of course, the Besides, the instability thing may not happen if we choose another solver, of course It is our duty to choose the proper one but it would be great to leave a ‘NaN’ mark in the data matrix to help us to evaluate them. |
Okay, I didn't understand you in the first place. You were suggesting that functions like
I need to tell you that for me this is not an argument. Thankfully I agree with you for different reason, that But I am curious. Why are you doing your timeseries analysis in Matlab instead of Julia...? What tools are missing in Julia that you have in Matlab? |
To be more specific, please allow me to show you an example:
The parameter set is 1 to 5 and we assume the instability comes when taking the parameter at 3 and 4. Let's see what will happen with
Obviously,
How can we let them return |
I really agree with you that Julia is superfast when doing calculation and that is the reason I turn to this language and Just imagine that we got a 300x3 data matrix in Julia and you want to extract a few lines of values as your wish or just sort values by one row. I think it would be more convenient to open the data file in Matlab or even in Microsoft Excel. But we can't say Microsoft Excel is better than Julia, can we? I hold the opinion that in some ways |
That's not what I am suggesting though... Integrator returns false on instability, but Now someone has to actually do the PR that implements this.
This doesn't make sense to me, why not just use the built in |
Okey, I will look forward to this update! Would we still see the warning message in REPL before returning NaN? because its quite annoying and would block the progress bar. Thanks for all your warm replies! |
This will take a while. I am very busy with other projects, so I won't be doing this. Perhaps you can consider doing a Pull Request? It looks like a simple change.
Yes, this comes from the integrator instability, and I think it is very useful. |
I think
The output:
But in case of |
Yes, we have all agreed that in functions that use integrator, termination should stop if integration step was not successful and NaNs are returned, so there is no need to suggest it more :P Now the point is to actually implement it. Pull Requests are very much welcomed! |
There is a
The output is: Normally, using an integrator made from a
The output is: The fields for an integrator made from
The fields for an integrator made from
What do you suggest? Should |
Haha I see the confusion. In fact, the same integrator would be made from |
Can we extend
And for the other solvers we can leave it like it is. |
That seems totally fine to me. You could probably PR it directly at SimpleDiffEq.jl, and then start another PR here that actually would return NaN at the lyapunovspectrum function |
Hello again! I have another question.
|
Hi, in your example it is not necessary since you define a new integrator just for the test. This should work:
|
Hello again!
Now I try to calculate the Lyapunov spectrum in a two-parameter plane. But a warning comes when I choose some of the parameter regions:
From what I googled, the warning comes because it returns a NAN in the trajectory. I am thinking if I can use the 'isnan' function to skip those parameter sets that cause the NAN and continue my loop. Since the lyapunovspectrum function is built-in, I am looking for your help.
Here is my code:
The text was updated successfully, but these errors were encountered: