copasi API  0.1
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
CTauLeapMethod Class Reference

#include <CTauLeapMethod.h>

Inheritance diagram for CTauLeapMethod:
CTrajectoryMethod CCopasiMethod CCopasiParameterGroup CCopasiParameter CCopasiContainer CCopasiObject

List of all members.

Classes

class  CReactionDependencies

Public Member Functions

 CTauLeapMethod (const CTauLeapMethod &src, const CCopasiContainer *pParent=NULL)
 ~CTauLeapMethod ()
virtual bool elevateChildren ()
virtual Status step (const double &deltaT)
virtual void start (const CState *initialState)
virtual bool isValidProblem (const CCopasiProblem *pProblem)

Protected Member Functions

 CTauLeapMethod (const CCopasiContainer *pParent=NULL)
void cleanup ()
C_FLOAT64 doSingleStep (C_FLOAT64 ds)
void updatePropensities ()
const C_FLOAT64 & calculateAmu (const size_t &index)
bool updateSystem ()

Protected Attributes

CModelmpModel
CState mMethodState
unsigned C_INT32 mNumReactions
std::vector
< CReactionDependencies > 
mReactionDependencies
unsigned C_INT32 mNumReactionSpecies
CVector< C_FLOAT64 > mAmu
C_FLOAT64 mA0
CVector< C_FLOAT64 > mK
CVector< C_FLOAT64 > mAvgDX
CVector< C_FLOAT64 > mSigDX
C_FLOAT64 mEpsilon
unsigned C_INT32 mMaxSteps
bool mUseRandomSeed
unsigned C_INT32 mRandomSeed
CRandommpRandomGenerator
bool mDoCorrection
size_t mFirstReactionSpeciesIndex

Friends

CTrajectoryMethodCTrajectoryMethod::createTrajectoryMethod (CCopasiMethod::SubType subType, CTrajectoryProblem *pProblem)

Constructor & Destructor Documentation

CTauLeapMethod::CTauLeapMethod ( const CTauLeapMethod src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters:
constCTauLeapMethod & src
constCCopasiContainer * pParent (default: NULL)
CTauLeapMethod::~CTauLeapMethod ( )

Destructor.

CTauLeapMethod::CTauLeapMethod ( const CCopasiContainer pParent = NULL) [protected]

Default constructor.

Parameters:
constCCopasiContainer * pParent (default: NULL)

Default constructor.


Member Function Documentation

const C_FLOAT64 & CTauLeapMethod::calculateAmu ( const size_t &  index) [protected]

Calculate one of the propensities

Parameters:
constsize_t & index
Returns:
const C_FLOAT64 & amu
void CTauLeapMethod::cleanup ( ) [protected]

Cleans up memory, etc.

Initializes the solver and sets the model to be used.

Parameters:
modelA reference to an instance of a CModel Cleans up memory, etc.
C_FLOAT64 CTauLeapMethod::doSingleStep ( C_FLOAT64  ds) [protected]

Simulates the system over the next interval of time. The timestep is given as argument.

Parameters:
dsA C_FLOAT64 specifying the timestep
bool CTauLeapMethod::elevateChildren ( ) [virtual]

This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.

Returns:
bool success

Reimplemented from CCopasiParameterGroup.

bool CTauLeapMethod::isValidProblem ( const CCopasiProblem pProblem) [virtual]

Check if the method is suitable for this problem

Returns:
bool suitability of the method

Reimplemented from CTrajectoryMethod.

void CTauLeapMethod::start ( const CState initialState) [virtual]

This instructs the method to prepare for integration starting with the initialState given.

Parameters:
const CState *initialState

Reimplemented from CTrajectoryMethod.

CTrajectoryMethod::Status CTauLeapMethod::step ( const double &  deltaT) [virtual]

This instructs the method to calculate a time step of deltaT starting with the current state, i.e., the result of the previous step. The new state (after deltaT) is expected in the current state. The return value is the actual timestep taken.

Parameters:
const double &deltaT
Returns:
Status status

Reimplemented from CTrajectoryMethod.

void CTauLeapMethod::updatePropensities ( ) [protected]

Calculate the propensities for all reactions

bool CTauLeapMethod::updateSystem ( ) [protected]

Updates the system according to the probabilistic number of firings mK[i] of each reaction i


Friends And Related Function Documentation

CTrajectoryMethod* CTrajectoryMethod::createTrajectoryMethod ( CCopasiMethod::SubType  subType,
CTrajectoryProblem pProblem 
) [friend]

Member Data Documentation

C_FLOAT64 CTauLeapMethod::mA0 [protected]

Total propensity (sum over mAmu[i])

CVector< C_FLOAT64 > CTauLeapMethod::mAmu [protected]

A vector of reaction propensities

CVector< C_FLOAT64> CTauLeapMethod::mAvgDX [protected]

For tau-selection method

indicates if the correction N^2 -> N*(N-1) should be performed

C_FLOAT64 CTauLeapMethod::mEpsilon [protected]

The tolerance ratio x(t+t')< eps*x(t)

index of first species in a CState

CVector< C_FLOAT64 > CTauLeapMethod::mK [protected]

The k-values of the reactions, that is the probabilistic number of firings within one leap.

unsigned C_INT32 CTauLeapMethod::mMaxSteps [protected]

The maximum number of tau leap steps allowed for an integrations step

The method internal state which contains particle rounded particle numbers.

unsigned C_INT32 CTauLeapMethod::mNumReactions [protected]

Number of reactions.

unsigned C_INT32 CTauLeapMethod::mNumReactionSpecies [protected]

Number of variable metabolites.

Pointer to the model.

The random number generator.

unsigned C_INT32 CTauLeapMethod::mRandomSeed [protected]

The random seed to use.

std::vector< CReactionDependencies > CTauLeapMethod::mReactionDependencies [protected]

A vector containing dependency information to minimize the required updates.

CVector< C_FLOAT64> CTauLeapMethod::mSigDX [protected]

For tau-selection method

Specifies if the mRandomSeed should be used. otherwise a randomly chosen seed is used.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines