COPASI API  4.16.103
CCrossSectionProblem.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 #ifndef CCROSSSECTIONPROBLEM_H
7 #define CCROSSSECTIONPROBLEM_H
8 
10 
12 {
13 public:
14  /**
15  * Default constructor.
16  * @param const CCopasiContainer * pParent (default: NULL)
17  */
18  CCrossSectionProblem(const CCopasiContainer * pParent = NULL);
19 
20  /**
21  * Copy constructor.
22  * @param "const CCrossSectionProblem &" src
23  * @paramconst CCopasiContainer * pParent (default: NULL)
24  */
26  const CCopasiContainer * pParent = NULL);
27 
28  /**
29  * Destructor.
30  */
31  virtual ~CCrossSectionProblem();
32 
33  /**
34  * Function to get mpFlagLimitCrossings
35  */
36  bool getFlagLimitCrossings() const;
37 
38  /**
39  * Function to get mpCrossingsLimit
40  */
41  const unsigned C_INT32 &getCrossingsLimit() const;
42 
43  /**
44  * Function to get mpFlagLimitOutCrossings
45  */
46  bool getFlagLimitOutCrossings() const;
47 
48  /**
49  * Function to get mpOutCrossingsLimit
50  */
51  const unsigned C_INT32 &getOutCrossingsLimit() const;
52 
53  /**
54  * Function to get mpFlagLimitOutTime
55  */
56  bool getFlagLimitOutTime() const;
57 
58  /**
59  * Function to get mpTimeLimit
60  */
61  const C_FLOAT64 &getTimeLimit() const;
62 
63  /**
64  * return the variable
65  */
66  const std::string& getSingleObjectCN() const;
67  /*
68  * set the variable
69  */
70  void setSingleObjectCN(const std::string& cn);
71  void setSingleObjectCN(const CCopasiObject* pObject);
72  const C_FLOAT64& getThreshold() const;
73  void setThreshold(const C_FLOAT64 &threshold);
74 
75  /**
76  * Function to get mpFlagLimitConvergence
77  */
78  bool getFlagLimitConvergence() const;
79 
80  /**
81  * Function to get mpConvergenceTolerance
82  */
83  const C_FLOAT64 &getConvergenceTolerance() const;
84 
85  /**
86  * Function to set mpFlagLimitConvergence
87  */
88  void setFlagLimitConvergence(bool flagLimitConvergence);
89 
90  /**
91  * Function to set mpConvergenceTolerance
92  */
93  void setConvergenceTolerance(const C_FLOAT64 &convergenceTolerance);
94 
95  /**
96  * Function to get mpFlagLimitOutConvergence
97  */
98  bool getFlagLimitOutConvergence() const;
99 
100  /**
101  * Function to get mpConvergenceOutTolerance
102  */
103  const C_FLOAT64 &getConvergenceOutTolerance() const;
104 
105  /**
106  * Function to set mpFlagLimitOutConvergence
107  */
108  void setFlagLimitOutConvergence(bool flagLimitConvergence);
109 
110  /**
111  * Function to set mpConvergenceOutTolerance
112  */
113  void setConvergenceOutTolerance(const C_FLOAT64 &convergenceTolerance);
114 
115  bool isPositiveDirection() const;
116  void setPositiveDirection(bool isPositive);
117 
118  /**
119  * Function to set mpFlagLimitCrossings
120  */
121  void setFlagLimitCrossings(bool flagLimitCrossing);
122 
123  /**
124  * Function to set mpCrossingsLimit
125  */
126  void setCrossingsLimit(const unsigned C_INT32 &crossingLimit);
127 
128  /**
129  * Function to set mpFlagLimitOutCrossings
130  */
131  void setFlagLimitOutCrossings(bool flagLimitCrossing);
132 
133  /**
134  * Function to set mpOutCrossingsLimit
135  */
136  void setOutCrossingsLimit(const unsigned C_INT32 &crossingLimit);
137 
138  /**
139  * Function to set mpFlagLimitOutTime
140  */
141  void setFlagLimitOutTime(bool flagLimitTime);
142 
143  /**
144  * Function to set mpTimeLimit
145  */
146  void setTimeLimit(const C_FLOAT64 &timeLimit);
147 
148  /**
149  * This is the output method for any result of a problem. The default implementation
150  * provided with CCopasiProblem. Does only print "Not implemented." To overide this
151  * default behaviour one needs to reimplement the virtual printResult function.
152  * @param std::ostream * ostream
153  */
154  //virtual void printResult(std::ostream * ostream) const;
155 
156  /**
157  * Output stream operator. Prints description of the problem
158  * @param ostream & os
159  * @param const Problem & A
160  * @return ostream & os
161  */
162  friend std::ostream &operator<<(std::ostream &os, const CCrossSectionProblem & o);
163 
164  /**
165  * This is the output method for any object. It calls the insert operator<<
166  * @param std::ostream * ostream
167  */
168  virtual void print(std::ostream * ostream) const;
169 
170 private:
171 
172  //overload these member functions just to make sure they are not used in this
173  //derived class
174  unsigned C_INT32 getStepNumber() const {return 0;}
175  C_FLOAT64 getStepSize() const {return 0.0;}
176 
177  /**
178  * Initialize the parameters
179  */
180  void initializeParameter();
181 
182  void initObjects();
183 
184  /**
185  * this flag indicates whether the calculation should be stopped after a given number
186  * of detected crossings
187  *
188  * this member variable is mapped to a CCopasiParameter
189  */
191 
192  /**
193  * this variable indicates after how many crossings the calculation should be stopped
194  * if the corresponding flag is true.
195  *
196  * this member variable is mapped to a CCopasiParameter
197  */
199 
200  /**
201  * this flag indicates whether the calculation should be stopped when convergence is reached
202  *
203  * this member variable is mapped to a CCopasiParameter
204  */
206 
207  /**
208  * this variable indicates the tolerance after which the calculation should be considered
209  * converged
210  *
211  * this member variable is mapped to a CCopasiParameter
212  */
214 
215  /**
216  * this flag indicates whether the output should only be collected once
217  * convergence is reached
218  *
219  * this member variable is mapped to a CCopasiParameter
220  */
222 
223  /**
224  * this variable indicates the tolerance after which the calculation should be considered
225  * converged and output should commence
226  *
227  * this member variable is mapped to a CCopasiParameter
228  */
230 
231  /**
232  * this flag indicates whether the output should be collected after a given number
233  * of detected crossings
234  *
235  * this member variable is mapped to a CCopasiParameter
236  */
238 
239  /**
240  * this variable indicates after how many crossings the output should start
241  * if the corresponding flag is true.
242  *
243  * this member variable is mapped to a CCopasiParameter
244  */
246 
247  /**
248  * this flag indicates whether output should be selected after a delay
249  *
250  * this member variable is mapped to a CCopasiParameter
251  */
253 
254  /**
255  * this variable holds the trigger expression
256  *
257  * this member variable is mapped to a CCopasiParameter
258  */
259  std::string * mpTriggerExpression;
260  std::string * mSingleObjectCN;
263 };
264 
265 #endif // CCROSSSECTIONPROBLEM_H
const C_FLOAT64 & getTimeLimit() const
void setTimeLimit(const C_FLOAT64 &timeLimit)
const std::string & getSingleObjectCN() const
void setCrossingsLimit(const unsigned C_INT32 &crossingLimit)
C_FLOAT64 * mpConvergenceOutTolerance
bool getFlagLimitCrossings() const
void setConvergenceTolerance(const C_FLOAT64 &convergenceTolerance)
unsigned C_INT32 getStepNumber() const
void setThreshold(const C_FLOAT64 &threshold)
void setFlagLimitOutTime(bool flagLimitTime)
const C_FLOAT64 & getConvergenceOutTolerance() const
void setFlagLimitConvergence(bool flagLimitConvergence)
#define C_INT32
Definition: copasi.h:90
std::string * mpTriggerExpression
void setPositiveDirection(bool isPositive)
bool getFlagLimitConvergence() const
void setFlagLimitOutCrossings(bool flagLimitCrossing)
void setFlagLimitCrossings(bool flagLimitCrossing)
virtual void print(std::ostream *ostream) const
const C_FLOAT64 & getThreshold() const
unsigned C_INT32 * mpCrossingsLimit
void setConvergenceOutTolerance(const C_FLOAT64 &convergenceTolerance)
CCrossSectionProblem(const CCopasiContainer *pParent=NULL)
const unsigned C_INT32 & getCrossingsLimit() const
const unsigned C_INT32 & getOutCrossingsLimit() const
const C_FLOAT64 & getConvergenceTolerance() const
bool getFlagLimitOutCrossings() const
#define C_FLOAT64
Definition: copasi.h:92
friend std::ostream & operator<<(std::ostream &os, const CCrossSectionProblem &o)
void setSingleObjectCN(const std::string &cn)
bool getFlagLimitOutConvergence() const
void setFlagLimitOutConvergence(bool flagLimitConvergence)
C_FLOAT64 getStepSize() const
void setOutCrossingsLimit(const unsigned C_INT32 &crossingLimit)
unsigned C_INT32 * mpOutCrossingsLimit