Hi everyone
I read the Q&A document of DifferentialEquations.jl and find the following statement:

if you see these warnings during a parameter estimation process, this is likely the underlying problem. Simply check sol.retcode != :Success and throw an Inf cost and most optimizers will reject steps in those parameter regimes! https://diffeq.sciml.ai/stable/basics/faq/#faq_stability

My question is : throw an Inf to what? Could someone please give me an example?

If you are doing any type of optimization process, you will likely have some function that you pass to the optimizer to tell it how good the solution is. That is what this cost function I gave represents.

Actually, it is the official document mentioned the parameter estimation. I just meet a similar problem in calculating the Lyapunov spectrum, which needs a parameter to be changed in a certain range.