Nemo  2.3.46
LCE_Patch_Extinction Class Reference

Randomly removes individuals from the patches according to the extinction rate parameter. More...

#include <LCEmisc.h>

+ Inheritance diagram for LCE_Patch_Extinction:
+ Collaboration diagram for LCE_Patch_Extinction:

Public Member Functions

 LCE_Patch_Extinction ()
 
virtual ~LCE_Patch_Extinction ()
 
bool set_matrix_param (TMatrix *mat, string name)
 
void do_flush (Patch *patch)
 
void do_remove (age_idx AGE, Patch *patch)
 
unsigned int get_harvest_size (age_idx AGE, Patch *patch)
 
virtual bool setParameters ()
 
virtual void execute ()
 
virtual LifeCycleEventclone ()
 
virtual void loadFileServices (FileServices *loader)
 
virtual void loadStatServices (StatServices *loader)
 
virtual age_t removeAgeClass ()
 
virtual age_t addAgeClass ()
 
virtual age_t requiredAgeClass ()
 
- Public Member Functions inherited from LifeCycleEvent
 LifeCycleEvent (const char *name, const char *trait_link)
 Cstor. More...
 
virtual ~LifeCycleEvent ()
 
virtual void init (Metapop *popPtr)
 Sets the pointer to the current Metapop and the trait link if applicable. More...
 
virtual bool attach_trait (string trait)
 
virtual void set_paramset (std::string name, bool required, SimComponent *owner)
 
virtual void set_event_name (std::string &name)
 Set the name of the event (name of the ParamSet) and add the corresponding parameter to the set. More...
 
virtual void set_event_name (const char *name)
 
virtual string & get_event_name ()
 Accessor to the LCE's name. More...
 
virtual int get_rank ()
 Accessor to the LCE rank in the life cycle. More...
 
virtual void set_pop_ptr (Metapop *popPtr)
 Accessors for the population pointer. More...
 
virtual Metapopget_pop_ptr ()
 
- Public Member Functions inherited from SimComponent
 SimComponent ()
 
virtual ~SimComponent ()
 
virtual void loadUpdaters (UpdaterServices *loader)
 Loads the parameters and component updater onto the updater manager. More...
 
virtual void set_paramset (ParamSet *paramset)
 Sets the ParamSet member. More...
 
virtual void set_paramsetFromCopy (const ParamSet &PSet)
 Reset the set of parameters from a another set. More...
 
virtual ParamSetget_paramset ()
 ParamSet accessor. More...
 
virtual void add_parameter (Param *param)
 Interface to add a parameter to the set. More...
 
virtual void add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd)
 Interface to add a parameter to the set. More...
 
virtual void add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd, ParamUpdaterBase *updater)
 Interface to add a parameter and its updater to the set. More...
 
virtual Paramget_parameter (std::string name)
 Param getter. More...
 
virtual double get_parameter_value (std::string name)
 Param value getter. More...
 
virtual string get_name ()
 Returnd the name of the ParamSet, i.e. More...
 

Private Member Functions

unsigned int rand_uniform (double max)
 
unsigned int rand_poisson (double mean)
 
unsigned int rand_gaussian (double mean)
 
unsigned int rand_exp (double mean)
 
unsigned int rand_lognormal (double mean)
 

Private Attributes

TMatrix_Xtion_rate
 Patch extinction probability. More...
 
TMatrix_harvest_size
 Number of individual to remove per patch. More...
 
TMatrix_harvest_proportion
 Proportion of the patch size to remove. More...
 
string _harvest_distribution
 Name of the distribution to use. More...
 
bool _harvest_size_varies
 Flags. More...
 
bool _by_size
 
bool _by_proportion
 
double _harvest_dist_stdev
 Standard deviate to use with the Gaussian dist. More...
 
double _harvest_dist_shape
 shape variable to use with the gamma dist. More...
 
double _extinction_threshold
 Patch extinction threshold in % of total size of the patch. More...
 
unsigned int(LCE_Patch_Extinction::* _rand_size_fct )(double)
 

Additional Inherited Members

- Protected Attributes inherited from LifeCycleEvent
std::string _event_name
 The param name to be read in the init file. More...
 
Metapop_popPtr
 The ptr to the current Metapop. More...
 
std::string _LCELinkedTraitType
 The name of the linked trait. More...
 
int _LCELinkedTraitIndex
 The index in the individual's trait table of the linked trait. More...
 
- Protected Attributes inherited from SimComponent
ParamSet_paramSet
 The parameters container. More...
 

Detailed Description

Randomly removes individuals from the patches according to the extinction rate parameter.

Sets the patches extinction flag accordingly.

Constructor & Destructor Documentation

LCE_Patch_Extinction::LCE_Patch_Extinction ( )

References SimComponent::add_parameter(), DBL, INT, setParameters(), and STR.

Referenced by clone().

132  : LifeCycleEvent("extinction",""), _Xtion_rate(0),
135 {
138  add_parameter("extinction_rate", DBL, 0, 1, 0, 1, updater);
139  add_parameter("extinction_threshold", DBL, 0, 1, 0, 1, updater);
140  add_parameter("extinction_size", INT, 0, 0, 0, 0, updater);
141  add_parameter("extinction_proportion", DBL, 0, 1, 0, 1, updater);
142  add_parameter("extinction_size_distribution", STR, 0, 0, 0, 0, updater);
143  add_parameter("extinction_size_dist_stdev", DBL, 0, 0, 0, 0, updater);
144  add_parameter("extinction_size_dist_shape", DBL, 0, 0, 0, 0, updater);
145 }
bool _by_proportion
Definition: LCEmisc.h:112
TMatrix * _harvest_size
Number of individual to remove per patch.
Definition: LCEmisc.h:106
Implementation of the ParamUpdaterBase interface.
Definition: param.h:348
LifeCycleEvent(const char *name, const char *trait_link)
Cstor.
Definition: lifecycleevent.h:98
unsigned int(LCE_Patch_Extinction::* _rand_size_fct)(double)
Definition: LCEmisc.h:120
TMatrix * _Xtion_rate
Patch extinction probability.
Definition: LCEmisc.h:104
virtual bool setParameters()
Definition: LCEmisc.cc:150
virtual void add_parameter(Param *param)
Interface to add a parameter to the set.
Definition: simcomponent.h:112
Definition: types.h:78
bool _harvest_size_varies
Flags.
Definition: LCEmisc.h:112
double _extinction_threshold
Patch extinction threshold in % of total size of the patch.
Definition: LCEmisc.h:118
double _harvest_dist_stdev
Standard deviate to use with the Gaussian dist.
Definition: LCEmisc.h:114
TMatrix * _harvest_proportion
Proportion of the patch size to remove.
Definition: LCEmisc.h:108
bool _by_size
Definition: LCEmisc.h:112
Definition: types.h:78
Definition: types.h:78
virtual LCE_Patch_Extinction::~LCE_Patch_Extinction ( )
inlinevirtual

References _harvest_proportion, _harvest_size, and _Xtion_rate.

132  {
133  if(_Xtion_rate) delete _Xtion_rate;
134  if(_harvest_size) delete _harvest_size;
136  }
TMatrix * _harvest_size
Number of individual to remove per patch.
Definition: LCEmisc.h:106
TMatrix * _Xtion_rate
Patch extinction probability.
Definition: LCEmisc.h:104
TMatrix * _harvest_proportion
Proportion of the patch size to remove.
Definition: LCEmisc.h:108

Member Function Documentation

virtual age_t LCE_Patch_Extinction::addAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

152 {return 0;}
virtual LifeCycleEvent* LCE_Patch_Extinction::clone ( )
inlinevirtual

Implements LifeCycleEvent.

References LCE_Patch_Extinction().

146 {return new LCE_Patch_Extinction();}
LCE_Patch_Extinction()
Definition: LCEmisc.cc:132
void LCE_Patch_Extinction::do_flush ( Patch patch)

References LifeCycleEvent::_popPtr, Patch::flush(), Patch::set_age(), and Patch::set_isExtinct().

Referenced by execute().

317 {
318  patch->flush(_popPtr);
319  patch->set_isExtinct(true);
320  patch->set_age(0);
321 }
void flush(sex_t SEX, age_idx AGE, Metapop *pop)
Removes all individual pointers of the appropriate sex and age class and flush them into the recyclin...
Definition: metapop.h:634
void set_age(unsigned int a)
Definition: metapop.h:464
void set_isExtinct(bool status)
Definition: metapop.h:463
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
void LCE_Patch_Extinction::do_remove ( age_idx  AGE,
Patch patch 
)

References LifeCycleEvent::_popPtr, _Xtion_rate, TMatrix::get(), get_harvest_size(), Patch::getID(), RAND::RandBool(), IndFactory::recycle(), Patch::remove(), Patch::size(), and RAND::Uniform().

Referenced by execute().

326 {
327  unsigned int remove_size;
328  sex_t sex;
329 
330  //check if probability of event is set, and if removal will happen
331  if(_Xtion_rate) if( RAND::Uniform() > _Xtion_rate->get(0, patch->getID()) ) return;
332 
333  if(patch->size(AGE) != 0) {
334 
335  remove_size = get_harvest_size(AGE, patch);
336 
337  for(unsigned int i = 0; i < remove_size; ++i) {
338 
339  sex = (sex_t)RAND::RandBool();
340 
341  if(patch->size(sex, AGE) != 0)
342  _popPtr->recycle( patch->remove( sex, AGE, (unsigned int)RAND::Uniform(patch->size(sex, AGE)) ) );
343  else //we already know here that the patch is not empty
344  _popPtr->recycle( patch->remove( (sex_t)!sex, AGE, (unsigned int)RAND::Uniform(patch->size( (sex_t)!sex, AGE) ) ) );
345 
346  if(patch->size(AGE) == 0) break;
347  }
348  // cout<<"--removed "<<remove_size<<" individuals in age class "<<AGE<<", patch "<< patch->getID()<<" size = "<<patch->size(AGE)<<endl;
349  }
350 }
void recycle(Individual *ind)
Put an individual in the recycling pool.
Definition: indfactory.h:62
unsigned int get_harvest_size(age_idx AGE, Patch *patch)
Definition: LCEmisc.cc:354
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
Individual * remove(sex_t SEX, age_idx AGE, unsigned int at)
Removes the individual sitting at the given index in the appropriate container.
Definition: metapop.h:564
TMatrix * _Xtion_rate
Patch extinction probability.
Definition: LCEmisc.h:104
unsigned int getID()
Definition: metapop.h:469
double get(unsigned int i, unsigned int j)
Accessor to element at row i and column j.
Definition: tmatrix.h:120
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:36
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:101
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
static bool RandBool()
Returns a random boolean.
Definition: Uniform.h:139
void LCE_Patch_Extinction::execute ( )
virtual

Implements LifeCycleEvent.

References _by_proportion, _by_size, _extinction_threshold, LifeCycleEvent::_popPtr, _Xtion_rate, ADLTx, ALL, do_flush(), do_remove(), TMatrix::get(), Patch::get_isExtinct(), Patch::get_K(), Metapop::getPatch(), Metapop::getPatchNbr(), message(), OFFSx, Patch::size(), and RAND::Uniform().

282 {
283 #ifdef _DEBUG_
284  message("LCE_Patch_Extinction::execute ");
285  unsigned int cnt = 0;
286 #endif
287  Patch *patch;
288  for(unsigned int i = 0; i < _popPtr->getPatchNbr(); i++) {
289 
290  patch = _popPtr->getPatch(i);
291 
292  if(_by_size || _by_proportion) {
293  do_remove(OFFSx, patch);
294  do_remove(ADLTx, patch);
295  } else if(_Xtion_rate)
296  if( RAND::Uniform() < _Xtion_rate->get(0, i) )
297  do_flush(patch);
298 
299  if(_extinction_threshold != -1) {
300  if( _extinction_threshold < 1 && (double)patch->size(ALL)/patch->get_K() < _extinction_threshold )
301  do_flush(patch);
302  else if( patch->size(ALL) < _extinction_threshold )
303  do_flush(patch);
304  }
305 #ifdef _DEBUG_
306  cnt += (patch->get_isExtinct());
307 #endif
308  }
309 #ifdef _DEBUG_
310  message("(%i extinct patches)\n",cnt);
311 #endif
312 }
bool _by_proportion
Definition: LCEmisc.h:112
void message(const char *message,...)
Definition: output.cc:40
void do_flush(Patch *patch)
Definition: LCEmisc.cc:316
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
TMatrix * _Xtion_rate
Patch extinction probability.
Definition: LCEmisc.h:104
double get(unsigned int i, unsigned int j)
Accessor to element at row i and column j.
Definition: tmatrix.h:120
Second class in the metapopulation design structure, between the Metapop and Individual classes...
Definition: metapop.h:421
Patch * getPatch(unsigned int i)
Patch accessor, return the ith+1 patch in the metapop.
Definition: metapop.h:251
void do_remove(age_idx AGE, Patch *patch)
Definition: LCEmisc.cc:325
bool get_isExtinct()
Definition: metapop.h:475
unsigned int getPatchNbr()
Definition: metapop.h:270
double _extinction_threshold
Patch extinction threshold in % of total size of the patch.
Definition: LCEmisc.h:118
Definition: types.h:42
unsigned int get_K()
Definition: metapop.h:470
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:101
#define ALL
All ages age class flag.
Definition: types.h:56
bool _by_size
Definition: LCEmisc.h:112
Definition: types.h:42
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
unsigned int LCE_Patch_Extinction::get_harvest_size ( age_idx  AGE,
Patch patch 
)

References _by_proportion, _by_size, _harvest_proportion, _harvest_size, _harvest_size_varies, _rand_size_fct, TMatrix::get(), Patch::getID(), and Patch::size().

Referenced by do_remove().

355 {
356 
357  if( _by_size ) {
358 
360  return (this->*_rand_size_fct) (_harvest_size->get(0, patch->getID()));
361 
362  else return (unsigned int)_harvest_size->get(0, patch->getID());
363 
364  } else if( _by_proportion ) {
365 
366  return (unsigned int)(_harvest_proportion->get(0, patch->getID()) * patch->size(AGE));
367 
368  }
369 
370  return 0;
371 }
bool _by_proportion
Definition: LCEmisc.h:112
TMatrix * _harvest_size
Number of individual to remove per patch.
Definition: LCEmisc.h:106
unsigned int(LCE_Patch_Extinction::* _rand_size_fct)(double)
Definition: LCEmisc.h:120
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
unsigned int getID()
Definition: metapop.h:469
double get(unsigned int i, unsigned int j)
Accessor to element at row i and column j.
Definition: tmatrix.h:120
bool _harvest_size_varies
Flags.
Definition: LCEmisc.h:112
TMatrix * _harvest_proportion
Proportion of the patch size to remove.
Definition: LCEmisc.h:108
bool _by_size
Definition: LCEmisc.h:112
virtual void LCE_Patch_Extinction::loadFileServices ( FileServices loader)
inlinevirtual

Implements SimComponent.

149 {}
virtual void LCE_Patch_Extinction::loadStatServices ( StatServices loader)
inlinevirtual

Implements SimComponent.

150 {}
unsigned int LCE_Patch_Extinction::rand_exp ( double  mean)
inlineprivate

References RAND::Uniform().

Referenced by setParameters().

125 {return (unsigned int)(-1.0 * mean * log(1.0-RAND::Uniform()));}
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:101
unsigned int LCE_Patch_Extinction::rand_gaussian ( double  mean)
inlineprivate

References RAND::Gaussian().

Referenced by setParameters().

124 {return (unsigned int)abs(mean + RAND::Gaussian(_harvest_dist_stdev));}
double _harvest_dist_stdev
Standard deviate to use with the Gaussian dist.
Definition: LCEmisc.h:114
static double Gaussian(double sigma)
Definition: Uniform.h:238
unsigned int LCE_Patch_Extinction::rand_lognormal ( double  mean)
inlineprivate

References RAND::LogNormal().

Referenced by setParameters().

126 {return (unsigned int)RAND::LogNormal(mean, _harvest_dist_stdev);}
static double LogNormal(double zeta, double sigma)
Definition: Uniform.h:334
double _harvest_dist_stdev
Standard deviate to use with the Gaussian dist.
Definition: LCEmisc.h:114
unsigned int LCE_Patch_Extinction::rand_poisson ( double  mean)
inlineprivate

References RAND::Poisson().

Referenced by setParameters().

123 {return (unsigned int)RAND::Poisson(mean);}
static double Poisson(double mean)
From the Numerical Recieps.
Definition: Uniform.h:196
unsigned int LCE_Patch_Extinction::rand_uniform ( double  max)
inlineprivate

References RAND::Uniform().

Referenced by setParameters().

122 {return RAND::Uniform((unsigned int)max);}
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:101
virtual age_t LCE_Patch_Extinction::removeAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

151 {return 0;}
virtual age_t LCE_Patch_Extinction::requiredAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

153 {return 0;}
bool LCE_Patch_Extinction::set_matrix_param ( TMatrix mat,
string  name 
)

References LifeCycleEvent::_popPtr, TMatrix::assign(), error(), SimComponent::get_parameter(), Param::getMatrix(), TMatrix::getNbCols(), TMatrix::getNbRows(), Metapop::getPatchNbr(), Param::getValue(), Param::isMatrix(), and TMatrix::reset().

Referenced by setParameters().

253 {
254  double value;
255  Param* param = get_parameter(name);
256 
257  if(param->isMatrix()) {
258 
259  param->getMatrix(mat);
260 
261  if(mat->getNbRows() > 1) {
262  error("The \"%s\" matrix must be a one-dimensional array.\n", name.c_str());
263  return false;
264  }
265 
266  if(mat->getNbCols() != _popPtr->getPatchNbr()) {
267  error("The length of the \"%s\" array must be equal to the number of patches.\n", name.c_str());
268  return false;
269  }
270 
271  } else {
272  value = param->getValue();
273  mat->reset(1, _popPtr->getPatchNbr());
274  mat->assign(value);
275  }
276  return true;
277 }
void assign(double val)
Assigns a value to all element of the matrix.
Definition: tmatrix.h:92
double getValue()
Returns the argument value according to its type.
Definition: param.cc:319
unsigned int getNbCols()
Gives the number of columns.
Definition: tmatrix.h:142
unsigned int getNbRows()
Gives the number of rows.
Definition: tmatrix.h:139
void getMatrix(TMatrix *mat)
Sets the matrix from the argument string if the parameter is set and of matrix type.
Definition: param.cc:329
bool isMatrix()
Checks if the argument is of matrix type.
Definition: param.h:170
unsigned int getPatchNbr()
Definition: metapop.h:270
int error(const char *str,...)
Definition: output.cc:73
This structure stores one parameter, its definition and its string argument.
Definition: param.h:53
virtual Param * get_parameter(std::string name)
Param getter.
Definition: simcomponent.h:139
void reset(unsigned int rows, unsigned int cols)
Re-allocate the existing matrix with assigned rows and cols dimensions.
Definition: tmatrix.h:97
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
bool LCE_Patch_Extinction::setParameters ( )
virtual

Implements SimComponent.

References _by_proportion, _by_size, _extinction_threshold, _harvest_dist_stdev, _harvest_distribution, _harvest_proportion, _harvest_size, _harvest_size_varies, SimComponent::_paramSet, _rand_size_fct, _Xtion_rate, error(), SimComponent::get_parameter(), SimComponent::get_parameter_value(), ParamSet::getArg(), rand_exp(), rand_gaussian(), rand_lognormal(), rand_poisson(), rand_uniform(), set_matrix_param(), and warning().

Referenced by LCE_Patch_Extinction().

151 {
152 
153  if(get_parameter("extinction_rate")->isSet()) {
154 
155  if(!_Xtion_rate) _Xtion_rate = new TMatrix();
156 
157  if(!set_matrix_param(_Xtion_rate, "extinction_rate")) return false;
158 
159  } else {
160  if(_Xtion_rate) delete _Xtion_rate; _Xtion_rate = 0;
161  }
162 
163  if(get_parameter("extinction_size")->isSet()) {
164 
165  if(!_harvest_size) _harvest_size = new TMatrix();
166 
167  if(!set_matrix_param(_harvest_size, "extinction_size")) return false;
168 
169  _by_size = true;
170 
171  } else {
172  if(_harvest_size) delete _harvest_size; _harvest_size = 0;
173  _by_size = false;
174  }
175 
176  if(get_parameter("extinction_proportion")->isSet()) {
178 
179  if(!set_matrix_param(_harvest_proportion, "extinction_proportion")) return false;
180 
181  _by_proportion = true;
182 
183  } else {
185  _by_proportion = false;
186  }
187 
188  _extinction_threshold = get_parameter_value("extinction_threshold");
189 
190  if( !_Xtion_rate && !_by_size && !_by_proportion) {
191  error("Please give one of the following parameter: \"extinction_rate\", \"extinction_size\", or \"extinction_proportion\".\n");
192  return false;
193  }
194  else if(_by_size && _by_proportion) {
195  warning("Both \"extinction_size\" and \"extinction_proportion\" are set, using sizes only.\n");
196  _by_proportion = false;
197  }
198 
199  if(get_parameter("extinction_size_distribution")->isSet()) {
200 
201  if(!_by_size) {
202  error("\"extinction_size_distribution\" is set but the \"extinction_size\" parameter is not!\n");
203  return false;
204  }
205 
206  _harvest_distribution = _paramSet->getArg("extinction_size_distribution");
207  _harvest_size_varies = true;
208  _harvest_dist_stdev = get_parameter_value("extinction_size_dist_stdev");
209 
210  if(_harvest_distribution.compare("poisson") == 0)
211 
213 
214  else if(_harvest_distribution.compare("uniform") == 0)
215 
217 
218  else if(_harvest_distribution.compare("normal") == 0) {
219 
221 
222  if(_harvest_dist_stdev == -1) {
223  error("Standard deviation of the normal distribution for the harvesting size distribution is missing!\n");
224  return false;
225  }
226 
227  } else if(_harvest_distribution.compare("lognormal") == 0) {
228 
230 
231  if(_harvest_dist_stdev == -1) {
232  error("Standard deviation of the lognormal distribution for the harvesting size distribution is missing!\n");
233  return false;
234  }
235 
236  } else if(_harvest_distribution.compare("exponential") == 0)
237 
239 
240  else {
241  error("Distribution \"%s\" is not a valid option for \"harvest_size_distribution\"\n",
242  _harvest_distribution.c_str());
243  return false;
244  }
245 
246  }
247  return true;
248 }
bool _by_proportion
Definition: LCEmisc.h:112
TMatrix * _harvest_size
Number of individual to remove per patch.
Definition: LCEmisc.h:106
bool set_matrix_param(TMatrix *mat, string name)
Definition: LCEmisc.cc:252
virtual double get_parameter_value(std::string name)
Param value getter.
Definition: simcomponent.h:143
unsigned int(LCE_Patch_Extinction::* _rand_size_fct)(double)
Definition: LCEmisc.h:120
TMatrix * _Xtion_rate
Patch extinction probability.
Definition: LCEmisc.h:104
int error(const char *str,...)
Definition: output.cc:73
bool _harvest_size_varies
Flags.
Definition: LCEmisc.h:112
double _extinction_threshold
Patch extinction threshold in % of total size of the patch.
Definition: LCEmisc.h:118
void warning(const char *str,...)
Definition: output.cc:56
unsigned int rand_lognormal(double mean)
Definition: LCEmisc.h:126
double _harvest_dist_stdev
Standard deviate to use with the Gaussian dist.
Definition: LCEmisc.h:114
unsigned int rand_exp(double mean)
Definition: LCEmisc.h:125
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:49
ParamSet * _paramSet
The parameters container.
Definition: simcomponent.h:48
TMatrix * _harvest_proportion
Proportion of the patch size to remove.
Definition: LCEmisc.h:108
unsigned int rand_gaussian(double mean)
Definition: LCEmisc.h:124
bool _by_size
Definition: LCEmisc.h:112
virtual Param * get_parameter(std::string name)
Param getter.
Definition: simcomponent.h:139
string getArg(string name)
Accessor to the parameters argument string.
Definition: param.h:285
string _harvest_distribution
Name of the distribution to use.
Definition: LCEmisc.h:110
unsigned int rand_uniform(double max)
Definition: LCEmisc.h:122
unsigned int rand_poisson(double mean)
Definition: LCEmisc.h:123

Member Data Documentation

bool LCE_Patch_Extinction::_by_proportion
private
bool LCE_Patch_Extinction::_by_size
private
double LCE_Patch_Extinction::_extinction_threshold
private

Patch extinction threshold in % of total size of the patch.

Referenced by execute(), and setParameters().

double LCE_Patch_Extinction::_harvest_dist_shape
private

shape variable to use with the gamma dist.

double LCE_Patch_Extinction::_harvest_dist_stdev
private

Standard deviate to use with the Gaussian dist.

Referenced by setParameters().

string LCE_Patch_Extinction::_harvest_distribution
private

Name of the distribution to use.

Referenced by setParameters().

TMatrix* LCE_Patch_Extinction::_harvest_proportion
private

Proportion of the patch size to remove.

Referenced by get_harvest_size(), setParameters(), and ~LCE_Patch_Extinction().

TMatrix* LCE_Patch_Extinction::_harvest_size
private

Number of individual to remove per patch.

Referenced by get_harvest_size(), setParameters(), and ~LCE_Patch_Extinction().

bool LCE_Patch_Extinction::_harvest_size_varies
private

Flags.

Referenced by get_harvest_size(), and setParameters().

unsigned int(LCE_Patch_Extinction:: * LCE_Patch_Extinction::_rand_size_fct)(double)
private

Referenced by get_harvest_size(), and setParameters().

TMatrix* LCE_Patch_Extinction::_Xtion_rate
private

Patch extinction probability.

Referenced by do_remove(), execute(), setParameters(), and ~LCE_Patch_Extinction().


The documentation for this class was generated from the following files:

Generated for Nemo v2.3.0 by  doxygen 1.8.8 --
Catalogued on GSR