StochasticNumericalSolver Class Reference

Inheritance diagram for StochasticNumericalSolver:

Inheritance graph
[legend]

List of all members.


Detailed Description

Abstract numerical solver for a system of stochastic differential equations.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date

Definition at line 20 of file StochasticNumericalSolver.hpp.


Public Member Functions

 StochasticNumericalSolver (const unsigned int dimensions, const unsigned int noises)
 Constructor.
 StochasticNumericalSolver (const indii::ml::aux::vector &y0, const unsigned int noises)
 Constructor.
virtual ~StochasticNumericalSolver ()
 Destructor.

Protected Member Functions

bool sampleNoise (double *ts)
 Sample Wiener process noise.
virtual void reset ()
 Reset the model.

Protected Attributes

indii::ml::aux::WienerProcess
< double > 
W
 Wiener process system noise.
std::stack< double > tf
 $t_1,t_2,\ldots > t$; future times.
std::stack
< indii::ml::aux::vector
dWf
 $\Delta\mathbf{W}(t_1),\Delta\mathbf{W}(t_2),\ldots$; Wiener process increments at future times.

Constructor & Destructor Documentation

StochasticNumericalSolver ( const unsigned int  dimensions,
const unsigned int  noises 
)

Constructor.

Parameters:
dimensions Dimensionality of the state space.
noises Dimensionality of the noise space.
The time is initialised to zero, but the state is uninitialised and should be set with setVariable() or setState().

Definition at line 7 of file StochasticNumericalSolver.cpp.

StochasticNumericalSolver ( const indii::ml::aux::vector y0,
const unsigned int  noises 
)

Constructor.

Parameters:
y0 Initial state.
noises Dimensionality of the noise space.
The time is initialised to zero and the state to that given.

Definition at line 13 of file StochasticNumericalSolver.cpp.

~StochasticNumericalSolver (  )  [virtual]

Destructor.

Definition at line 18 of file StochasticNumericalSolver.cpp.


Member Function Documentation

bool sampleNoise ( double *  ts  )  [protected]

Sample Wiener process noise.

This conditions on previous samples of the Wiener trajectory at future times resulting from time steps rejected by the adaptive step size control. This ensures that steps are rejected only due to error bounds being exceeded and not due to an improbable but perfectly valid Wiener trajectory.

Parameters:
ts $t_s$; the time at which to sample the noise. If this is greater than the earliest time in the future path, will be adjusted to this earliest time on return.
Returns:
True if a new Wiener increment was sampled, false if an existing increment has been used.
Let $t$ be the current time and $t_s$ the time at which to sample the noise.

Of the stored Wiener increments at times $t_1,t_2,\ldots > t$, let $t_l$ be the greatest time less than or equal to $t_s$, and $t_u$ the least time greater than $t_s$. $\Delta\mathbf{W}(t_l)$ and $\Delta\mathbf{W}(t_u)$ are the corresponding Wiener increments.

If $t_l$ does not exist, set $t_l \leftarrow t$.

Then, if $t_s \neq t_l$, draw $\mathbf{\delta} \sim \mathcal{N}(0,\sqrt{t_s-t_l})$. If $t_u$ does not exist, set $\Delta\mathbf{W}(t_s) \leftarrow \mathbf{\delta}$. Otherwise, set:

\begin{eqnarray*} \Delta\mathbf{W}(t_s) &\leftarrow& \frac{t_s - t_l}{t_u - t_l}\Delta\mathbf{W}(t_u) + \mathbf{\delta} \\ \Delta\mathbf{W}(t_u) &\leftarrow& \frac{t_u - t_s}{t_u - t_l}\Delta\mathbf{W}(t_u) - \mathbf{\delta} \\ \end{eqnarray*}

and store.

Definition at line 22 of file StochasticNumericalSolver.cpp.

void reset (  )  [protected, virtual]

Reset the model.

This is used internally to reset GSL structures when the next step will not be a continuation of the last, usually when the time or state is changed with a call to setTime(), setVariable() or setState().

Reimplemented from NumericalSolver.

Definition at line 56 of file StochasticNumericalSolver.cpp.


Member Data Documentation

indii::ml::aux::WienerProcess<double> W [protected]

Wiener process system noise.

Definition at line 54 of file StochasticNumericalSolver.hpp.

std::stack<double> tf [protected]

$t_1,t_2,\ldots > t$; future times.

Definition at line 59 of file StochasticNumericalSolver.hpp.

std::stack<indii::ml::aux::vector> dWf [protected]

$\Delta\mathbf{W}(t_1),\Delta\mathbf{W}(t_2),\ldots$; Wiener process increments at future times.

Definition at line 65 of file StochasticNumericalSolver.hpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3