COPASI API  4.16.103
CLNAMethod.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/lna/CLNAMethod.h,v $
3 // $Revision: 1.1 $
4 // $Name: $
5 // $Author: jpahle $
6 // $Date: 2011/05/24 17:33:44 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 #ifndef COPASI_CLNAMethod_H__
15 #define COPASI_CLNAMethod_H__
16 
17 #include <vector>
18 #include "utilities/CMatrix.h"
22 
23 #define LNA_OK 0
24 #define LNA_NOT_OK 1
25 
26 class CModel;
27 
29 {
30 public:
31  enum EVStatus
32  {
33  allNeg = 0,
35  };
36 
37 private:
38 
40 
41  /**
42  * LNA Matrices
43  */
46 
49 
52 
53  // Jacobian matrix of the reduced system
55 
56  // Link matrix that links the dependent and the reduced system
58 
60 
62 
64 
65  void initObjects();
66 
67 public:
68  /**
69  * Create a LNA method.
70  * Note: the returned object has to be released after use with delete
71  */
73 
74 
75  /**
76  * Default constructor
77  * @param const CCopasiContainer * pParent (Default: NULL)
78  */
79  CLNAMethod(const CCopasiContainer * pParent = NULL);
80 
81  /**
82  * Copy constructor
83  * @param const CLNAMethod & src
84  * @param const CCopasiContainer * pParent (Default: NULL)
85  */
86  CLNAMethod(const CLNAMethod & src,
87  const CCopasiContainer * pParent = NULL);
88 
89  /**
90  * Deconstructor
91  */
92  virtual ~CLNAMethod();
93 
94  /**
95  * This methods must be called to elevate subgroups to
96  * derived objects. The default implementation does nothing.
97  * @return bool success
98  */
99  virtual bool elevateChildren();
100 
102  {return mBMatrixReduced;}
103 
105  {return mBMatrixReducedAnn;}
106 
108  {return mCovarianceMatrix;}
109 
111  {return mCovarianceMatrixAnn;}
112 
114  {return mCovarianceMatrixReduced;}
115 
118 
119  // remove the following, or change scaled versions to
120  // fano factors, coefficient of variations etc.
122  {return mBMatrixReducedAnn;}
123 
125  {return mBMatrixReducedAnn;}
126 
128  {return mCovarianceMatrixAnn;}
129 
132 
134  {return mCovarianceMatrixAnn;}
135 
138 
139 
141 
143 
144  /**
145  * Resizes all result matrices and updates the corresponding
146  * array annotations.
147  * This needs to be called before output initialization (in case
148  * the output references parts of the matrix) from the task
149  * initialization, but it also needs to be called before
150  * selecting elements of the matrices in the object selection
151  * dialog.
152  * The model needs to be set before calling this.
153  */
154  virtual void resizeAllMatrices();
155 
156  /**
157  * Set the Model
158  */
159  void setModel(CModel* model);
160 
161  /**
162  * Get the Model
163  */
164  const CModel* getModel() const;
165 
166  /**
167  * the LNA entry point
168  */
169  int CalculateLNA();
170 
171  /**
172  *
173  */
174  virtual bool process();
175 
176  /**
177  * Read some parameters from configuration file
178  */
179  C_INT32 load(CReadConfig & configBuffer);
180 
182 
184 
186  {return mSSStatus;}
187 
189  {return mEVStatus;}
190 
191  void setSteadyStateResolution(C_FLOAT64 factor);
192 
193  /**
194  * Check if the method is suitable for this problem
195  * @return bool suitability of the method
196  */
197  virtual bool isValidProblem(const CCopasiProblem * pProblem);
198 
199 private:
200  /**
201  * Intialize the method parameter
202  */
203  void initializeParameter();
204 };
205 #endif // COPASI_CLNAMethod_H__
CMatrix< C_FLOAT64 > mL
Definition: CLNAMethod.h:57
CArrayAnnotation * mCovarianceMatrixReducedAnn
Definition: CLNAMethod.h:48
const CArrayAnnotation * getUnscaledBMatrixReducedAnn() const
Definition: CLNAMethod.h:124
const CLNAMethod::EVStatus & getEigenValueStatus() const
Definition: CLNAMethod.h:188
const CMatrix< C_FLOAT64 > & getBMatrixReduced() const
Definition: CLNAMethod.h:101
void calculateCovarianceMatrixFull()
Definition: CLNAMethod.cpp:518
CMatrix< C_FLOAT64 > mCovarianceMatrix
Definition: CLNAMethod.h:50
C_FLOAT64 mSteadyStateResolution
Definition: CLNAMethod.h:59
CLNAMethod(const CCopasiContainer *pParent=NULL)
Definition: CLNAMethod.cpp:29
virtual bool elevateChildren()
Definition: CLNAMethod.cpp:101
const CSteadyStateMethod::ReturnCode & getSteadyStateStatus() const
Definition: CLNAMethod.h:185
C_INT32 load(CReadConfig &configBuffer)
Definition: CLNAMethod.cpp:624
virtual bool process()
Definition: CLNAMethod.cpp:636
virtual void resizeAllMatrices()
Definition: CLNAMethod.cpp:107
const CArrayAnnotation * getBMatrixReducedAnn() const
Definition: CLNAMethod.h:104
CLNAMethod::EVStatus mEVStatus
Definition: CLNAMethod.h:63
static CLNAMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::linearNoiseApproximation)
Definition: CLNAMethod.cpp:21
const CArrayAnnotation * getScaledBMatrixReducedAnn() const
Definition: CLNAMethod.h:121
const CArrayAnnotation * getScaledCovarianceMatrixAnn() const
Definition: CLNAMethod.h:127
#define C_INT32
Definition: copasi.h:90
virtual ~CLNAMethod()
Definition: CLNAMethod.cpp:82
void setEigenValueStatus(CLNAMethod::EVStatus status)
Definition: CLNAMethod.cpp:647
const CModel * getModel() const
Definition: CLNAMethod.cpp:657
const CArrayAnnotation * getUnscaledCovarianceMatrixReducedAnn() const
Definition: CLNAMethod.h:136
int CalculateLNA()
Definition: CLNAMethod.cpp:601
const CMatrix< C_FLOAT64 > & getCovarianceMatrix() const
Definition: CLNAMethod.h:107
const CArrayAnnotation * getCovarianceMatrixReducedAnn() const
Definition: CLNAMethod.h:116
const CArrayAnnotation * getUnscaledCovarianceMatrixAnn() const
Definition: CLNAMethod.h:133
const CArrayAnnotation * getCovarianceMatrixAnn() const
Definition: CLNAMethod.h:110
const CArrayAnnotation * getScaledCovarianceMatrixReducedAnn() const
Definition: CLNAMethod.h:130
const CMatrix< C_FLOAT64 > & getCovarianceMatrixReduced() const
Definition: CLNAMethod.h:113
CMatrix< C_FLOAT64 > mCovarianceMatrixReduced
Definition: CLNAMethod.h:47
CMatrix< C_FLOAT64 > mBMatrixReduced
Definition: CLNAMethod.h:44
virtual bool isValidProblem(const CCopasiProblem *pProblem)
Definition: CLNAMethod.cpp:663
CMatrix< C_FLOAT64 > mJacobianReduced
Definition: CLNAMethod.h:54
CModel * mpModel
Definition: CLNAMethod.h:39
void setModel(CModel *model)
Definition: CLNAMethod.cpp:591
Header file of class CArrayAnnotation.
#define C_FLOAT64
Definition: copasi.h:92
void initializeParameter()
Definition: CLNAMethod.cpp:87
void initObjects()
Definition: CLNAMethod.cpp:50
int calculateCovarianceMatrixReduced()
Definition: CLNAMethod.cpp:127
void setSteadyStateStatus(CSteadyStateMethod::ReturnCode SSStatus)
Definition: CLNAMethod.cpp:642
CSteadyStateMethod::ReturnCode mSSStatus
Definition: CLNAMethod.h:61
void setSteadyStateResolution(C_FLOAT64 factor)
Definition: CLNAMethod.cpp:652
Definition: CModel.h:50
CArrayAnnotation * mCovarianceMatrixAnn
Definition: CLNAMethod.h:51
CArrayAnnotation * mBMatrixReducedAnn
Definition: CLNAMethod.h:45