NoiseSource Class Reference

A set of mutually correlated noise sources (Wiener, Poisson and Ornstein-Uhlenbeck processes). More...

Inheritance diagram for NoiseSource:

Public Member Functions

 NoiseSource (Time *time, int n)
 Construct. More...
 NoiseSource (Time *time, Matrix a)
 Construct. More...
 ~NoiseSource ()
NoisecreateNoise (int n, const string &t)
 Set/Get a noise object. More...
Noiseoperator[] (int n)
 Get a noise object. More...
void setMixingMatrix (Matrix a)
 Set the mixing matrix. More...
double getIndicatorVariance (int n)
 Get variance.
double getCovariationCoeff (int n, int m)
 Get covariation coefficient. More...
void destructionNotify (int n)
 Callback for Noise objects. More...
virtual void prepareNextState ()
 Compute next value. More...
virtual void proceedToNextState ()
 Set next time step. More...
- Public Member Functions inherited from StochasticProcess
 StochasticProcess (class Time *time, const string &name="", const string &type="Stochastic")
virtual ~StochasticProcess ()
bool isNextStatePrepared ()
virtual double getIncrement ()
 Returns the increment. More...
virtual double getCurrentValue ()
 Returns the value of the process. More...
virtual double getNextValue ()
 Returns the next value of the process. More...
virtual void setNextValue (double d)
 Set the next value of the process. More...
virtual void setCurrentValue (double d)
 Set the current value of the process. More...
void setDescription (string s)
 Set stochastic description.
virtual void init ()
 Initialise time-dependent values.
string getDescription ()
 Get the name. More...
- Public Member Functions inherited from Parametric
string getType () const
 Type of object.
string getName () const
 Name of object.
void setName (const string &name)
 Name of object.
string getConfiguration () const
 Returns the configuration of the object. More...
string getAllParameters () const
 String with all parameter settings.
void addParameter (const string &name)
 Add a parameter. More...
void rmParameter (const string &name)
 Remove a parameter. More...
virtual void setParameter (const string &name, const string &value)
 Set parameter. More...
virtual string getParameter (const string &name) const
 Get parameter. More...
- Public Member Functions inherited from TimeDependent
 TimeDependent (class Time *time)
 Construct. More...
virtual class TimegetTime () const
 Return pointer to the time object.
- Public Member Functions inherited from Physical
 Physical ()
 Physical (const Physical &)
 Physical (string name)
 Physical (string name, string unitPrefix, string unitSymbol)
 Physical (string name, Unit unit)
virtual string getPhysicalDescription ()
 Returns the physical description. More...
virtual string getUnitName ()
 Returns the unit name.
virtual string getUnitSymbol ()
 Returns the unit name.
virtual void setPhysicalDescription (string name)
 Set the name. Same as setDescription(). More...
virtual void setUnit (Unit u)
 Set the unit.
virtual void setUnitPrefix (int n)
 Set unit prefix. More...
virtual Unit getUnit () const
 Retrieve the unit.
- Public Member Functions inherited from RandN
 RandN ()
 ~RandN ()
double dRandN ()
 Retrieve random variable. More...
double dRandE ()
 Retrieve random variable. More...

Additional Inherited Members

- Protected Member Functions inherited from Parametric
 Parametric (const string &name, const string &type)
 Create object of type and name.
virtual ~Parametric ()
 Destroy object.
- Protected Attributes inherited from StochasticProcess
double stochCurrentValue
 the current value
double stochNextValue
 the next value (direct future)
bool stochNextStateIsPrepared
 whether prepareNextState() was successful
string stochDescription
 the name of the quantity

Detailed Description

A set of mutually correlated noise sources (Wiener, Poisson and Ornstein-Uhlenbeck processes).

An object of this class creates various noise source which may be correlated. The correlation is achieved by mixing independent noise sources with a mixing matrix (details below).

Construction and usage: The constructor will set up an object with n noise sources. They can be used straight away. The mixing matrix, as well as type and parameters for each process can be set at runtime. Mean, variance and covariation processes can also be obtained at runtime.


\[ \omega -> funtionInput -> dPt / dWt \]

\[ \left<\left[G^i,G^j\right]\right> = \sigma_jc_{ij} c_j w_j\lambda_j \]


\[ c_j = \sqrt{\frac{2}{\pi}} \frac {e^{-\frac{\lambda_j^2dt}{2\mbox{Var}\left\{dX^i_t\right\}}}} {\left(1-\mbox{erf}{\frac{\lambda_j\sqrt{dt}}{\sqrt{2\mbox{Var}\left\{dX^i_t\right\}}}}\right)\sqrt{\mbox{Var}\left\{dX^i_t\right\}}}. \]

Constructor & Destructor Documentation

NoiseSource::NoiseSource ( Time time,
int  n 


Constructs a NoiseSource object, which produces n noise processes. The default mixing matrix is the identity matrix (Zeros with diagonal Ones). Use setMixingMatrix() to change.

timeAdress of a (central) time object.
nNumber of processes.
NoiseSource::NoiseSource ( Time time,
Matrix  a 


Constructs a NoiseSource object, where the processes are mixed as stated in the given mixing matrix.

timeAdress of a (central) time object.
aMixing matrix.

Member Function Documentation

Noise* NoiseSource::createNoise ( int  n,
const string &  t 

Set/Get a noise object.

This will retrieve the address of a noise object. If the object is not existent, or of a different type as stated by the p, it will be created.

nThe index of the noise.
tThe type of the noise (can be "Correlated Wiender Process", "Correlated Poisson Process", "Correlated Ornstein-Uhlenbeck Process").
void NoiseSource::destructionNotify ( int  n)

Callback for Noise objects.

Called by a noise object n, to notify its parent that it has died.

double NoiseSource::getCovariationCoeff ( int  n,
int  m 

Get covariation coefficient.

The covariation process (see Covariation) is in many cases just time multiplied by a scalar. The method retrieves this scalar.

The scalar s, so that $ \left[X^n,X^m\right]_t = st$
nIndex of first noise process.
mIndex of second noise process.
Noise* NoiseSource::operator[] ( int  n)

Get a noise object.

This returns only existent noise objects.

nThe index of the noise.
virtual void NoiseSource::prepareNextState ( )

Compute next value.

This will compute the next value of all indicator variables. The values of the noises are not affected.

Reimplemented from StochasticProcess.

virtual void NoiseSource::proceedToNextState ( )

Set next time step.

This will set all noises to the next time step.

Reimplemented from StochasticProcess.

void NoiseSource::setMixingMatrix ( Matrix  a)

Set the mixing matrix.

Just sets a new mixing matrix to a given set of noises. Note that the dimensions of the matrix must match (i.e. for n noise sources, you want an nxn Matrix.

aThe mixing matrix.