COPASI API  4.16.103
CTrajectoryProblem.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2014 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2002 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 /**
16  * CTrajectoryProblem class.
17  * This class describes the trajectory problem, i.e., it allows to specify
18  * for example initial conditions and number of steps.
19  *
20  * Created for Copasi by Stefan Hoops 2002
21  */
22 
23 #ifndef COPASI_CTrajectoryProblem
24 #define COPASI_CTrajectoryProblem
25 
26 #include <string>
27 
29 #include "utilities/CReadConfig.h"
30 
32 {
33 public:
34  // Operations
35 
36  /**
37  * Default constructor.
38  * @param const CCopasiContainer * pParent (default: NULL)
39  */
40  CTrajectoryProblem(const CCopasiContainer * pParent = NULL);
41 
42  /**
43  * Copy constructor.
44  * @param const CTrajectoryProblem & src
45  * @paramconst CCopasiContainer * pParent (default: NULL)
46  */
48  const CCopasiContainer * pParent = NULL);
49 
50  /**
51  * Destructor.
52  */
54 
55  /**
56  * This methods must be called to elevate subgroups to
57  * derived objects. The default implementation does nothing.
58  * @return bool success
59  */
60  virtual bool elevateChildren();
61 
62  /**
63  * Set the number of time steps the trajectory method should integrate.
64  * @param "const unsigned C_INT32 &" stepNumber
65  * @parem bool success
66  */
67  void setStepNumber(const unsigned C_INT32 & stepNumber);
68 
69  /**
70  * Retrieve the number of time steps the trajectory method should integrate.
71  * @return "const unsigned C_INT32 &" stepNumber
72  */
73  const unsigned C_INT32 & getStepNumber() const;
74 
75  /**
76  * Set the size a integration step the trajectory method should do.
77  * @param "const C_FLOAT64 &" stepSize
78  * @parem bool success
79  */
80  void setStepSize(const C_FLOAT64 & stepSize);
81 
82  /**
83  * Retrieve the size a integration step the trajectory method should do.
84  * @return "const C_FLOAT64 &" stepSize
85  */
86  const C_FLOAT64 & getStepSize() const;
87 
88  /**
89  * Set the end time.
90  * @param "const C_FLOAT64 &" duration
91  * @parem bool success
92  */
93  void setDuration(const C_FLOAT64 & duration);
94 
95  /**
96  * Retrieve the end time.
97  * @return "const C_FLOAT64 &" duration
98  */
99  const C_FLOAT64 & getDuration() const;
100 
101  /**
102  * Set the end time.
103  * @param "const C_FLOAT64 &" endTime
104  */
105  void setOutputStartTime(const C_FLOAT64 & endTime);
106 
107  /**
108  * Retrieve the end time.
109  * @return "const C_FLOAT64 &" endTime
110  */
111  const C_FLOAT64 & getOutputStartTime() const;
112 
113  /**
114  *.
115  */
116  void setTimeSeriesRequested(bool flag);
117 
118  /**
119  *
120  */
121  bool timeSeriesRequested() const;
122 
123  /**
124  * Set whether to output events in addition to the normal steps
125  * @param const bool & outputEvent
126  */
127  void setOutputEvent(const bool & outputEvent);
128 
129  /**
130  * Retrieve whether to do additional output for events.
131  */
132  const bool & getOutputEvent() const;
133 
134  /**
135  * Set whether to continue on simultaneous events
136  * @param const bool & continueSimultaneousEvents
137  */
138  void setContinueSimultaneousEvents(const bool & continueSimultaneousEvents);
139 
140  /**
141  * Retrieve whether to continue on simultaneous events.
142  * @return const bool & continueSimultaneousEvents
143  */
144  const bool & getContinueSimultaneousEvents() const;
145 
146  /**
147  * Load a trajectory problem
148  * @param "CReadConfig &" configBuffer
149  * @param "CReadConfig::Mode mode (Default: CReadConfig::NEXT)
150  */
151  void load(CReadConfig & configBuffer,
153 
154 private:
155  /**
156  * Initialize the method parameter
157  */
158  void initializeParameter();
159 
160  /**
161  * This function synchronizes step size and number
162  * @return bool success
163  */
164  bool sync();
165 
166  void initObjects();
167 
168  // Attributes
169 protected:
170  /**
171  * Pointer to parameter value for duration.
172  */
174 
175  /**
176  * Pointer to parameter value for step size.
177  */
179 
180  /**
181  * Pointer to parameter value for step number
182  */
183  unsigned C_INT32 * mpStepNumber;
184 
185  /**
186  * Pointer to parameter value indicating whether a time series needs to be
187  * stored in memory
188  */
190 
191  /**
192  * Pointer to parameter value for output start time
193  */
195 
196  /**
197  * Pointer to parameter value indicating whether events should be added to the
198  * output
199  */
201 
202  /**
203  * Pointer to parameter value indicating whether to continue when simultaneous events
204  * are encountered
205  */
207 
208  /**
209  * Indicate whether the step number or step size was set last.
210  */
212 };
213 
214 #endif // COPASI_CTrajectoryProblem
void setContinueSimultaneousEvents(const bool &continueSimultaneousEvents)
const unsigned C_INT32 & getStepNumber() const
void setDuration(const C_FLOAT64 &duration)
#define C_INT32
Definition: copasi.h:90
unsigned C_INT32 * mpStepNumber
const C_FLOAT64 & getStepSize() const
void setStepSize(const C_FLOAT64 &stepSize)
const C_FLOAT64 & getDuration() const
void setOutputEvent(const bool &outputEvent)
void setTimeSeriesRequested(bool flag)
void setStepNumber(const unsigned C_INT32 &stepNumber)
virtual bool elevateChildren()
long int flag
Definition: f2c.h:52
C_FLOAT64 * mpOutputStartTime
const C_FLOAT64 & getOutputStartTime() const
bool timeSeriesRequested() const
#define C_FLOAT64
Definition: copasi.h:92
void setOutputStartTime(const C_FLOAT64 &endTime)
void load(CReadConfig &configBuffer, CReadConfig::Mode mode=CReadConfig::NEXT)
const bool & getContinueSimultaneousEvents() const
CTrajectoryProblem(const CCopasiContainer *pParent=NULL)
const bool & getOutputEvent() const