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

[WIP] nonlocal stability measure estimator #165

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Datseris
Copy link
Member

This PR is by @andreasmorr and adds a nonlocal stability estimator construct that can compute every nonlocal stability measure at once during finding attractors and/or during the continuation.

mutable struct StabilityMeasuresAccumulator <: AttractorMapper
mapper::AttractorMapper
ds::DynamicalSystem
basin_points::Dict{Int64, StateSpaceSet}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these dictionaries should state StateSpaceSet{D, T} and {D, T} should be type parameters of the struct.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the cleanest way to extract the specific {D, T} from a given mapper?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D = dimension(ds)
T = eltype(current_state(ds))

* `finite_time_basin_stability`: Same as `finite_time_basin_fractions`, but the
initial conditions are weighted by the probability density of the distribution
`d`.
* `persistence`: Trajectories from all points of the attractor are evolved under
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is special. Measures that require parameter change do not fit to this interface. We need to create another function for them I think...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree. Can we still include it in this PR/ file though?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, if you want to, but it has to be a separate function for source code clarity. It would be a function you run after global_continuation has finished and you utilize the attractors_cont output.

@Datseris
Copy link
Member Author

plotting is simple, we don't need a specialized function:

attractors_cont, all_measures = global_cont(stability_accumulator)

all_measures = vector ( dictonary ( measure_name => dictionary (id => number) ) )

mcs = [dicts["minimal_fatal_shock_magnitude"] for dicts in all_measures]

plot_continuation_curves(mcs, parameter_curve)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants