COPASI API  4.16.103
COptMethodPraxis.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/optimization/COptMethodPraxis.h,v $
3 // $Revision: 1.7 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2009/08/12 20:21:40 $
7 // End CVS Header
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 /**
19  * COptMethodPraxis class
20  */
21 
22 #ifndef COPASI_COptMethodPraxis
23 #define COPASI_COptMethodPraxis
24 
25 #include <vector>
26 #include "utilities/CMatrix.h"
28 
29 #include "CPraxis.h"
30 
31 class FPraxis;
32 class CPraxis;
33 
35 {
37 
38  // Operations
39 public:
40  /**
41  * Copy Constructor
42  * @param const COptMethodPraxis & src
43  * @param const CCopasiContainer * pParent (default: NULL)
44  */
46  const CCopasiContainer * pParent = NULL);
47 
48  /**
49  * Destructor
50  */
51  virtual ~COptMethodPraxis();
52 
53  /**
54  * Execute the optimization algorithm calling simulation routine
55  * when needed. It is noted that this procedure can give feedback
56  * of its progress by the callback function set with SetCallback.
57  * @ return success;
58  */
59  virtual bool optimise();
60 
61 private:
62  /**
63  * Default Constructor
64  * @param const CCopasiContainer * pParent (default: NULL)
65  */
66  COptMethodPraxis(const CCopasiContainer * pParent = NULL);
67 
68  /**
69  * Initialize contained objects.
70  */
71  void initObjects();
72 
73  /**
74  * Initialize arrays and pointer.
75  * @return bool success
76  */
77  virtual bool initialize();
78 
79  /**
80  * Cleanup arrays and pointers.
81  * @return bool success
82  */
83  virtual bool cleanup();
84 
85  /**
86  * The tolerance
87  */
89 
90  /**
91  * The number of iterations
92  */
93  unsigned C_INT32 mIteration;
94 
95  /**
96  * Handle to the process report item "Current Iteration"
97  */
98  unsigned C_INT32 mhIteration;
99 
100  /**
101  * number of parameters
102  */
104 
105  /**
106  * The current solution guess
107  */
109 
110  /**
111  * The last individual
112  */
114 
115  /**
116  * The best value found so far
117  */
119 
120  /**
121  * The result of a function evaluation
122  */
124 
125  /**
126  * Flag indicating whether the computation shall continue
127  */
128  bool mContinue;
129 
130  /**
131  * Functor pointing to the Praxis method.
132  */
134 
135  /**
136  * CPraxis function.
137  */
139 
141 
142  /**
143  * Evaluate the objective function
144  * @return bool continue
145  */
146  const C_FLOAT64 & evaluate();
147 };
148 
149 #endif // COPASI_COptMethodPraxis
virtual ~COptMethodPraxis()
#define C_INT
Definition: copasi.h:115
static COptMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::RandomSearch)
Definition: COptMethod.cpp:50
CVector< C_FLOAT64 > mBest
unsigned C_INT32 mhIteration
virtual bool optimise()
const C_FLOAT64 & evaluateFunction(C_FLOAT64 *, C_INT *)
#define C_INT32
Definition: copasi.h:90
CVector< C_FLOAT64 > mCurrent
unsigned C_INT32 mIteration
COptMethodPraxis(const COptMethodPraxis &src, const CCopasiContainer *pParent=NULL)
#define C_FLOAT64
Definition: copasi.h:92
C_FLOAT64 mEvaluationValue
virtual bool initialize()
virtual bool cleanup()
const C_FLOAT64 & evaluate()