Skip to content
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

Use SteadyStateProblem #24

Open
oameye opened this issue Feb 23, 2024 · 2 comments
Open

Use SteadyStateProblem #24

oameye opened this issue Feb 23, 2024 · 2 comments
Labels
question Further information is requested

Comments

@oameye
Copy link
Member

oameye commented Feb 23, 2024

It can be a good idea to use SteadyStateProblem in the equilib function instead of Callback in combination with ODEProblem. In the background this will be basically be the same as now, however, it will give probably better warning, output, retcode. A benchmark/comparison is here in order.

function equilib(sys::StochSystem, state::State;
dt=0.01,
tmax=1e5,
abstol=1e-5,
solver=Euler())
condition(u, t, integrator) = norm(integrator.uprev-u) < abstol
affect!(integrator) = terminate!(integrator)
equilib_cond = DiscreteCallback(condition, affect!)
prob = ODEProblem(sys.f, state, (0, tmax), p(sys))
sol = solve(prob, solver; dt=dt, callback=equilib_cond, save_on=false, save_start=false)
sol.u[1]
end;

@reykboerner
Copy link
Collaborator

We were actually considering to remove the equilib function altogether. With Attractors.jl or fixedpoints in ChaosTools.jl there are much better ways to find attractors and equilib as written above is just prone to stop in quasi-equilibria.

@oameye
Copy link
Member Author

oameye commented Mar 15, 2024

I think keeping it is still very useful, but I agree we should add more methods, which is just the writing interface for Stochsystem which in the background juts translates to CoupledODEs struct

In HarmonicBalance.jl use a method called homotopyContinuation which guarantees to find all critical points (attractors, repellers and saddle nodes). It has been very effective for us. However, something like this would be more useful for attractors.jl.

@oameye oameye added the question Further information is requested label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants