39 |
*/ |
*/ |
40 |
Ecosystem(const MainInfo& main); |
Ecosystem(const MainInfo& main); |
41 |
/** |
/** |
42 |
|
* \brief This is the Ecosystem constructor specifying details about the model |
43 |
|
* \param main is the MainInfo specifying the command line options for the model run |
44 |
|
*/ |
45 |
|
Ecosystem(const Ecosystem& ecosystem); |
46 |
|
/** |
47 |
* \brief This is the default Ecosystem destructor |
* \brief This is the default Ecosystem destructor |
48 |
*/ |
*/ |
49 |
~Ecosystem(); |
~Ecosystem(); |
116 |
* \brief This function will display information about the optimised values of the parameters |
* \brief This function will display information about the optimised values of the parameters |
117 |
*/ |
*/ |
118 |
void writeOptValues(); |
void writeOptValues(); |
|
//FIXME doc |
|
|
//#ifdef GADGET_OPENMP |
|
|
// void writeOptValuesOMP(); |
|
|
//#endif |
|
119 |
/** |
/** |
120 |
* \brief This is the function that will optimise the likelihood score |
* \brief This is the function that will optimise the likelihood score |
121 |
*/ |
*/ |
122 |
void Optimise(); |
void Optimise(); |
|
//FIXME doc |
|
|
void OptimiseOMP(); |
|
123 |
/** |
/** |
124 |
* \brief This function will initialise the Ecosystem parameters |
* \brief This function will initialise the Ecosystem parameters |
125 |
*/ |
*/ |
129 |
* \param Stochastic is the StochasticData containing the new values of the parameters |
* \param Stochastic is the StochasticData containing the new values of the parameters |
130 |
*/ |
*/ |
131 |
void Update(const StochasticData* const Stochastic) const { keeper->Update(Stochastic); }; |
void Update(const StochasticData* const Stochastic) const { keeper->Update(Stochastic); }; |
132 |
//FIXME doc |
#ifdef _OPENMP |
133 |
|
/** |
134 |
|
* \brief This function will update the store values of the parameters of the Ecosystems used with OpenMP |
135 |
|
* \param v is the DoubleVector that store the values of the parameters of the main Ecosystem |
136 |
|
*/ |
137 |
void Update(const DoubleVector v)const { keeper->Update(v);} |
void Update(const DoubleVector v)const { keeper->Update(v);} |
138 |
|
#endif |
139 |
/** |
/** |
140 |
* \brief This function will reset the Ecosystem information |
* \brief This function will reset the Ecosystem information |
141 |
*/ |
*/ |
270 |
*/ |
*/ |
271 |
StockPtrVector& getModelStockVector() { return stockvec; }; |
StockPtrVector& getModelStockVector() { return stockvec; }; |
272 |
/** |
/** |
273 |
* \brief This is the flag used to denote whether the user has interrupted the current model run |
* \brief This function will return the DoubleVector used to store the values of the parameters |
274 |
|
* \return values the return of the method getValues from Keeper |
275 |
*/ |
*/ |
|
//FIXME doc |
|
276 |
DoubleVector getValues() {return keeper->getValues();} |
DoubleVector getValues() {return keeper->getValues();} |
277 |
volatile int interrupted; |
/** |
278 |
|
* \brief This is the flag used to denote whether the user has interrupted the current model run |
279 |
|
*/ |
280 |
|
//volatile int interrupted; |
281 |
protected: |
protected: |
282 |
/** |
/** |
283 |
* \brief This is the value of the likelihood score for the current simulation |
* \brief This is the value of the likelihood score for the current simulation |
354 |
* \note This vector is only used to temporarily store values during an optimising run |
* \note This vector is only used to temporarily store values during an optimising run |
355 |
*/ |
*/ |
356 |
IntVector optflag; |
IntVector optflag; |
357 |
|
#ifdef _OPENMP |
358 |
|
/** |
359 |
|
* \brief This empty char is used for the purpose of avoiding false sharing between the EcoSystems. |
360 |
|
*/ |
361 |
|
char filling[128]; |
362 |
|
/** |
363 |
|
* \brief Type of selected parallel optimization |
364 |
|
*/ |
365 |
|
const int static SPECULATIVE=1; |
366 |
|
const int static REPRODUCIBLE=2; |
367 |
|
int runParallel; |
368 |
|
#endif |
369 |
}; |
}; |
370 |
|
|
371 |
#endif |
#endif |