COPASI API  4.16.103
COptMethodCoranaWalk.h
Go to the documentation of this file.
1 /* Begin CVS Header
2  $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/optimization/COptMethodCoranaWalk.h,v $
3  $Revision: 1.1 $
4  $Name: $
5  $Author: mendes $
6  $Date: 2012/06/04 14:10:44 $
7  End CVS Header */
8 
9 // Copyright (C) 2012 - 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  * COptMethodCoranaWalk class
20  */
21 
22 #ifndef COPASI_COptMethodCoranaWalk
23 #define COPASI_COptMethodCoranaWalk
24 
25 #include <vector>
26 #include "utilities/CMatrix.h"
28 
29 class CRandom;
30 
32 {
34 
35  // Operations
36 public:
37  /**
38  * Copy Constructor
39  * @param const COptMethodCoranaWalk & src
40  * @param const CCopasiContainer * pParent (default: NULL)
41  */
43  const CCopasiContainer * pParent = NULL);
44 
45  /**
46  * Destructor
47  */
48  virtual ~COptMethodCoranaWalk();
49 
50  /**
51  * Execute the optimization algorithm calling simulation routine
52  * when needed. It is noted that this procedure can give feedback
53  * of its progress by the callback function set with SetCallback.
54  * @ return success;
55  */
56  virtual bool optimise();
57 
58 private:
59  /**
60  * Default Constructor
61  * @param const CCopasiContainer * pParent (default: NULL)
62  */
63  COptMethodCoranaWalk(const CCopasiContainer * pParent = NULL);
64 
65  /**
66  * Initialize contained objects.
67  */
68  void initObjects();
69 
70  /**
71  * Initialize arrays and pointer.
72  * @return bool success
73  */
74  virtual bool initialize();
75 
76  /**
77  * Cleanup arrays and pointers.
78  * @return bool success
79  */
80  virtual bool cleanup();
81 
82  /**
83  * Evaluate the objective function
84  * @return bool continue
85  */
86  const C_FLOAT64 & evaluate();
87 
88  // Attributes
89 private:
90 
91  /**
92  * The current temperature
93  */
95 
96  /**
97  * Handle to the process report item "iterations"
98  */
99  size_t mhIterations;
100 
101  /**
102  * number of iterations
103  */
105 
106  /**
107  * The current iteration
108  */
110 
111  /**
112  * a pointer to the randomnumber generator.
113  */
115 
116  /**
117  * number of parameters
118  */
120 
121  /**
122  * The best value found so far
123  */
125 
126  /**
127  * The result of a function evaluation
128  */
130 
131  /**
132  * Flag indicating whether the computation shall continue
133  */
134  bool mContinue;
135 
136  /**
137  * The current solution guess
138  */
140 
141  /**
142  * The result of a function evaluation for mCurrent
143  */
145 
146  /**
147  * The step taken
148  */
150 
151  /**
152  * The number of accepted steps
153  */
155 };
156 
157 #endif // COPASI_COptMethodCoranaWalk
unsigned C_INT32 mIterations
COptMethodCoranaWalk(const COptMethodCoranaWalk &src, const CCopasiContainer *pParent=NULL)
static COptMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::RandomSearch)
Definition: COptMethod.cpp:50
unsigned C_INT32 mCurrentIteration
#define C_INT32
Definition: copasi.h:90
CVector< size_t > mAccepted
#define C_FLOAT64
Definition: copasi.h:92
CVector< C_FLOAT64 > mCurrent
CVector< C_FLOAT64 > mStep
const C_FLOAT64 & evaluate()