COPASI API  4.16.103
COptMethodHookeJeeves.h
Go to the documentation of this file.
1 /* Begin CVS Header
2  $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/optimization/COptMethodHookeJeeves.h,v $
3  $Revision: 1.7 $
4  $Name: $
5  $Author: shoops $
6  $Date: 2011/03/07 19:31:25 $
7  End CVS Header */
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // 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  * COptMethodHookeJeeves class
20  */
21 
22 #ifndef COPASI_COptMethodHookeJeeves
23 #define COPASI_COptMethodHookeJeeves
24 
26 #include "utilities/CVector.h"
27 
28 class CRandom;
29 
31 {
33 
34  // Operations
35 public:
36  /**
37  * Copy Constructor
38  * @param const COptMethodHookeJeeves & src
39  * @param const CCopasiContainer * pParent (default: NULL)
40  */
42  const CCopasiContainer * pParent = NULL);
43 
44  /**
45  * Destructor
46  */
47  virtual ~COptMethodHookeJeeves();
48 
49  /**
50  * Execute the optimization algorithm calling simulation routine
51  * when needed. It is noted that this procedure can give feedback
52  * of its progress by the callback function set with SetCallback.
53  * @ return success;
54  */
55  virtual bool optimise();
56 
57 private:
58  /**
59  * Default Constructor
60  * @param const CCopasiContainer * pParent (default: NULL)
61  */
62  COptMethodHookeJeeves(const CCopasiContainer * pParent = NULL);
63 
64  /**
65  * Initialize contained objects.
66  */
67  void initObjects();
68 
69  /**
70  * Initialize arrays and pointer.
71  * @return bool success
72  */
73  virtual bool initialize();
74 
75  /**
76  * Cleanup arrays and pointers.
77  * @return bool success
78  */
79  virtual bool cleanup();
80 
81  /**
82  * Evaluate the fitness of one individual
83  * @return bool continue
84  */
85  bool evaluate();
86 
87  /**
88  * Finds the best value in the neighborhood of mNew and updates mNew
89  * @return C_FLOAT64 bestValue
90  */
92 
93  // Attributes
94 private:
95 
96  /**
97  * The maximum number of iterations
98  */
100 
101  /**
102  * The tolerance
103  */
105 
106  /**
107  * The length of steps taken
108  */
110 
111  /**
112  * The number of iterations
113  */
114  unsigned C_INT32 mIteration;
115 
116  /**
117  * Handle to the process report item "Current Iteration"
118  */
119  size_t mhIteration;
120 
121  /**
122  * number of parameters
123  */
125 
126  /**
127  * The current individual
128  */
130 
131  /**
132  * The last individual
133  */
135 
136  /**
137  * The new individual
138  */
140 
141  /**
142  * The step taken
143  */
145 
146  /**
147  * The value of the last evaluation.
148  */
150 
151  /**
152  * The best value found so far
153  */
155 
156  /**
157  * Flag indicating whether the computation shall continue
158  */
159  bool mContinue;
160 };
161 
162 #endif // COPASI_COptMethodHookeJeeves
unsigned C_INT32 mIterationLimit
static COptMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::RandomSearch)
Definition: COptMethod.cpp:50
#define C_INT32
Definition: copasi.h:90
COptMethodHookeJeeves(const COptMethodHookeJeeves &src, const CCopasiContainer *pParent=NULL)
CVector< C_FLOAT64 > mBefore
CVector< C_FLOAT64 > mIndividual
#define C_FLOAT64
Definition: copasi.h:92
CVector< C_FLOAT64 > mNew
CVector< C_FLOAT64 > mDelta