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

#include <CTrajAdaptiveSA.h>

Inheritance diagram for CTrajAdaptiveSA:
CTrajectoryMethod CCopasiMethod CCopasiParameterGroup CCopasiParameter CCopasiContainer CCopasiObject

List of all members.

Classes

class  CReactionDependencies

Public Member Functions

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

Static Public Member Functions

static CTrajAdaptiveSAcreateTauLeapMethod ()

Protected Member Functions

 CTrajAdaptiveSA (const CCopasiContainer *pParent=NULL)
const C_FLOAT64 & calculateAmu (const size_t &index)
C_FLOAT64 doSingleSSAStep (const C_FLOAT64 &curTime, const C_FLOAT64 &endTime)
C_FLOAT64 doSingleTauLeapStep (const C_FLOAT64 &curTime, const C_FLOAT64 &endTime)

Protected Attributes

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

Friends

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

Constructor & Destructor Documentation

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

Default constructor.

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

Copy constructor.

Parameters:
constCTrajAdaptiveSA & src,
constCCopasiContainer * pParent (Default: NULL)
CTrajAdaptiveSA::~CTrajAdaptiveSA ( )

Destructor.


Member Function Documentation

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

Calculate the propensity of the indexed reaction

Parameters:
constsize_t & index
CTrajAdaptiveSA * CTrajAdaptiveSA::createTauLeapMethod ( ) [static]

Chooses a stochastic method adequate for the problem

C_FLOAT64 CTrajAdaptiveSA::doSingleSSAStep ( 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
C_FLOAT64 CTrajAdaptiveSA::doSingleTauLeapStep ( 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 CTrajAdaptiveSA::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 CTrajAdaptiveSA::isValidProblem ( const CCopasiProblem pProblem) [virtual]

Check if the method is suitable for this problem

Returns:
bool suitability of the method

Reimplemented from CTrajectoryMethod.

void CTrajAdaptiveSA::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 CTrajAdaptiveSA::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 CTrajAdaptiveSA::mA0 [protected]

Total propensity (sum over mAmu[i])

CVector< C_FLOAT64 > CTrajAdaptiveSA::mAmu [protected]

A vector of reaction propensities

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

unsigned C_INT32 CTrajAdaptiveSA::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 CTrajAdaptiveSA::mNextReactionIndex [protected]

The index of the next reaction which fires

C_FLOAT64 CTrajAdaptiveSA::mNextReactionTime [protected]

The time the next reaction fires

size_t CTrajAdaptiveSA::mNumReactions [protected]

The particle and reaction numbers

Number of variable metabolites.

size_t CTrajAdaptiveSA::mNumSpecies [protected]
CVector< const C_FLOAT64 * > CTrajAdaptiveSA::mPartitionedAmu [protected]

The ordered propensity function

CVector< const CReactionDependencies * > CTrajAdaptiveSA::mPartitionedDependencies [protected]

The Ordered reaction

A pointer to the instance of CModel being used.

The random number generator

std::vector< CReactionDependencies > CTrajAdaptiveSA::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