Commit 4bb4635c authored by Johannes Leins's avatar Johannes Leins
Browse files

made max value of capacity influence changable to prevent sudden larva death...

made max value of capacity influence changable to prevent sudden larva death after high hatching years

set max capacity influence to stages mortality rate so mortality doubles at >= capacity
set turning point for capacity to 0.5 to have 1.5 mortality at 0.5 capacity
parent b5c15fdf
Pipeline #22545 passed with stage
in 1 minute and 3 seconds
......@@ -42,13 +42,13 @@ dist,add,stage,Embryo,mort,,,,,0.05,,,,,
exp,add,infl,bin,mean,ts,0,0,,7.991,1069.98,-0.2247696,0,,
exp,add,infl,bin,SD,ts,0,0,,0.925,126.3933,-0.1978044,0,,
bin,mult,stage,Embryo,trans,,,,,,,,,,
cap,add,stage,Larva,mort,,,,,-1.5,0.85,,,,
cap,add,stage,Larva,mort,,,0.0358,,-1.5,0.5,,,,
dist,add,stage,Larva,mort,,,,,0.95,,,,,
lin,add,stage,Larva,mort,ts,,0.95,,1.9,-0.19,,,,
lin,add,infl,bin,mean,ts,0,0,,74,-1.679,,,,
lin,add,infl,bin,SD,ts,0,0,,-2.2188,0.2188,,,,
bin,mult,stage,Larva,trans,,,,,,,,,,
cap,add,stage,Imago,mort,,,,,-1.5,0.85,,,,
cap,add,stage,Imago,mort,,,0.0475,,-1.5,0.5,,,,
dist,add,stage,Imago,mort,,,,,0.5,,,,,
lin,add,stage,Imago,mort,ts,,0.95,,1.9,-0.19,,,,
exp,mult,stage,Imago,migr,above,1,8,,8,-7,-0.24,0.1,,
......@@ -23,6 +23,7 @@ Influence::Influence(double maxFactor, double minFactor, bool multiplicative, bo
this->multiplicative = multiplicative;
this->useMinMax = minFactor != maxFactor;
this->minFactor = minFactor;
this->maxFactor = maxFactor;
this->deltaFactor = maxFactor > minFactor ? fabs(maxFactor - minFactor) : 0;
this->devRemain = devRemain;
this->initDevState = initDevState;
......
......@@ -58,7 +58,7 @@ double InfluenceCarryingCapacity::multiplier(Environment* environment,
double densityAboveGround = atts->getDensityAboveGround();
double capacity = atts->getCarryingCapacity();
int habitatSize = environment->getHabitatSize();
double mortality = 1.0 / (1.0 + exp( steepness * (densityAboveGround / habitatSize - capacity * rTurningPoint ) ) );
double mortality = maxFactor / (1.0 + exp( steepness * (densityAboveGround / habitatSize - capacity * rTurningPoint ) ) );
return mortality;
}
......
......@@ -198,7 +198,7 @@ protected:
Influence* modInfl = NULL;
bool multModInfl = false;
double factModInfl = 0.0;
double minFactor, deltaFactor;
double minFactor, maxFactor, deltaFactor;
virtual double multiplier(Environment* environment, Cohort* cohort = NULL) = 0;
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment