COPASI API  4.16.103
CScanProblem.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) 2003 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 /**
16  * CScanProblem class.
17  */
18 
19 #ifndef COPASI_CScanProblem
20 #define COPASI_CScanProblem
21 
22 #include <string>
23 
25 #include "utilities/CReadConfig.h"
26 //#include "model/CState.h"
27 
28 //class CModel;
29 
31 {
32 public:
33  enum Type
34  {
39  };
40 
41 private:
42 
43  /**
44  * This holds the scan items
45  */
47 
48 public:
49 
50  /**
51  * Default constructor.
52  * @param const CCopasiContainer * pParent (default: NULL)
53  */
54  CScanProblem(const CCopasiContainer * pParent = NULL);
55 
56  /**
57  * Copy constructor.
58  * @param const CTrajectoryProblem & src
59  * @paramconst CCopasiContainer * pParent (default: NULL)
60  */
61  CScanProblem(const CScanProblem & src,
62  const CCopasiContainer * pParent = NULL);
63 
64  /**
65  * Destructor.
66  */
67  ~CScanProblem();
68 
69  /**
70  * Set the type of the subtask.
71  */
72  void setSubtask(CCopasiTask::Type type);
73 
74  /**
75  * Get the type of the subtask.
76  */
78 
79  /**
80  * Set if output should be done after every step of the subtask.
81  */
82  void setOutputInSubtask(bool ois);
83 
84  /**
85  * Ask if output should be done after every step of the subtask.
86  */
87  const bool & getOutputInSubtask() const;
88 
89  /**
90  * Set whether the subtask should continue with its last result.
91  */
92  void setContinueFromCurrentState(bool aic);
93 
94  /**
95  * Retrieve whether the subtask should continue with its last result.
96  */
97  bool getContinueFromCurrentState() const;
98 
99  size_t getNumberOfScanItems() const;
100 
101  const CCopasiParameterGroup* getScanItem(size_t index) const;
102  CCopasiParameterGroup* getScanItem(size_t index);
103 
104  CCopasiParameterGroup* addScanItem(CScanProblem::Type type, size_t steps = 5, const CCopasiObject* obj = NULL);
105 
106  bool removeScanItem(const size_t & index);
107 
108  static CCopasiParameterGroup* createScanItem(CScanProblem::Type type, size_t steps = 5, const CCopasiObject* obj = NULL);
109 
110  void clearScanItems();
111 
112  /**
113  * Load a scan problem
114  * @param "CReadConfig &" configBuffer
115  * @param "CReadConfig::Mode mode (Default: CReadConfig::NEXT)
116  */
117  void load(CReadConfig & configBuffer,
119 
120  /**
121  * Fix files written with Version 4.12.81 and earlier, which wrote the exp(mean) and exp(std. deviation) for
122  * normal random distributions in the scan task.
123  */
124  void fixBuild81();
125 
126 private:
127  /**
128  * Initialize the method parameter
129  */
130  void initializeParameter();
131 };
132 
133 #endif
void setSubtask(CCopasiTask::Type type)
CScanProblem(const CCopasiContainer *pParent=NULL)
size_t getNumberOfScanItems() const
void clearScanItems()
CCopasiParameterGroup * addScanItem(CScanProblem::Type type, size_t steps=5, const CCopasiObject *obj=NULL)
static CCopasiParameterGroup * createScanItem(CScanProblem::Type type, size_t steps=5, const CCopasiObject *obj=NULL)
void setContinueFromCurrentState(bool aic)
bool getContinueFromCurrentState() const
void setOutputInSubtask(bool ois)
CCopasiParameterGroup * mpScanItems
Definition: CScanProblem.h:46
void initializeParameter()
const bool & getOutputInSubtask() const
CCopasiTask::Type getSubtask() const
const CCopasiParameterGroup * getScanItem(size_t index) const
void load(CReadConfig &configBuffer, CReadConfig::Mode mode=CReadConfig::NEXT)
bool removeScanItem(const size_t &index)