Closed gszep closed 3 years ago
At some point, I removed the computation of eigenvalues from the loop and put it in the iterator, maybe this is it: https://github.com/rveltz/BifurcationKit.jl/commit/cf5870368cc9a3ddc70a76eaea180c930e49d817
Can you display state.n_unstable
and see if it is modified?
so its definitely already not working in 0.1.4 so I don't think its the commit you referenced. state.n_unstable
along the branch looks like this
(1, 1)
(1, 1)
(1, 1)
(1, 1)
(1, 1)
(1, 1)
(0, 0)
(0, 0)
(0, 0)
(0, 0)
(0, 0)
I guess you pass the option ContinuationPar.detectBifurcation=3
? Where is your iterator loop so I can check it?
ah I pass detectBifurcation=true
but passing detectBifurcation=3
doesn't change things. The loop is here https://github.com/gszep/BifurcationInference.jl/blob/036700f1524bcf8832ee9a948ab65e885be00519/src/BifurcationInference.jl#L109
hyperparameters::ContinuationPar
is returned by https://github.com/gszep/BifurcationInference.jl/blob/036700f1524bcf8832ee9a948ab65e885be00519/src/Utils.jl#L2
I think you can remove https://github.com/gszep/BifurcationInference.jl/blob/036700f1524bcf8832ee9a948ab65e885be00519/src/BifurcationInference.jl#L112
as it is in the iterator:
https://github.com/rveltz/BifurcationKit.jl/blob/master/src/Continuation.jl#L351
Then, you need to activate bifurcation detection as:
https://github.com/rveltz/BifurcationKit.jl/blob/master/src/Continuation.jl#L351
Did it really used to work that way?
in v0.1.3 the output of state.n_unstable
used to be
(1, 1)
(1, 1)
(1, 1)
(1, 1)
(0, 1)
(0, 0)
(0, 0)
(0, 0)
so I guess the main difference is that there is no longer a transition state (0,1)
in the new versions
also note that I have a push!(branch::Branch,state::ContState)
method
https://github.com/gszep/BifurcationInference.jl/blob/036700f1524bcf8832ee9a948ab65e885be00519/src/Structures.jl#L49
I think it is because you have https://github.com/gszep/BifurcationInference.jl/blob/036700f1524bcf8832ee9a948ab65e885be00519/src/BifurcationInference.jl#L112
Try to remove it. Whenever you call computeEigenvalues!(iterator,state)
it overwrite n_unstable
. As I put this call in the iterator in 0.1.4, you call this function twice per continuation step and so bifurcations are undetected
also note that I have a
push!(branch::Branch,state::ContState)
method https://github.com/gszep/BifurcationInference.jl/blob/036700f1524bcf8832ee9a948ab65e885be00519/src/Structures.jl#L49
this should not affect the detection
yep that did the trick thanks! I was not aware that computeEigenvalues!(iterator,state)
was moved into the iterator (in v0.1.3 if I didn't have it in the loop explicitly it would not record stability info) and the new version makes much more sense 👍🏼
Yeah, perhaps I should put the bifurcation detection in the iterator as well.
This is affecting
BifurcationInference.jl
is there a new default setting I am not aware of?