copasi API  0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
CTrajectoryMethod Class Reference

#include <CTrajectoryMethod.h>

Inheritance diagram for CTrajectoryMethod:
CCopasiMethod CCopasiParameterGroup CCopasiParameter CCopasiContainer CCopasiObject CHybridMethod CHybridMethodLSODA CLsodaMethod CStochDirectMethod CStochMethod CTauLeapMethod CTrajAdaptiveSA CHybridNextReactionRKMethod CHybridNextReactionLSODAMethod CTrajectoryMethodDsaLsodar CStochNextReactionMethod

List of all members.

Public Types

enum  Status { FAILURE = -1, NORMAL = 0, ROOT = 1 }

Public Member Functions

 CTrajectoryMethod (const CTrajectoryMethod &src, const CCopasiContainer *pParent=NULL)
 ~CTrajectoryMethod ()
void setCurrentState (CState *currentState)
void setProblem (CTrajectoryProblem *problem)
virtual void stateChanged ()
virtual Status step (const double &deltaT)
virtual void start (const CState *initialState)
const CVector< C_INT > & getRoots () const
virtual bool isValidProblem (const CCopasiProblem *pProblem)

Static Public Member Functions

static CTrajectoryMethodcreateTrajectoryMethod (CCopasiMethod::SubType subType=CCopasiMethod::deterministic, CTrajectoryProblem *pProblem=NULL)

Protected Member Functions

 CTrajectoryMethod (const CCopasiMethod::SubType &subType, const CCopasiContainer *pParent=NULL)

Protected Attributes

CStatempCurrentState
CTrajectoryProblemmpProblem
CVector< C_INT > mRoots

Member Enumeration Documentation

Enumeration value for the return value

Enumerator:
FAILURE 
NORMAL 
ROOT 

Constructor & Destructor Documentation

CTrajectoryMethod::CTrajectoryMethod ( const CCopasiMethod::SubType subType,
const CCopasiContainer pParent = NULL 
) [protected]

Default constructor.

Parameters:
constCCopasiMethod::SubType & subType
constCCopasiContainer * pParent (default: NULL)

Default constructor.

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

Copy constructor.

Parameters:
const CTrajectoryMethod &src
constCCopasiContainer * pParent (default: NULL)

Copy constructor.

Parameters:
const CTrajectoryMethod &src
CTrajectoryMethod::~CTrajectoryMethod ( )

Destructor.


Member Function Documentation

CTrajectoryMethod * CTrajectoryMethod::createTrajectoryMethod ( CCopasiMethod::SubType  subType = CCopasiMethod::deterministic,
CTrajectoryProblem pProblem = NULL 
) [static]

Create a trajectory method for a special problem. Note: the returned object has to be released after use with delete a problem is also passed so that the method has a chance to choose an appropriate simulation method.

CTrajectoryMethod class. This class describes the interface to all integration methods. The various method like LSODA or Gillespie have to be derived from this class.

Created for COPASI by Stefan Hoops 2002

const CVector< C_INT > & CTrajectoryMethod::getRoots ( ) const

Retrieve the roots.

Returns:
const CVector< C_INT > & roots
bool CTrajectoryMethod::isValidProblem ( const CCopasiProblem pProblem) [virtual]

Check if the method is suitable for this problem

Returns:
bool suitability of the method

Reimplemented from CCopasiMethod.

Reimplemented in CTrajectoryMethodDsaLsodar, CStochMethod, CTrajAdaptiveSA, CHybridMethodLSODA, CStochDirectMethod, CHybridMethod, and CTauLeapMethod.

void CTrajectoryMethod::setCurrentState ( CState currentState)

Set a pointer to the current state. This method is used by CTrajectoryTask::process() The results of the simulation are passed via this CState variable

Parameters:
CState *currentState
void CTrajectoryMethod::setProblem ( CTrajectoryProblem problem)

Set a pointer to the problem. This method is used by CTrajectory

Parameters:
CTrajectoryProblem *problem
virtual void CTrajectoryMethod::start ( const CState initialState) [virtual]

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

Parameters:
const CState *initialState

Reimplemented in CTrajectoryMethodDsaLsodar, CLsodaMethod, CStochMethod, CTrajAdaptiveSA, CHybridMethodLSODA, CStochDirectMethod, CHybridMethod, and CTauLeapMethod.

void CTrajectoryMethod::stateChanged ( ) [virtual]

Inform the trajectory method that the state has changed outside its control

Reimplemented in CTrajectoryMethodDsaLsodar, and CLsodaMethod.

virtual Status CTrajectoryMethod::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 in CTrajectoryMethodDsaLsodar, CLsodaMethod, CStochMethod, CTrajAdaptiveSA, CHybridMethodLSODA, CStochDirectMethod, CHybridMethod, and CTauLeapMethod.


Member Data Documentation

A pointer to the current state. This is set from outside with the setState() method and never changed anywhere else. It's used to report the results to the calling TrajectoryTask

A pointer to the trajectory problem.

CVector< C_INT > CTrajectoryMethod::mRoots [protected]

Vector containing information on the current roots


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