Simulating the system
We provide two main functions to simulate a CoupledSDEs forward in time:
DynamicalSystemsBase.trajectory, which integrates the stochasticCoupledSDEssystem forward in timedeterministic_orbit, which integrates only the deterministic part of theCoupledSDEssystem
DynamicalSystemsBase.trajectory — Functiontrajectory(ds::DynamicalSystem, T [, u0]; kwargs...) → X, tEvolve ds for a total time of T and return its trajectory X, sampled at equal time intervals, and corresponding time vector. X is a StateSpaceSet. The returned time vector is t = (t0+Ttr):Δt:(t0+Ttr+T).
Optionally provide a starting state u0 which is current_state(ds) by default.
If time evolution diverged or in general failed before T, the remaining of the trajectory is set to the last valid point.
The dimensions of X are automatically named if ds referrences an MTK model and if save_idxs remains at its default value.
Keyword arguments
Δt: Time step of value output. For discrete time systems it must be an integer. Defaults to0.1for continuous and1for discrete time systems. If you don't have access to unicode, the keywordDtcan be used instead.Ttr = 0: Transient time to evolve the initial state before starting saving states.t0 = initial_time(ds): Starting time.container = SVector: Type of vector that will represent the state space points that will be included in theStateSpaceSetoutput. SeeStateSpaceSetfor valid options.save_idxs: Which variables to output inX. By default it isnothing(all variables). It can be a vector of any type of index that can be given toobserve_state. Note: if you mix integer and symbolic indexing be sure to initialize the array asAnyso that integers1, 2, ...are not converted to symbolic expressions.
Description
trajectory is a very simple function provided for convenience. For continuous time systems, it doesn't play well with callbacks, use DifferentialEquations.solve if you want a trajectory that works with callbacks, or in general you want more flexibility in the generated trajectory (but remember to convert the output of solve to a StateSpaceSet).
CriticalTransitions.deterministic_orbit — Functiondeterministic_orbit(
sys::CoupledSDEs,
T;
...
) -> Tuple{Any, Any}
deterministic_orbit(
sys::CoupledSDEs,
T,
init;
diffeq,
kwargs...
) -> Tuple{Any, Any}
Simulates the deterministic (noise-free) dynamics of CoupledSDEs sys in time for a duration T, starting at initial condition init.
This function is equivalent to calling trajectory on the deterministic part of the CoupledSDEs (with noise_strength=0). It works with the ODE solvers used for CoupledODEs.
Keyword arguments
diffeq=(alg=Tsit5(), abstol = 1e-6, reltol = 1e-6): ODE solver settings (seeCoupledODEs)kwargs...: keyword arguments passed totrajectory
For more info, see ODEProblem. For stochastic integration, see trajectory.