#ifndef __PARAMETERS_H #define __PARAMETERS_H //************************************************************************** // HOUSE KEEPING PARAMETERS // Number of available processors (threads to create); _WIDTH _must_ be divisible by _CPUS // Note that this version runs only with 1 CPU, not optimized for multiple CPUs #define _CPUS 1 // Seed for the random number generator, 0 -> seed based on time #define _RAND_SEED 0 // Log() only logs to graph file when (Gen%_SYS) == 0. _SYS == 0 -> disable #define _SYS 1 // Log() only logs to graph file when (Gen%_DEME) == 0. _DEME == 0 -> disable #define _DEME 1 // Log() only logs to graph file when (Gen%_DISTANCE) == 0. _DISTANCE == 0 -> disable #define _DISTANCE 1 // Log() only logs to state file when (Gen%_IND) == 0. _IND == 0 -> disable #define _IND 0 #define _IND_SAMPLE 2 // Log() only logs to graph file when (Gen%_HISTO) == 0. _HISTO == 0 -> disable #define _HISTO 1 //************************************************************************** // INITIALIZATION PARAMETERS // Width and height of environment // DO NOT FORGET TO ADJUST _MAXLEVEL ABOVE (32->5; 64->6) #define _WIDTH 64 #define _HEIGHT 64 // Number of different characteristics (for _*e and _*p only) #define _k 4 // Maximum number of individuals per patch: this has to do with memory allocation. // 128 hits the upper max regardless of _KO (even when it is 40, so make it 256!!!) #define _MAX_INDIVIDUALS 256 // Initial number of individuals to initialize per patch // watch out for _MAX_INDIVIDUALS for memory and _K0 for dynamics (10 for cats on KI) #define _INIT_INDIVIDUALS 40 // this is the 'dispersal range' // should be an ODD number // previous model used 3, 9, and 15 #define _DRANGE 11 //************************************************************************** //LIFE HISTORY PARAMETERS // maximum age of an individual (think in mating cycles!) if generations are overlapping // (mouse: 12 (2); cats: 10 (5); foxes: 6 (3); rabbits: 18 (3); black rat: 12(2); goats: 18(9)) #define _MAXAGE 12 // number of mating cycles/year if generations are overlapping // has no implications whatsoever, to convert old gens to years // ***change it in view.h as well! // (mouse: 6; cats: 2; foxes: 2; rabbits: 6; black rat: 6; goats: 2) #define _MATINGCYCLES 6 // Birth rate // (mouse: 6; cats: 5; foxes: 3; rabbits: 4; black rat: 5; goats: 2.1) #define _b 6 // (Boolean) NEW flag for converting _Ln to sex chromosomes without deleting the old code // should be ON #define _SEXCHROMOSOME 1 //************************************************************************** // GENE DRIVE PARAMETERS // STRATEGY tCRISPR: gene drive is t-allele (m) and prolactin knockout (f) #define _PROLACTINLOCUS 1 // (Boolean) #define _PROLACTINKNOCKOUT 1 // (Boolean) knocks out and skips infertile females #define _BOTHSEXKNOCKOUT 0 // (Boolean) 1. default prolactin knockout in males (0=OFF), in both sexes if ON(=1) #define _XKNOCKOUT 0 // (Boolean) 2. x shredder xknockout is in males #define _SHREDPROB 0. // prob of knockout in _XKNOCKOUT #define _CRISPRLOCISEPERATE 0 // (Boolean) ON (1) if CRISPR is located outside the t-haplotype (knocks out in male) #define _RECOMRATE 0.01 // prob. of recombination between CRISPR and t-haplotype #define _MALEDRIVE 1 // (Boolean) inoculated individuals are male, otherwise random sex allocation #define _DRIVETPROB 0.95 // probability of segregation distortion #define _PROBCUT 0.8 // probability of successful cut by Cas9/gRNA #define _LOFPROB 1.0 // probability of loss of function after a cut #define _TDISPERSAL 0 // (Boolean) if OFF, _DISTANCEPENALTY is not used, everyone has the same _DRANGE #define _DISTANCEPENALTY 0 // 1, or 2; max distance that a wildtype ind moves compared to a t-allele carrying ind //************************************************************************** // INOCULATION PARAMETERS // Boolean() only inoculates drive carrying individuals in THREAD() in thread.c if ON #define _INOC 1 // THESE THREE SHOULD BE CHANGED IN TANDEM // number of generations the gene-drive individuals get inoculated; // adjust according to the entry _InocGen below #define _NoInoc 1 // gene-drive individuals inoculation generations, separated by comma if _NoInoc>1, e.g. if _NoInoc=3, then {1,10,50} #define _InocGen {12} // genotypes of inoculated individuals for the corresponding generations above // 1: TCRISPR; 2: Tw2; separated by comma if _NoInoc>1, e.g. if _NoInoc=3, then {2,1,1} #define _InocType {1} // Initial number of individuals to inoculate per patch // watch out for _MAX_INDIVIDUALS + _K0 for and dynamics // separated by comma if _NoInoc>1, e.g. if _NoInoc=3, then {2,1,1} #define _InocIndividuals {1} //****** // number of patches to inoculate #define _InocPatchNo 256 // coordinates of the patches #define _InocCoor {2,2,6,2,10,2,14,2,18,2,22,2,26,2,30,2,34,2,38,2,42,2,46,2,50,2,54,2,58,2,62,2,2,6,6,6,10,6,14,6,18,6,22,6,26,6,30,6,34,6,38,6,42,6,46,6,50,6,54,6,58,6,62,6,2,10,6,10,10,10,14,10,18,10,22,10,26,10,30,10,34,10,38,10,42,10,46,10,50,10,54,10,58,10,62,10,2,14,6,14,10,14,14,14,18,14,22,14,26,14,30,14,34,14,38,14,42,14,46,14,50,14,54,14,58,14,62,14,2,18,6,18,10,18,14,18,18,18,22,18,26,18,30,18,34,18,38,18,42,18,46,18,50,18,54,18,58,18,62,18,2,22,6,22,10,22,14,22,18,22,22,22,26,22,30,22,34,22,38,22,42,22,46,22,50,22,54,22,58,22,62,22,2,26,6,26,10,26,14,26,18,26,22,26,26,26,30,26,34,26,38,26,42,26,46,26,50,26,54,26,58,26,62,26,2,30,6,30,10,30,14,30,18,30,22,30,26,30,30,30,34,30,38,30,42,30,46,30,50,30,54,30,58,30,62,30,2,34,6,34,10,34,14,34,18,34,22,34,26,34,30,34,34,34,38,34,42,34,46,34,50,34,54,34,58,34,62,34,2,38,6,38,10,38,14,38,18,38,22,38,26,38,30,38,34,38,38,38,42,38,46,38,50,38,54,38,58,38,62,38,2,42,6,42,10,42,14,42,18,42,22,42,26,42,30,42,34,42,38,42,42,42,46,42,50,42,54,42,58,42,62,42,2,46,6,46,10,46,14,46,18,46,22,46,26,46,30,46,34,46,38,46,42,46,46,46,50,46,54,46,58,46,62,46,2,50,6,50,10,50,14,50,18,50,22,50,26,50,30,50,34,50,38,50,42,50,46,50,50,50,54,50,58,50,62,50,2,54,6,54,10,54,14,54,18,54,22,54,26,54,30,54,34,54,38,54,42,54,46,54,50,54,54,54,58,54,62,54,2,58,6,58,10,58,14,58,18,58,22,58,26,58,30,58,34,58,38,58,42,58,46,58,50,58,54,58,58,58,62,58,2,62,6,62,10,62,14,62,18,62,22,62,26,62,30,62,34,62,38,62,42,62,46,62,50,62,54,62,58,62,62,62} //************************************************************************** // OTHER LIFE HISTORY PARAMETERS // BOOLEAN for mate choice in _TALLELE (t+ females prefer t- males) by a coefficient below #define _MATE_CHOICE 0 #define _AVERSIONCOEFFICIENT 0. // (0.53; K=19 ) #define _SURVIVALPROBABILITY 0.53 #define _DRIVEFITNESS 1.0 // males only? or both sexes (currently males only) // Maximum carrying capacity (#K=round(-50*x + 45.75)) 10 for cats on KI if w=0.1 // (cats: 12; rabbits: 0.6; ) #define _K0 19 // (Boolean) set one of them to 1, rest to zero // _RAND_DISPERSAL: random dispersal // _DISTANCEDENSITYDISPERSAL: density dependent dispersal based on distance, define density threshold as well #define _RAND_DISPERSAL 0 #define _DISTANCEDENSITYDISPERSAL 1 #define _DISPERSALCOEF 1 #define _DENSITYCOEF 1 // (Boolean) dispersal mode: (1) Child dispersal, or (0) Parent dispersal // (PARENT DISPERSAL IS NOT USED CURRENTLY) // again for gene-drive models it should be 1, for parent dispersal // check the code before making it 0 #define _CHILD_DISPERSAL 1 // prob. of BEHAVIORAL POLYANDRY per female. This is also the actual GENETIC POLYANDRY, since for simplicity // BEHAVIORAL POLYANDRY = GENETIC POLYANDRY, ALL multiple matings results in sires "multiple paternity opportunity" // multiple mating = two males only (default 0.46) #define _POLYANDRYPROB 0.46 // in multiple mating, the advantage of the first male's sperm (early sperm advantage, 1ST come 1ST serve, copulatory plug) // if both the males have the same genotype (w,w or dr,dr), then m1 = 0.7, m2 = 1-m1 = 0.3 #define _FIRSTSPERMADVANTAGE 0.5 // this is the 'offset' if the males are (w,dr), if (w,dr)=(0.7+0.2, (1-0.7)-0.2); if if (dr,w)=(0.7-0.2, (1-0.7)+0.2); // THE TWO ABOVE CANNOT BE GREATER THAN 1 (default 0.17) #define _SPERMCOMPETITIONCOEF 0.17 //************************************************************************** // DO NOT CHANGE THESE // Number of loci per characteristic #define _Le 1 #define _Lp 1 #define _Lm 1 #define _Lk 1 #define _Lf 1 #define _Ln 1 // Number of bits per allele; _must_ be a member of {1,2,4,8} #define _Ae 4 #define _Ap 4 #define _Am 4 #define _Ak 4 #define _Af 4 #define _An 1 // Crossover rate: original code treats loci independently, there is free recombination between the loci/trait // but not used here since there is 1 Loci for each trait #define _Xi {0.,0.,0.,0.,0.,0.} // When enabled, this will cause niche to use Micheal's faster version of exp() #define _FAST_EXP 1 // Will cause some extra printing to be done if == 1 (2 for more) #define _VERBOSE 1 // Causes some timing information to be computed and printed #define _BENCHMARK 1 // Prefix to use for output file names (before .ind, etc). See FormatName() for more details #define _FILE_NAME "%g" //************************************************************************** #endif