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

#include <CStochDirectMethod.h>

Inheritance diagram for CStochDirectMethod:
CTrajectoryMethod CCopasiMethod CCopasiParameterGroup CCopasiParameter CCopasiContainer CCopasiObject

List of all members.

Classes

class  CReactionDependencies

Public Member Functions

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

Protected Member Functions

 CStochDirectMethod (const CCopasiContainer *pParent=NULL)
void calculateAmu (const C_INT32 &index)
C_FLOAT64 doSingleStep (const C_FLOAT64 &curTime, const C_FLOAT64 &endTime)

Protected Attributes

CRandommpRandomGenerator
CModelmpModel
size_t mNumReactions
unsigned C_INT32 mMaxSteps
C_FLOAT64 mNextReactionTime
unsigned C_INT32 mNextReactionIndex
bool mDoCorrection
CVector< C_FLOAT64 > mAmu
C_FLOAT64 mA0
CState mMethodState
std::vector
< CReactionDependencies > 
mReactionDependencies
bool mMaxStepsReached

Friends

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

Constructor & Destructor Documentation

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

Default constructor.

Parameters:
constCCopasiContainer * pParent (default: NULL)
CStochDirectMethod::CStochDirectMethod ( const CStochDirectMethod src,
const CCopasiContainer pParent = NULL 
)

Copy constructor.

Parameters:
constCStochDirectMethod & src,
constCCopasiContainer * pParent (Default: NULL)
CStochDirectMethod::~CStochDirectMethod ( )

Destructor.


Member Function Documentation

void CStochDirectMethod::calculateAmu ( const C_INT32 &  index) [protected]

Calculate the propensity of the indexed reaction

Parameters:
constC_INT32 & index
C_FLOAT64 CStochDirectMethod::doSingleStep ( const C_FLOAT64 &  curTime,
const C_FLOAT64 &  endTime 
) [protected]

Fire the next reaction if it fire before the endTime

Parameters:
constC_FLOAT64 & curTime
constC_FLOAT64 & endTime
Returns:
C_FLOAT64 timeAfterStep
bool CStochDirectMethod::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 CStochDirectMethod::isValidProblem ( const CCopasiProblem pProblem) [virtual]

Check if the method is suitable for this problem

Returns:
bool suitability of the method

Reimplemented from CTrajectoryMethod.

void CStochDirectMethod::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 CStochDirectMethod::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.


Friends And Related Function Documentation

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

Member Data Documentation

C_FLOAT64 CStochDirectMethod::mA0 [protected]

Total propensity (sum over mAmu[i])

CVector< C_FLOAT64 > CStochDirectMethod::mAmu [protected]

A vector of reaction propensities

A boolean flag indicating whether correction for higher order reactions need to be applied

unsigned C_INT32 CStochDirectMethod::mMaxSteps [protected]

max number of single stochastic steps to do in one step()

A boolean flag indicating whether the maximum steps have been reached. This is used to avoid multiple messages.

The method internal state which contains particle rounded particle numbers.

unsigned C_INT32 CStochDirectMethod::mNextReactionIndex [protected]

The index of the next reaction which fires

The time the next reaction fires

The particle and reaction numbers

A pointer to the instance of CModel being used.

The random number generator

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

A vector containing dependency information to minimize the required updates.


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