Skip to content

Commit

Permalink
Manually updating files (removing comments and unnecessary outputs) d…
Browse files Browse the repository at this point in the history
…ue to error when using git subtree push command -> maybe I am doing it in a wrong order and first do a git subtree push and the a git push?
  • Loading branch information
JetteReeg committed Jul 3, 2024
1 parent 16e2078 commit 6b10483
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
2 changes: 0 additions & 2 deletions Genome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,12 @@ void Chromosome::inherit(const Chromosome* parentChr, const short posn, const sh
for (int i = 0; i < nloc; i++) {
if (diploid) {
pLoci[i].allele[posn] = parentChr->pLoci[i].allele[ix];
if (probcross >1) Rcpp::Rcout << "Crossover probability: " << probcross << std::endl;
if (pRandom->Bernoulli(probcross)) { // crossover occurs
if (ix == 0) ix = 1; else ix = 0;
}
}
else
pLoci[i].allele[posn] = parentChr->pLoci[i].allele[0];
if (probmutn >1) Rcpp::Rcout << "Mutation probability: " << probmutn << std::endl;
if (pRandom->Bernoulli(probmutn)) { // mutation occurs
double intbase = INTBASE;
#if RSDEBUG
Expand Down
4 changes: 0 additions & 4 deletions Individual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Individual::Individual(Cell* pCell, Patch* pPatch, short stg, short a, short rep
indCounter++; // unique identifier for each individual

stage = stg;
if (probmale > 1) Rcpp::Rcout << "probmale = " << probmale << std::endl;
if (probmale <= 0.0) sex = 0;
else sex = pRandom->Bernoulli(probmale);
age = a;
Expand Down Expand Up @@ -922,7 +921,6 @@ int Individual::moveKernel(Landscape* pLandscape, Species* pSpecies,
// scale the appropriate kernel mean to the cell size
if (trfr.twinKern)
{
if (kern.probKern1 > 1) Rcpp::Rcout << "probKern1 = " << kern.probKern1<< std::endl;
if (pRandom->Bernoulli(kern.probKern1))
meandist = kern.meanDist1 / (float)land.resol;
else
Expand Down Expand Up @@ -1051,7 +1049,6 @@ int Individual::moveKernel(Landscape* pLandscape, Species* pSpecies,
else {
dispmort = mort.fixedMort;
}
if(dispmort > 1) Rcpp::Rcout << "dispmort = " << dispmort << std::endl;
if (pRandom->Bernoulli(dispmort)) {
status = 7; // dies
dispersing = 0;
Expand Down Expand Up @@ -1113,7 +1110,6 @@ int Individual::moveStep(Landscape* pLandscape, Species* pSpecies,
if (pPatch == pNatalPatch && path->out == 0 && path->year == path->total) {
mortprob = 0.0;
}
if (mortprob > 1) Rcpp::Rcout << "mortprob = " << mortprob << std::endl;
if (pRandom->Bernoulli(mortprob)) { // individual dies
status = 7;
dispersing = 0;
Expand Down
19 changes: 0 additions & 19 deletions Population.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ void Population::reproduction(const float localK, const float envval, const int
// determine whether she must miss current breeding attempt
ind = inds[i]->getStats();
if (ind.fallow >= sstruct.repInterval) {
if(sstruct.probRep > 1) Rcpp::Rcout << "probRep: " << sstruct.probRep << std::endl;
if (pRandom->Bernoulli(sstruct.probRep)) skipbreeding = false;
else skipbreeding = true;
}
Expand Down Expand Up @@ -540,7 +539,6 @@ void Population::reproduction(const float localK, const float envval, const int
// determine whether she must miss current breeding attempt
ind = inds[i]->getStats();
if (ind.fallow >= sstruct.repInterval) {
if(sstruct.probRep > 1) Rcpp::Rcout << "probRep: " << sstruct.probRep << std::endl;
if (pRandom->Bernoulli(sstruct.probRep)) skipbreeding = false;
else skipbreeding = true;
}
Expand Down Expand Up @@ -757,7 +755,6 @@ void Population::emigration(float localK)


} // end of no individual variability
if (disp > 1) Rcpp::Rcout << "disp: " << disp << std::endl;
disp = pRandom->Bernoulli(Pdisp);

if (disp == 1) { // emigrant
Expand Down Expand Up @@ -955,8 +952,6 @@ int Population::transfer(Landscape* pLandscape, short landIx)
settprob = settDD.s0 /
(1.0 + exp(-(popsize / localK - (double)settDD.beta) * (double)settDD.alpha));

if (settprob > 1) Rcpp::Rcout << "settprob: " << settprob << std::endl;

if (pRandom->Bernoulli(settprob)) { // settlement allowed
densdepOK = true;
settle.settleStatus = 2;
Expand Down Expand Up @@ -1238,13 +1233,11 @@ void Population::survival0(float localK, short option0, short option1)
if (ind.status < 6 || ind.status == 10) { // not already doomed
double probsurv = surv[ind.stage][ind.sex];
// does the individual survive?
if (probsurv > 1) Rcpp::Rcout << "probsurv at stage: " << ind.stage << " and sex " << ind.sex << " : " << probsurv << std::endl;
if (pRandom->Bernoulli(probsurv)) { // survives
// does the individual develop?
double probdev = dev[ind.stage][ind.sex];
if (ind.stage < nStages - 1) { // not final stage
if (ind.age >= minAge[ind.stage + 1][ind.sex]) { // old enough to enter next stage
if (probdev > 1) Rcpp::Rcout << "probdev: " << probdev << std::endl;
if (pRandom->Bernoulli(probdev)) {
inds[i]->developing();
}
Expand Down Expand Up @@ -1833,18 +1826,6 @@ Individual* Population::catchIndividual( // Translocate a set of individuals wit
}
}

// ---------------------------------------------------------------------------
// // Add a specified individual to the new or current population of a patch
// void Population::recruitTranslocated(Individual* catched_individual) {
// Rcpp::Rcout << "Recruit translocated individual" << endl;
// Rcpp::Rcout << "Individual ID: " << catched_individual->getId() << endl;
// Rcpp::Rcout << "Size of population" << getNInds() << endl;
// inds.push_back(catched_individual);
// Rcpp::Rcout << "Size of population after translocation" << getNInds() << endl;
// indStats ind = catched_individual->getStats();
// nInds[ind.stage][ind.sex]++;
// }

// ---------------------------------------------------------------------------
bool Population::getSizeSampledInds(
){
Expand Down

0 comments on commit 6b10483

Please sign in to comment.