Commit 3a1bbc49 authored by Poulet Camille's avatar Poulet Camille
Browse files

Correction Temperature Effect on Survival

parent 3f1bc7ea
......@@ -287,9 +287,9 @@
<species.Survive>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<tempMinMortGenInRiv>10.0</tempMinMortGenInRiv>
<tempMaxMortGenInRiv>23.0</tempMaxMortGenInRiv>
<tempOptMortGenInRiv>20.0</tempOptMortGenInRiv>
<tempMinSurvivalSpawnerInRiv>10.0</tempMinSurvivalSpawnerInRiv>
<tempMaxSurvivalSpawnerInRiv>23.0</tempMaxSurvivalSpawnerInRiv>
<!-- <tempOptSurvivalSpawnerInRiv>20.0</tempOptSurvivalSpawnerInRiv> -->
<survivalProbOptGenInRiv>1.0</survivalProbOptGenInRiv>
<mortalityRateInRiver>0.4</mortalityRateInRiver>
<mortalityRateInSea>0.4</mortalityRateInSea>
......
......@@ -43,4 +43,14 @@ public class Miscellaneous {
return (T - Tmin) * (T - Tmax) / ((T - Tmin) * (T - Tmax) - ((T - Topt) * (T-Topt)));
}
}
static public double rectangularTemperatureEffect(double T, double Tmin, double Tmax) {
if (T <= Tmin || T >= Tmax) {
return 0;
} else {
return 1;
}
}
}
......@@ -19,9 +19,9 @@ import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service = AquaNismsGroupProcess.class)
public class Survive extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
public double tempMinMortGenInRiv = 10.;
public double tempMaxMortGenInRiv = 23.; // DEFINIR TROIS AUTRES POUR MORTALITE
public double tempOptMortGenInRiv = 20.;
public double tempMinSurvivalSpawnerInRiv = 10.;
public double tempMaxSurvivalSpawnerInRiv = 23.; // DEFINIR TROIS AUTRES POUR MORTALITE
public double tempOptSurvivalSpawnerInRiv = 20.;
public double survivalProbOptGenInRiv = 1.;
public double mortalityRateInRiver = 0.4;
......@@ -43,7 +43,8 @@ public class Survive extends AquaNismsGroupProcess<DiadromousFish, DiadromousFis
survivalProbability = 1.;
//Survive
if(fish.getPosition().getType() == TypeBassin.RIVER && fish.isMature()){
double tempEffectSurv = Miscellaneous.temperatureEffect(fish.getPosition().getCurrentTemperature(group.getPilot()), tempMinMortGenInRiv, tempOptMortGenInRiv, tempMaxMortGenInRiv);
//double tempEffectSurv = Miscellaneous.temperatureEffect(fish.getPosition().getCurrentTemperature(group.getPilot()), tempMinSurvivalSpawnerInRiv, tempOptSurvivalSpawnerInRiv, tempMaxSurvivalSpawnerInRiv);
double tempEffectSurv = Miscellaneous.rectangularTemperatureEffect(fish.getPosition().getCurrentTemperature(group.getPilot()), tempMinSurvivalSpawnerInRiv, tempMaxSurvivalSpawnerInRiv);
if (tempEffectSurv == 0.){
survivalProbability = 0.;
//System.out.println("le poisson situ� dans le bassin " + fish.getPosition().getName() + " en " + Time.getSeason() +" a un coeff de mortalit� de " + fish.getMortalityRateInRiver() + " mais � cause de la temp�rature une prob de survie de " + survivalProbability);
......
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