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.transition
— Functiontransition(
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 aroundx_i
andx_f
, respectivelytmax=1e3
: maximum time until the simulation stops evenx_f
has not been reachedradius_directions=1:length(sys.u)
: the directions in phase space to consider when calculating the radiirad_i
andrad_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
: iffalse
, returns the whole trajectory up to the transitionkwargs...
: keyword arguments passed toCommonSolve.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): iftrue
, a transition occurred (i.e. the ball aroundx_f
has been reached), elsefalse
See also transitions
, trajectory
.
CriticalTransitions.transitions
— Functiontransitions(
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 aroundx_i
andx_f
, respectivelyNmax
: number of attempts before the algorithm stops even if less thanN
transitions occurred.tmax=1e3
: maximum time when the simulation stops evenx_f
has not been reachedradius_directions=1:length(sys.u)
: the directions in phase space to consider when calculating the radiirad_i
andrad_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
: iffalse
, returns the whole trajectory up to the transitionshow_progress=true
: shows a progress bar with respect toNmax
kwargs...
: keyword arguments passed toCommonSolve.solve
See also transition
.
Returns a TransitionEnsemble
object.
Results from the transitions
function are organized in the following types:
CriticalTransitions.TransitionEnsemble
— Typestruct TransitionEnsemble{SSS, T, ES}
Ensemble of transition paths between two points in a state space.
Fields
paths::Vector
: paths sampled from the transition processtimes::Array{Vector{T}, 1} where T
: coresponsing times of the pathsstats::CriticalTransitions.TransitionStatistics
: statistics of the ensemblesciml_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
.
CriticalTransitions.TransitionStatistics
— Typestruct 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 processresidence_time::Any
: mean residence time of the transition processtransition_time::Any
: mean transition time of the transition processrareness::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
.
Pathspace sampling
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.