copasi API
0.1
|
#include <CStochMethod.h>
Public Member Functions | |
CStochMethod (const CStochMethod &src, const CCopasiContainer *pParent=NULL) | |
~CStochMethod () | |
virtual bool | elevateChildren () |
virtual Status | step (const double &deltaT) |
virtual void | start (const CState *initialState) |
virtual bool | isValidProblem (const CCopasiProblem *pProblem) |
Protected Member Functions | |
virtual void | initMethod (C_FLOAT64 start_time)=0 |
virtual C_FLOAT64 | doSingleStep (C_FLOAT64 time, C_FLOAT64 endtime)=0 |
C_INT32 | updatePropensities () |
C_INT32 | calculateAmu (C_INT32 reaction_index) |
C_INT32 | generateReactionIndex () |
C_FLOAT64 | generateReactionTime () |
C_FLOAT64 | generateReactionTime (C_INT32 reaction_index) |
C_INT32 | updateSystemState (C_INT32 reaction_index) |
void | setupDependencyGraphAndBalances () |
CStochMethod (const CCopasiContainer *pParent=NULL) | |
Static Protected Member Functions | |
static bool | modelHasAssignments (const CModel *pModel) |
Protected Attributes | |
std::vector< C_FLOAT64 > | mAmu |
C_FLOAT64 | mA0 |
std::vector< C_FLOAT64 > | mAmuOld |
bool | mDoCorrection |
bool | mHasAssignments |
CRandom * | mpRandomGenerator |
CModel * | mpModel |
CDependencyGraph | mDG |
std::vector< std::vector < CStochBalance > > | mLocalBalances |
std::vector< std::vector < CStochBalance > > | mLocalSubstrates |
std::vector< C_INT64 > | mNumbers |
unsigned C_INT32 | mNumReactions |
unsigned C_INT32 | mFirstMetabIndex |
Friends | |
CTrajectoryMethod * | CTrajectoryMethod::createTrajectoryMethod (CCopasiMethod::SubType subType, CTrajectoryProblem *pProblem) |
CStochMethod::CStochMethod | ( | const CCopasiContainer * | pParent = NULL | ) | [protected] |
Default constructor.
const | CCopasiContainer * pParent (default: NULL) |
CStochMethod::CStochMethod | ( | const CStochMethod & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor.
const | CStochMethod & src, |
const | CCopasiContainer * pParent (Default: NULL) |
CStochMethod::~CStochMethod | ( | ) |
Destructor.
C_INT32 CStochMethod::calculateAmu | ( | C_INT32 | reaction_index | ) | [protected] |
Calculate one of the propensities
virtual C_FLOAT64 CStochMethod::doSingleStep | ( | C_FLOAT64 | time, |
C_FLOAT64 | endtime | ||
) | [protected, pure virtual] |
Do one iteration of the simulation
Implemented in CStochNextReactionMethod.
bool CStochMethod::elevateChildren | ( | ) | [virtual] |
This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.
Reimplemented from CCopasiParameterGroup.
C_INT32 CStochMethod::generateReactionIndex | ( | ) | [protected] |
Generate the index of a putative reaction.
C_FLOAT64 CStochMethod::generateReactionTime | ( | ) | [protected] |
Generate the putative time taken before any reaction takes place
C_FLOAT64 CStochMethod::generateReactionTime | ( | C_INT32 | reaction_index | ) | [protected] |
Generate the putative time taken before a special reaction takes place
virtual void CStochMethod::initMethod | ( | C_FLOAT64 | start_time | ) | [protected, pure virtual] |
Initialization.
bool CStochMethod::isValidProblem | ( | const CCopasiProblem * | pProblem | ) | [virtual] |
Check if the method is suitable for this problem
Reimplemented from CTrajectoryMethod.
bool CStochMethod::modelHasAssignments | ( | const CModel * | pModel | ) | [static, protected] |
tests if the model contains a global value with an assignment rule that is used in calculations
void CStochMethod::setupDependencyGraphAndBalances | ( | ) | [protected] |
Set up the dependency graph and the balances
void CStochMethod::start | ( | const CState * | initialState | ) | [virtual] |
This instructs the method to prepare for integration starting with the initialState given.
const CState * | initialState |
Reimplemented from CTrajectoryMethod.
CTrajectoryMethod::Status CStochMethod::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.
const double & | deltaT |
Reimplemented from CTrajectoryMethod.
C_INT32 CStochMethod::updatePropensities | ( | ) | [protected] |
Calculate the propensities for all reactions
C_INT32 CStochMethod::updateSystemState | ( | C_INT32 | reaction_index | ) | [protected] |
Update the particle numbers according to which reaction ocurred
CTrajectoryMethod* CTrajectoryMethod::createTrajectoryMethod | ( | CCopasiMethod::SubType | subType, |
CTrajectoryProblem * | pProblem | ||
) | [friend] |
C_FLOAT64 CStochMethod::mA0 [protected] |
The sum of the propensities
std::vector<C_FLOAT64> CStochMethod::mAmu [protected] |
The propensities for the reactions
std::vector<C_FLOAT64> CStochMethod::mAmuOld [protected] |
The stored propensities for the reactions before the last update
CDependencyGraph CStochMethod::mDG [protected] |
The graph of reactions and their dependent reactions. When a reaction is executed, the propensities for each of its dependents must be updated.
bool CStochMethod::mDoCorrection [protected] |
indicates if the correction N^2 -> N*(N-1) should be performed
unsigned C_INT32 CStochMethod::mFirstMetabIndex [protected] |
index of first metab in a CState
bool CStochMethod::mHasAssignments [protected] |
Indicates whether the model has global quantities with assignment rules. If it has, we will use a less efficient way to update the model state to handle this.
std::vector< std::vector <CStochBalance> > CStochMethod::mLocalBalances [protected] |
The balances of the reactions as integers
std::vector< std::vector <CStochBalance> > CStochMethod::mLocalSubstrates [protected] |
the substrates of each reaction with their multiplicities
std::vector<C_INT64> CStochMethod::mNumbers [protected] |
The particle numbers
unsigned C_INT32 CStochMethod::mNumReactions [protected] |
CModel* CStochMethod::mpModel [protected] |
A pointer to the instance of CModel being used.
CRandom* CStochMethod::mpRandomGenerator [protected] |
The random number generator