82 |
* \brief This function will read in the optimisation parameters from the input file |
* \brief This function will read in the optimisation parameters from the input file |
83 |
* \param infile is the CommentStream to read the optimisation parameters from |
* \param infile is the CommentStream to read the optimisation parameters from |
84 |
*/ |
*/ |
85 |
void readOptimisation(CommentStream& infile); |
void readOptimisation(CommentStream& infile, unsigned* seed); |
86 |
/** |
/** |
87 |
* \brief This function will write the current model status to file |
* \brief This function will write the current model status to file |
88 |
* \param filename is the name of the file to write the model information to |
* \param filename is the name of the file to write the model information to |
124 |
* \param Stochastic is the StochasticData containing the new values of the parameters |
* \param Stochastic is the StochasticData containing the new values of the parameters |
125 |
*/ |
*/ |
126 |
void Update(const StochasticData* const Stochastic) const { keeper->Update(Stochastic); }; |
void Update(const StochasticData* const Stochastic) const { keeper->Update(Stochastic); }; |
127 |
|
#ifdef _OPENMP |
128 |
|
/** |
129 |
|
* \brief This function will update the store values of the parameters of the Ecosystems used with OpenMP |
130 |
|
* \param v is the DoubleVector that store the values of the parameters of the main Ecosystem |
131 |
|
*/ |
132 |
|
void Update(const DoubleVector v)const { keeper->Update(v);} |
133 |
|
#endif |
134 |
/** |
/** |
135 |
* \brief This function will reset the Ecosystem information |
* \brief This function will reset the Ecosystem information |
136 |
*/ |
*/ |
265 |
*/ |
*/ |
266 |
StockPtrVector& getModelStockVector() { return stockvec; }; |
StockPtrVector& getModelStockVector() { return stockvec; }; |
267 |
/** |
/** |
268 |
|
* \brief This function will return the DoubleVector used to store the values of the parameters |
269 |
|
* \return values the return of the method getValues from Keeper |
270 |
|
*/ |
271 |
|
DoubleVector getValues() {return keeper->getValues();} |
272 |
|
/** |
273 |
* \brief This is the flag used to denote whether the user has interrupted the current model run |
* \brief This is the flag used to denote whether the user has interrupted the current model run |
274 |
*/ |
*/ |
275 |
volatile int interrupted; |
//volatile int interrupted; |
276 |
protected: |
protected: |
277 |
/** |
/** |
278 |
* \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 |
349 |
* \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 |
350 |
*/ |
*/ |
351 |
IntVector optflag; |
IntVector optflag; |
352 |
|
#ifdef _OPENMP |
353 |
|
/** |
354 |
|
* \brief This empty char is used for the purpose of avoiding false sharing between the EcoSystems. |
355 |
|
*/ |
356 |
|
char filling[128]; |
357 |
|
#endif |
358 |
}; |
}; |
359 |
|
|
360 |
#endif |
#endif |