NonstationaryProcessesBase
Documentation for NonstationaryProcessesBase.
NonstationaryProcessesBase.fieldguide
NonstationaryProcessesBase.process_aliases
NonstationaryProcessesBase.Discontinuous
NonstationaryProcessesBase.Process
NonstationaryProcessesBase.ParameterProfiles.constantParameter
NonstationaryProcessesBase.ParameterProfiles.rampInterval
NonstationaryProcessesBase.ParameterProfiles.rampOff
NonstationaryProcessesBase.ParameterProfiles.rampOn
NonstationaryProcessesBase.ParameterProfiles.stepNoise
NonstationaryProcessesBase.ParameterProfiles.unitStep
NonstationaryProcessesBase.getvaryingparameters
NonstationaryProcessesBase.parameter_function
NonstationaryProcessesBase.parameter_functions
NonstationaryProcessesBase.parameterseries
NonstationaryProcessesBase.saveTimeseries!
NonstationaryProcessesBase.simulate
NonstationaryProcessesBase.solution!
NonstationaryProcessesBase.timeseries!
NonstationaryProcessesBase.trimtransient!
NonstationaryProcessesBase.tuplef2ftuple
NonstationaryProcessesBase.updateparam
TimeseriesTools.TimeSeries
TimeseriesTools.times
NonstationaryProcessesBase.fieldguide
— ConstantA dictionary containing brief descriptions of each Process
field:.
process
: AFunction
with a method forProcess
types that performs a particular simulation. See NonstationaryProcesses.jl for examples.parameter_profile
: A tuple ofFunction
s that describe how each parameter of a system evolves over time. These can be functions, or curried functions of parameters given in:parameter_profile_parameters
. See e.g.constantParameter
,Discontinuous
parameter_profile_parameters
: A tuple of parameters (which may also be tuples) for each:parameter_profile
X0
: The initial conditions, given as a vector equal in length to number of variables in the systemt0
: The initial time of the simulation, at which the system has the state:X0
transient_t0
: The length of time to simulate the system, from the initial conditions:X0
at:t0
, that is discarded when retrieving thetimeseries
dt
: The time step of the simulation and solversavedt
: The sampling period of the solution'stimeseries
, which must be a multiple of:dt
tmax
: The final time point of the simulation. The duration of the simulation is then:tmax - :transient_t0
, and the duration of the returned time series is:tmax - :t0
. Seetimes
alg
: The algorithm used to solveDifferentialEquations.jl
processes. See, for example, a list of ODE solverssolver_opts
: A dictionary of additional options passed to the:alg
. This can include solver tolerances, adaptive timesteps, or the maximum number of iterations. See the common solver optionssolver_rng
: An integer seed for the random number generator, set to a random number by defaultid
: A unique integer ID for a givenProcess
date
: The date at which theProcess
was createdsolution
: The solution of the simulation in its native format (e.g. an ODE solution)varnames
: Dummy names for the variables of aProcess
, defaulting to[:x, :y, :z, ...]
NonstationaryProcessesBase.process_aliases
— ConstantField aliases for Process
constructors, given as a dictionary of (field=>alias)
pairs.
NonstationaryProcessesBase.Discontinuous
— Type Discontinuous
A type that contains a discontinuous function and an index of any of its discontinuities. This allows the construction of step parameter profiles that retain discontinuity information. You can also call the Discontinuous
` type like a normal function, if you want to.
NonstationaryProcessesBase.Process
— MethodProcess(; process=nothing, process_kwargs...)
Define a Process
that simulates a given system, specified by process::Function
, and any simulation parameters (including control parameters, sampling parameters, solver parameters, and some metadata like the date and a simulation ID). For a complete list of process_kwargs
, see the fieldguide
. A Process
can also be used to create other Process
es using the syntax S = (P::Process)(;process_kwargs...)
, which will first copy P
then update any fields given in process_kwargs
NonstationaryProcessesBase.getvaryingparameters
— MethodReturn the indices of parameter profiles that are not constant
NonstationaryProcessesBase.parameter_function
— MethodReturn the profiles of a Process
as a vector-outputting function with the form f(t::Real) -> ::Vector
NonstationaryProcessesBase.parameter_functions
— MethodReturn the profiles of a Process
as a vector of scalar-valued functions each with the form f(t::Real) -> ::Real
NonstationaryProcessesBase.parameterseries
— Methodparameterseries(P::Process; p=nothing, times_kwargs...)
Return the profiles of a Process
as parameter values at time indices given by times
. p
specified the indices of the parameters to return (e.g. 1 or [2, 3]). If p
is a vector, the values will be returned in an nₚ×nₜ matrix.
NonstationaryProcessesBase.saveTimeseries!
— FunctionSave the solution of a Process
in a given folder. This replaces the :solution
field of the Process
with the location of the saved data, and subsequent calls of timeseries
read from this file.
NonstationaryProcessesBase.simulate
— MethodCopy then solve a Process
NonstationaryProcessesBase.solution!
— MethodSolve a Process
by calling the (::Process).process
method.
NonstationaryProcessesBase.timeseries!
— FunctionReturn the :solution
of a Process
as a formatted time series. cf. timeseries
NonstationaryProcessesBase.trimtransient!
— FunctionRemove a transient from a Process
by dropping any time-series values between :transient_t0
and :t0
, as well as setting the intitial condition to the value of the solution at :t0
.
NonstationaryProcessesBase.tuplef2ftuple
— Methodtuplef2ftuple(f::Tuple{Function}, params::Tuple)
Convert a vector of curried functions f
that each accept an element of the parameter tuple params
into a function of the form f(t) -> x::Vector
, where xᵢ = fᵢ(paramsᵢ)(t)
for i = 1:length(f)
NonstationaryProcessesBase.updateparam
— Methodupdateparam(P::Process, p::Integer, profile::Function)
updateparam(P, p, value::Union{Number, Tuple, Vector})
updateparam(P, p, profile, value)
Copy a Process
with a new set of :parameter_profiles
and :parameter_profile_parameters
. p
is an integer specifying which parameter to update, profile
is the new profile, and value
contains the new :parameter_profile_parameters
.
TimeseriesTools.TimeSeries
— FunctionRetrieve the solution of a Process
as a ToolsArray
, starting from :t0
, at a sampling period of :save_dt
. This function will solve the Process
and populate the :solution
only if the Process
has not yet been simulated.
TimeseriesTools.times
— Methodtimes(P::Process; transient::Bool=false)
Return the time indices of a Process
, optionally including the transient.