Sampling transitions

Direct simulation

These functions generate noise-induced transitions between a given initial and final state via Monte Carlo rejection sampling. While transition samples one transition, the transitions function generates an ensemble of transition paths. It supports parallelization on multiple threads to speed up the run.

CriticalTransitions.transitionFunction
transition(
    sys::CoupledSDEs,
    x_i,
    x_f;
    radii,
    tmax,
    radius_directions,
    cut_start,
    kwargs...
) -> Tuple{Any, Any, Bool}

Generates a sample transition from point x_i to point x_f.

This function simulates sys in time, starting from initial condition x_i, until entering a ball of given radius around x_f. If a seed was given to sys the solver is initialized with this seed. To change the seed you can pass a new seed to the seed keyword.

Keyword arguments

  • radii=(0.1, 0.1): radius of the ball around x_i and x_f, respectively
  • tmax=1e3: maximum time until the simulation stops even x_f has not been reached
  • radius_directions=1:length(sys.u): the directions in phase space to consider when calculating the radii rad_i and rad_f. Defaults to all directions. To consider only a subspace of state space, insert a vector of indices of the dimensions to be included.
  • cut_start=true: if false, returns the whole trajectory up to the transition
  • kwargs...: keyword arguments passed to CommonSolve.solve

Output

[path, times, success]

  • path (Matrix): transition path (size [dim × N], where N is the number of time points)
  • times (Vector): time values (since start of simulation) of the path points (size N)
  • success (bool): if true, a transition occurred (i.e. the ball around x_f has been reached), else false

See also transitions, trajectory.

source
CriticalTransitions.transitionsFunction
transitions(
    sys::CoupledSDEs,
    x_i,
    x_f;
    ...
) -> CriticalTransitions.TransitionEnsemble{_A, _B, EnsembleSolution{T, N, S}} where {_A, _B, T, N, S}
transitions(
    sys::CoupledSDEs,
    x_i,
    x_f,
    N::Int64;
    radii,
    tmax,
    Nmax,
    cut_start,
    radius_directions,
    show_progress,
    EnsembleAlg,
    kwargs...
) -> CriticalTransitions.TransitionEnsemble{_A, _B, EnsembleSolution{T, N, S}} where {_A, _B, T, N, S}

Generates an ensemble of N transition samples of sys from point x_i to point x_f. The transitions is by default simulated using threading. To sample the transitions in serial, GPU or Distributed enverionment, pass the desired SciMLBase.EnsembleAlgorithm to the EnsembleAlg algorithm.

Keyword arguments

  • radii=(0.1, 0.1): radius of the ball around x_i and x_f, respectively
  • Nmax: number of attempts before the algorithm stops even if less than N transitions occurred.
  • tmax=1e3: maximum time when the simulation stops even x_f has not been reached
  • radius_directions=1:length(sys.u): the directions in phase space to consider when calculating the radii rad_i and rad_f. Defaults to all directions. To consider only a subspace of state space, insert a vector of indices of the dimensions to be included.
  • cut_start=true: if false, returns the whole trajectory up to the transition
  • show_progress=true: shows a progress bar with respect to Nmax
  • kwargs...: keyword arguments passed to CommonSolve.solve

See also transition.

Returns a TransitionEnsemble object.

source

Results from the transitions function are organized in the following types:

CriticalTransitions.TransitionEnsembleType
struct TransitionEnsemble{SSS, T, ES}

Ensemble of transition paths between two points in a state space.

Fields

  • paths::Vector: paths sampled from the transition process

  • times::Array{Vector{T}, 1} where T: coresponsing times of the paths

  • stats::CriticalTransitions.TransitionStatistics: statistics of the ensemble

  • sciml_ensemble::Any: original ensemble solution of the SciML Ensemble problem

Constructors

TransitionEnsemble(sim, success_rate)

defined at /home/runner/work/CriticalTransitions.jl/CriticalTransitions.jl/src/trajectories/TransitionEnsemble.jl:55.

source
CriticalTransitions.TransitionStatisticsType
struct TransitionStatistics{T}

Statistics of the ensemble of transition paths between two points in a state space.

Fields

  • success_rate::Any: success rate of the transition process

  • residence_time::Any: mean residence time of the transition process

  • transition_time::Any: mean transition time of the transition process

  • rareness::Any: rareness of the transition process

Constructors

TransitionStatistics(sim, success_rate)

defined at /home/runner/work/CriticalTransitions.jl/CriticalTransitions.jl/src/trajectories/TransitionEnsemble.jl:23.

source

Pathspace sampling

System-independent implementation of pathspace samping

We are planning to add a general implementation of pathspace sampling as described in Börner et al. [7] (see article's Supplemental Material), where transition paths are sampled as stochastic bridges between a fixed start and end point in state space under stochastic gradient descent in pathspace.