Commit a0e7d9cc authored by Lambert Patrick's avatar Lambert Patrick
Browse files

populate several times and new paramater for growth

parent c52417ca
......@@ -229,18 +229,13 @@
<outputPath>data/output/</outputPath>
<fileNameFluxes>nutrientFluxes</fileNameFluxes>
<lengthAtHatching>2.0</lengthAtHatching>
<linfVonBertForFemale>70.0</linfVonBertForFemale>
<linfVonBertForMale>70.0</linfVonBertForMale>
<linfVonBertForFemale>80.0</linfVonBertForFemale>
<linfVonBertForMale>80.0</linfVonBertForMale>
<lFirstMaturityForFemale>55.0</lFirstMaturityForFemale>
<lFirstMaturityForMale>40.0</lFirstMaturityForMale>
<processes>
<processesAtBegin>
<species.PopulateBasinNetwork>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<nbSIPerBasin>200</nbSIPerBasin>
<initialLength>20.0</initialLength>
<nbFishPerSI>2500</nbFishPerSI>
</species.PopulateBasinNetwork>
</processesAtBegin>
<processesEachStep>
......@@ -252,6 +247,15 @@
<temporisation>0</temporisation>
</species.PlopProcess>
<species.PopulateBasinNetworkSeveralTimes>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<nbSIPerBasin>200</nbSIPerBasin>
<nbFishPerSI>2500</nbFishPerSI>
<initialLength>20.0</initialLength>
<timesOfPopulate>5</timesOfPopulate>
<populateSeason>SPRING</populateSeason>
</species.PopulateBasinNetworkSeveralTimes>
<species.Age>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
</species.Age>
......@@ -261,8 +265,8 @@
<tempMinGrow>3.0</tempMinGrow>
<tempMaxGrow>26.0</tempMaxGrow>
<tempOptGrow>17.0</tempOptGrow>
<kOptForFemale>0.20323011454056628</kOptForFemale>
<kOptForMale>0.3004992503785338</kOptForMale>
<kOptForFemale>0.29</kOptForFemale>
<kOptForMale>0.21</kOptForMale>
<sigmaDeltaLVonBert>0.2</sigmaDeltaLVonBert>
</species.Grow>
......@@ -287,7 +291,7 @@
<species.Survive>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<tempMinSurvivalSpawnerInRiv>10.0</tempMinSurvivalSpawnerInRiv>
<tempMinSurvivalSpawnerInRiv>9.0</tempMinSurvivalSpawnerInRiv>
<tempMaxSurvivalSpawnerInRiv>23.0</tempMaxSurvivalSpawnerInRiv>
<!-- <tempOptSurvivalSpawnerInRiv>20.0</tempOptSurvivalSpawnerInRiv> -->
<survivalProbOptGenInRiv>1.0</survivalProbOptGenInRiv>
......@@ -312,7 +316,7 @@
<species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<reproductionSeason>SPRING</reproductionSeason>
<tempMinRep>10.443039492695249</tempMinRep>
<tempMinRep>9.8</tempMinRep>
<tempMaxRep>26.0</tempMaxRep>
<tempOptRep>20.0</tempOptRep>
<eta>2.4</eta>
......@@ -328,13 +332,13 @@
<maxNumberOfSuperIndividualPerReproduction>50.0
</maxNumberOfSuperIndividualPerReproduction>
<withDiagnose>false</withDiagnose>
<displayFluxesOnConsole>true</displayFluxesOnConsole>
<displayFluxesOnConsole>false</displayFluxesOnConsole>
</species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<species.MigrateToSea>
<seaMigrationSeason>SUMMER</seaMigrationSeason>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<displayFluxesOnConsole>true</displayFluxesOnConsole>
<displayFluxesOnConsole>false</displayFluxesOnConsole>
</species.MigrateToSea>
<environment.updateTemperatureInRealBasin>
......
......@@ -917,7 +917,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
}
/**
* @return sum of effectives in all the river basins
* @return sum of spawner effectives in all the river basins
*/
@Observable(description = "Number of spawners in river basins")
public double getSpawnerEffective() {
......@@ -932,6 +932,40 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
}
return eff;
}
/**
* @return sum of male spawner effectives in all the river basins
*/
@Observable(description = "Number of male spawners in all basins")
public double getMaleSpawnerEffective() {
long eff = 0;
for (Basin basin : this.getEnvironment().getBasins()){
if (basin.getFishs(this) != null) {
for (DiadromousFish fish : basin.getFishs(this)) {
if (fish.getStage() == Stage.MATURE && fish.getGender() == Gender. MALE)
eff += fish.getAmount();
}
}
}
return eff;
}
/**
* @return sum of female spawner effectives in all the river basins
*/
@Observable(description = "Number of female spawners in all basins")
public double getFemaleSpawnerEffective() {
long eff = 0;
for (Basin basin : this.getEnvironment().getBasins()){
if (basin.getFishs(this) != null) {
for (DiadromousFish fish : basin.getFishs(this)) {
if (fish.getStage() == Stage.MATURE && fish.getGender() == Gender. FEMALE)
eff += fish.getAmount();
}
}
}
return eff;
}
@Override
public void addAquaNism(DiadromousFish fish) {
......
package species;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import environment.Basin;
import environment.Time;
import environment.Time.Season;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
import species.DiadromousFish.Gender;
import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service = AquaNismsGroupProcess.class)
public class PopulateBasinNetworkSeveralTimes extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
private int nbSIPerBasin=200;
private int nbFishPerSI=2500;
private double initialLength =20.;
private int timesOfPopulate = 10;
private Season populateSeason = Season.SPRING;
public static void main(String[] args) { System.out.println((new
XStream(new DomDriver())) .toXML(new PopulateBasinNetworkSeveralTimes())); }
@Override
public void doProcess(DiadromousFishGroup group) {
if (Time.getNbYearFromBegin(group.getPilot()) <= timesOfPopulate && Time.getSeason(group.getPilot()) == populateSeason){
int nbFemaleSIPerBasin = nbSIPerBasin / 2;
int nbMaleSIPerBasin = nbSIPerBasin - nbFemaleSIPerBasin;
for (Basin basin : group.getEnvironment().getRiverBasins()){
for (int i=0; i < nbFemaleSIPerBasin; i++){
group.addAquaNism(new DiadromousFish(group.getPilot(), basin, initialLength, nbFishPerSI, Gender.FEMALE));
}
for (int i=0; i < nbMaleSIPerBasin; i++){
group.addAquaNism(new DiadromousFish(group.getPilot(), basin, initialLength, nbFishPerSI, Gender.MALE));
}
}
}
System.out.println("fem: "+ group. getFemaleSpawnerEffective()+ " \tmal"+group.getMaleSpawnerEffective());
}
}
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