Commit 01ef8903 authored by patrick.lambert's avatar patrick.lambert
Browse files

Merge branch 'exploration_GR3D_process' of...

Merge branch 'exploration_GR3D_process' of gitlab-ssh.irstea.fr:SimAquaLife/GR3D into SpawnerRunAnalysis
parents dcf10b70 908ee0f6
......@@ -269,9 +269,9 @@
<species.Survive>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<tempMinSurvivalSpawnerInRiv>5.1</tempMinSurvivalSpawnerInRiv>
<tempOptSurvivalSpawnerInRiv>16.6</tempOptSurvivalSpawnerInRiv>
<tempMaxSurvivalSpawnerInRiv>24.3</tempMaxSurvivalSpawnerInRiv>
<tempMinSurvivalSpawnerInRiv>5.4</tempMinSurvivalSpawnerInRiv>
<tempOptSurvivalSpawnerInRiv>16.7</tempOptSurvivalSpawnerInRiv>
<tempMaxSurvivalSpawnerInRiv>27.5</tempMaxSurvivalSpawnerInRiv>
<survivalProbOptSpawnerInRiv>1.0</survivalProbOptSpawnerInRiv>
<!--<mortalityRateInRiver>0.4</mortalityRateInRiver> -->
<mortalityRateInSea>0.4</mortalityRateInSea>
......@@ -296,9 +296,9 @@
<species.ReproduceWithDiagnose>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<reproductionSeason>SPRING</reproductionSeason>
<tempMinRep>10</tempMinRep>
<tempOptRep>17</tempOptRep>
<tempMaxRep>30</tempMaxRep>
<tempMinRep>5.1</tempMinRep>
<tempOptRep>13.5</tempOptRep>
<tempMaxRep>24.3</tempMaxRep>
<Soffset>-1.0</Soffset>
<eta>2.4</eta>
<ratioS95__S50>1.9</ratioS95__S50>
......@@ -318,10 +318,10 @@
<species.SurviveAfterReproduction>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<afterReproductionSeason>SUMMER</afterReproductionSeason>
<maximalSurvivalRate>0.1</maximalSurvivalRate>
<maximalSurvivalRate>0.18</maximalSurvivalRate>
<temperatureEffectSurvivalAfterReproduction class="temperatureEffect.LogitEffect">
<Tref>19.9</Tref>
<alpha>-.1</alpha>
<alpha>-0.58</alpha>
</temperatureEffectSurvivalAfterReproduction>
<!-- <temperatureEffectSurvivalAfterReproduction -->
<!-- class="temperatureEffect.NoEffect"> -->
......
......@@ -190,6 +190,13 @@ spawnerSurvivalPostReproductionTempRef <- function(Triver,Tref, coeffa, coeffb){
}
#Logit for survival after reproduction with log19
#similar to spawnerSurvivalPostReproductionWithTempRef which include a
logit2 = function(Triver, Tref,minTempForIteroparity){
return( 1/ (1+exp((log(19)/(minTempForIteroparity-Tref))*(Triver-Tref))))
}
#Dome-shape curve with temperature effect
spawnerSurvivalPostReproductionWithBellCurve <- function(Triver, Tmin, Topt, Tmax, coeffb){
......@@ -210,3 +217,4 @@ spawnerSurvivalPostReproductionWithBellCurve <- function(Triver, Tmin, Topt, Tma
......@@ -5,6 +5,8 @@ import com.thoughtworks.xstream.io.xml.DomDriver;
import environment.Basin;
import environment.InshoreBasin;
import environment.OffshoreBasin;
import environment.OffshoreBasin.OffshoreBasinFunction;
import environment.RiverBasin;
import environment.Time.Season;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
......@@ -17,7 +19,8 @@ import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service = AquaNismsGroupProcess.class)
public class MigrateToOffshore extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
private Season migrationSeasonToReachSummeringOffshore = Season.SPRING;
private Season migrationSeasonToReachOffshore = Season.AUTOMN;
private OffshoreBasinFunction offshoreDestination = OffshoreBasinFunction.WINTERING;
public static void main(String[] args) {
......@@ -31,7 +34,7 @@ public class MigrateToOffshore extends AquaNismsGroupProcess<DiadromousFish, Dia
Basin destination = null;
if (group.getEnvironment().getTime().getSeason(group.getPilot()) == migrationSeasonToReachSummeringOffshore){
if (group.getEnvironment().getTime().getSeason(group.getPilot()) == migrationSeasonToReachOffshore){
for (InshoreBasin inshoreBasin : group.getEnvironment().getInshoreBasins()){
......@@ -42,8 +45,10 @@ public class MigrateToOffshore extends AquaNismsGroupProcess<DiadromousFish, Dia
while (fishIterator.hasNext()) {
DiadromousFish fish = fishIterator.next();
destination = ((RiverBasin) fish.getMemorisedBasin()).getConnectedSummeringOffshoreBasin();
if (offshoreDestination == OffshoreBasinFunction.WINTERING)
destination = ((RiverBasin) fish.getMemorisedBasin()).getConnectedWinteringOffshoreBasin();
else if (offshoreDestination == OffshoreBasinFunction.SUMMERING)
destination = ((RiverBasin) fish.getMemorisedBasin()).getConnectedSummeringOffshoreBasin();
// add fish with its new position to destination basin
fish.setPosition(destination);
......
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