Nemo  2.4.0b
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
LCEphenoexpression.h
Go to the documentation of this file.
1 /*
2  * @file LCEphenoexpression.h
3  * Nemo2
4  *
5  * Copyright (C) 2023-2024 Max Schmid, Frederic Guillaume
6  *
7  * This file is part of Nemo
8  *
9  * Nemo is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Nemo is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  *
23  * @author Max
24  */
25 
26 #ifndef LCEPHENOEXPRESSION_H
27 #define LCEPHENOEXPRESSION_H
28 
29 #include "lifecycleevent.h"
30 #include "ttquanti.h"
31 #include "Uniform.h"
32 
33 //LCE_PhenotypeExpression
35 
36 {
37 
39  unsigned int _num_trait;
40 
43 
46 
49 
52 
56 
63  bool _is_labile;
66 
67  unsigned int _num_liability_trait;
71  vector< vector<double> > _liability_threshold;
72  vector< vector<double> > _liability_values;
73 
78 
80  double (LCE_PhenotypeExpression::* _get_env_cue_func) (unsigned int, unsigned int);
82 
85 
86 
87 public:
88 
90 
91  virtual ~LCE_PhenotypeExpression ( ) { }
92 
93  bool set_g_value_matrix (Param* param, TMatrix& mat);
94  bool check_g_index_matrix (Param* param, TMatrix& mat);
95  bool set_env_cue ();
96  void set_phenot_no_evol (unsigned int patch, TTQuanti* trait);
97  void set_phenot_g1_evol (unsigned int patch, TTQuanti* trait);
98  void set_phenot_g2_evol (unsigned int patch, TTQuanti* trait);
99  void set_phenot_g1_g2_evol (unsigned int patch, TTQuanti* trait);
100  double get_env_cue_no_noise (unsigned int patch, unsigned int trait);
101  double get_env_cue_noise (unsigned int patch, unsigned int trait);
102 
103 
104  virtual void execute ();
105 
106  void setIndPhenotype (Patch* patch, sex_t SEX, age_idx AGE);
107  void setIndPhenotype_labile (Patch* patch, sex_t SEX, age_idx AGE);
108  void setIndLiability (Patch* patch, sex_t SEX, age_idx AGE);
109  void setIndLiability_evolving (Patch* patch, sex_t SEX, age_idx AGE);
110  void setIndLiability_sigmoid (Patch* patch, sex_t SEX, age_idx AGE);
111  void setIndLiability_evolving_sigmoid (Patch* patch, sex_t SEX, age_idx AGE);
112 
113  virtual LifeCycleEvent* clone ( ) {return new LCE_PhenotypeExpression();}
114 
115  virtual bool setParameters ();
116 
117 // SimComponent implementation:
118 
119  virtual void loadFileServices ( FileServices* loader ) {}
120 
121  virtual void loadStatServices ( StatServices* loader ) {}
122 
123  virtual bool resetParameterFromSource (std::string param, SimComponent* cmpt) {return false;}
124 
125  virtual age_t removeAgeClass ( ) {return 0;}
126 
127  virtual age_t addAgeClass ( ) {return 0;}
128 
129  virtual age_t requiredAgeClass () {return 0;}
130 
131 };
132 
133 #endif
Nemo2.
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:52
Definition: LCEphenoexpression.h:36
virtual ~LCE_PhenotypeExpression()
Definition: LCEphenoexpression.h:91
LCE_PhenotypeExpression()
Definition: LCEphenoexpression.cc:41
bool _liability_steepness_allow_negative
Definition: LCEphenoexpression.h:77
void setIndLiability(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:845
TMatrix _g1_values
Definition: LCEphenoexpression.h:57
unsigned int _num_trait
Number of plastic phenotypes.
Definition: LCEphenoexpression.h:39
double get_env_cue_noise(unsigned int patch, unsigned int trait)
Definition: LCEphenoexpression.cc:782
bool _has_plasticity
Definition: LCEphenoexpression.h:64
void set_phenot_g1_g2_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:830
vector< vector< double > > _liability_values
Definition: LCEphenoexpression.h:72
bool _has_evolving_threshold
Definition: LCEphenoexpression.h:68
void setIndLiability_evolving(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:937
vector< vector< double > > _liability_threshold
Definition: LCEphenoexpression.h:71
bool _do_change_cue
Definition: LCEphenoexpression.h:62
void(LCE_PhenotypeExpression::* _set_phenotype_func)(unsigned int, TTQuanti *)
Definition: LCEphenoexpression.h:79
virtual LifeCycleEvent * clone()
Definition: LCEphenoexpression.h:113
void setIndLiability_evolving_sigmoid(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:981
void(LCE_PhenotypeExpression::* _set_liability_func)(Patch *, sex_t, age_idx)
Definition: LCEphenoexpression.h:81
virtual void execute()
Definition: LCEphenoexpression.cc:622
TMatrix _env_cue
A matrix to hold the environmental cues (e value).
Definition: LCEphenoexpression.h:42
TMatrix _g1_linked_index
Definition: LCEphenoexpression.h:54
virtual void loadFileServices(FileServices *loader)
Definition: LCEphenoexpression.h:119
double(LCE_PhenotypeExpression::* _get_env_cue_func)(unsigned int, unsigned int)
Definition: LCEphenoexpression.h:80
bool check_g_index_matrix(Param *param, TMatrix &mat)
Definition: LCEphenoexpression.cc:590
void setIndPhenotype(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:739
bool _e_copy_trait_optimum_value
A flag to set whether environmental cue values are equal to and copied from the trait local optimum v...
Definition: LCEphenoexpression.h:51
void setIndPhenotype_labile(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:755
TMatrix _liability_steepness_linked_index
Definition: LCEphenoexpression.h:75
TMatrix _g2_values
Definition: LCEphenoexpression.h:58
bool set_env_cue()
Definition: LCEphenoexpression.cc:605
bool _has_liability_sigmoid
Definition: LCEphenoexpression.h:74
void set_phenot_g1_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:802
bool set_g_value_matrix(Param *param, TMatrix &mat)
Definition: LCEphenoexpression.cc:568
bool _has_liability
Definition: LCEphenoexpression.h:65
void set_phenot_no_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:789
TMatrix _e_values
Definition: LCEphenoexpression.h:59
TProtoQuanti * _QuantiProto
A pointer to the plastic trait prototype.
Definition: LCEphenoexpression.h:84
double get_env_cue_no_noise(unsigned int patch, unsigned int trait)
Definition: LCEphenoexpression.cc:775
TMatrix _liability_linked_index
Definition: LCEphenoexpression.h:69
void setIndLiability_sigmoid(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:878
TMatrix _e_rate
A matrix to hold the per generation rate of change of the environmental cues.
Definition: LCEphenoexpression.h:48
unsigned int _num_liability_trait
Definition: LCEphenoexpression.h:67
bool _g2_evolves
Definition: LCEphenoexpression.h:61
vector< double > _liability_steepness_fixed
Definition: LCEphenoexpression.h:76
virtual age_t requiredAgeClass()
Definition: LCEphenoexpression.h:129
virtual bool setParameters()
Definition: LCEphenoexpression.cc:97
TMatrix _liability_threshold_linked_index
Definition: LCEphenoexpression.h:70
virtual age_t addAgeClass()
Definition: LCEphenoexpression.h:127
TMatrix _g2_linked_index
Definition: LCEphenoexpression.h:55
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEphenoexpression.h:123
TMatrix _g0_linked_index
Definition: LCEphenoexpression.h:53
virtual void loadStatServices(StatServices *loader)
Definition: LCEphenoexpression.h:121
bool _is_labile
Definition: LCEphenoexpression.h:63
void set_phenot_g2_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:816
virtual age_t removeAgeClass()
Definition: LCEphenoexpression.h:125
bool _g1_evolves
Definition: LCEphenoexpression.h:60
TMatrix _e_noise
A matrix to hold the environmental noise (e reliability).
Definition: LCEphenoexpression.h:45
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73
This structure stores one parameter, its definition and its string argument.
Definition: param.h:54
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:432
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
The Service class used to manage the StatHandler objects.
Definition: statservices.h:50
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:50
TProtoQuanti.
Definition: ttquanti.h:415
TTQuanti.
Definition: ttquanti.h:61
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:36
unsigned int age_t
Age class flags.
Definition: types.h:46
age_idx
Array index of the age classes in the patch sizes and containers arrays.
Definition: types.h:41

Generated for Nemo v2.4.0b by  doxygen 1.9.1 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR