Nemo  2.4.2
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-2026 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 3 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, see <https://www.gnu.org/licenses/>.
21  *
22  * @author Max
23  */
24 
25 #ifndef LCEPHENOEXPRESSION_H
26 #define LCEPHENOEXPRESSION_H
27 
28 #include "lifecycleevent.h"
29 #include "ttquanti.h"
30 #include "Uniform.h"
31 
32 //LCE_PhenotypeExpression
34 
35 {
36 
38  unsigned int _num_trait;
39 
42 
45 
48 
51 
55 
62  bool _is_labile;
65 
66  unsigned int _num_liability_trait;
70  vector< vector<double> > _liability_threshold;
71  vector< vector<double> > _liability_values;
72 
77 
79  double (LCE_PhenotypeExpression::* _get_env_cue_func) (unsigned int, unsigned int);
81 
84 
85 
86 public:
87 
89 
90  virtual ~LCE_PhenotypeExpression ( ) { }
91 
92  bool set_g_value_matrix (Param* param, TMatrix& mat);
93  bool check_g_index_matrix (Param* param, TMatrix& mat);
94  bool set_env_cue ();
95  void set_phenot_no_evol (unsigned int patch, TTQuanti* trait);
96  void set_phenot_g1_evol (unsigned int patch, TTQuanti* trait);
97  void set_phenot_g2_evol (unsigned int patch, TTQuanti* trait);
98  void set_phenot_g1_g2_evol (unsigned int patch, TTQuanti* trait);
99  double get_env_cue_no_noise (unsigned int patch, unsigned int trait);
100  double get_env_cue_noise (unsigned int patch, unsigned int trait);
101 
102 
103  virtual void execute ();
104 
105  void setIndPhenotype (Patch* patch, sex_t SEX, age_idx AGE);
106  void setIndPhenotype_labile (Patch* patch, sex_t SEX, age_idx AGE);
107  void setIndLiability (Patch* patch, sex_t SEX, age_idx AGE);
108  void setIndLiability_evolving (Patch* patch, sex_t SEX, age_idx AGE);
109  void setIndLiability_sigmoid (Patch* patch, sex_t SEX, age_idx AGE);
110  void setIndLiability_evolving_sigmoid (Patch* patch, sex_t SEX, age_idx AGE);
111 
112  virtual LifeCycleEvent* clone ( ) {return new LCE_PhenotypeExpression();}
113 
114  virtual bool setParameters ();
115 
116 // SimComponent implementation:
117 
118  virtual void loadFileServices ( FileServices* loader ) {}
119 
120  virtual void loadStatServices ( StatServices* loader ) {}
121 
122  virtual bool resetParameterFromSource (std::string param, SimComponent* cmpt) {return false;}
123 
124  virtual age_t removeAgeClass ( ) {return 0;}
125 
126  virtual age_t addAgeClass ( ) {return 0;}
127 
128  virtual age_t requiredAgeClass () {return 0;}
129 
130 };
131 
132 #endif
Nemo2.
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:50
Definition: LCEphenoexpression.h:35
virtual ~LCE_PhenotypeExpression()
Definition: LCEphenoexpression.h:90
LCE_PhenotypeExpression()
Definition: LCEphenoexpression.cc:40
bool _liability_steepness_allow_negative
Definition: LCEphenoexpression.h:76
void setIndLiability(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:844
TMatrix _g1_values
Definition: LCEphenoexpression.h:56
unsigned int _num_trait
Number of plastic phenotypes.
Definition: LCEphenoexpression.h:38
double get_env_cue_noise(unsigned int patch, unsigned int trait)
Definition: LCEphenoexpression.cc:781
bool _has_plasticity
Definition: LCEphenoexpression.h:63
void set_phenot_g1_g2_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:829
vector< vector< double > > _liability_values
Definition: LCEphenoexpression.h:71
bool _has_evolving_threshold
Definition: LCEphenoexpression.h:67
void setIndLiability_evolving(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:936
vector< vector< double > > _liability_threshold
Definition: LCEphenoexpression.h:70
bool _do_change_cue
Definition: LCEphenoexpression.h:61
void(LCE_PhenotypeExpression::* _set_phenotype_func)(unsigned int, TTQuanti *)
Definition: LCEphenoexpression.h:78
virtual LifeCycleEvent * clone()
Definition: LCEphenoexpression.h:112
void setIndLiability_evolving_sigmoid(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:980
void(LCE_PhenotypeExpression::* _set_liability_func)(Patch *, sex_t, age_idx)
Definition: LCEphenoexpression.h:80
virtual void execute()
Definition: LCEphenoexpression.cc:621
TMatrix _env_cue
A matrix to hold the environmental cues (e value).
Definition: LCEphenoexpression.h:41
TMatrix _g1_linked_index
Definition: LCEphenoexpression.h:53
virtual void loadFileServices(FileServices *loader)
Definition: LCEphenoexpression.h:118
double(LCE_PhenotypeExpression::* _get_env_cue_func)(unsigned int, unsigned int)
Definition: LCEphenoexpression.h:79
bool check_g_index_matrix(Param *param, TMatrix &mat)
Definition: LCEphenoexpression.cc:589
void setIndPhenotype(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:738
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:50
void setIndPhenotype_labile(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:754
TMatrix _liability_steepness_linked_index
Definition: LCEphenoexpression.h:74
TMatrix _g2_values
Definition: LCEphenoexpression.h:57
bool set_env_cue()
Definition: LCEphenoexpression.cc:604
bool _has_liability_sigmoid
Definition: LCEphenoexpression.h:73
void set_phenot_g1_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:801
bool set_g_value_matrix(Param *param, TMatrix &mat)
Definition: LCEphenoexpression.cc:567
bool _has_liability
Definition: LCEphenoexpression.h:64
void set_phenot_no_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:788
TMatrix _e_values
Definition: LCEphenoexpression.h:58
TProtoQuanti * _QuantiProto
A pointer to the plastic trait prototype.
Definition: LCEphenoexpression.h:83
double get_env_cue_no_noise(unsigned int patch, unsigned int trait)
Definition: LCEphenoexpression.cc:774
TMatrix _liability_linked_index
Definition: LCEphenoexpression.h:68
void setIndLiability_sigmoid(Patch *patch, sex_t SEX, age_idx AGE)
Definition: LCEphenoexpression.cc:877
TMatrix _e_rate
A matrix to hold the per generation rate of change of the environmental cues.
Definition: LCEphenoexpression.h:47
unsigned int _num_liability_trait
Definition: LCEphenoexpression.h:66
bool _g2_evolves
Definition: LCEphenoexpression.h:60
vector< double > _liability_steepness_fixed
Definition: LCEphenoexpression.h:75
virtual age_t requiredAgeClass()
Definition: LCEphenoexpression.h:128
virtual bool setParameters()
Definition: LCEphenoexpression.cc:96
TMatrix _liability_threshold_linked_index
Definition: LCEphenoexpression.h:69
virtual age_t addAgeClass()
Definition: LCEphenoexpression.h:126
TMatrix _g2_linked_index
Definition: LCEphenoexpression.h:54
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEphenoexpression.h:122
TMatrix _g0_linked_index
Definition: LCEphenoexpression.h:52
virtual void loadStatServices(StatServices *loader)
Definition: LCEphenoexpression.h:120
bool _is_labile
Definition: LCEphenoexpression.h:62
void set_phenot_g2_evol(unsigned int patch, TTQuanti *trait)
Definition: LCEphenoexpression.cc:815
virtual age_t removeAgeClass()
Definition: LCEphenoexpression.h:124
bool _g1_evolves
Definition: LCEphenoexpression.h:59
TMatrix _e_noise
A matrix to hold the environmental noise (e reliability).
Definition: LCEphenoexpression.h:44
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:71
This structure stores one parameter, its definition and its string argument.
Definition: param.h:52
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:430
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:43
The Service class used to manage the StatHandler objects.
Definition: statservices.h:48
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:48
TProtoQuanti.
Definition: ttquanti.h:413
TTQuanti.
Definition: ttquanti.h:59
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:34
unsigned int age_t
Age class flags.
Definition: types.h:44
age_idx
Array index of the age classes in the patch sizes and containers arrays.
Definition: types.h:39

Generated for Nemo v2.4.2 by  doxygen 1.9.1

Catalogued on GSR