Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SimAquaLife
GR3D
Commits
a0e7d9cc
Commit
a0e7d9cc
authored
Sep 17, 2019
by
Lambert Patrick
Browse files
populate several times and new paramater for growth
parent
c52417ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
data/input/fishTryRealBV_CC.xml
View file @
a0e7d9cc
...
...
@@ -229,18 +229,13 @@
<outputPath>
data/output/
</outputPath>
<fileNameFluxes>
nutrientFluxes
</fileNameFluxes>
<lengthAtHatching>
2.0
</lengthAtHatching>
<linfVonBertForFemale>
7
0.0
</linfVonBertForFemale>
<linfVonBertForMale>
7
0.0
</linfVonBertForMale>
<linfVonBertForFemale>
8
0.0
</linfVonBertForFemale>
<linfVonBertForMale>
8
0.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.2
0323011454056628
</kOptForFemale>
<kOptForMale>
0.
3004992503785338
</kOptForMale>
<kOptForFemale>
0.2
9
</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>
tru
e
</displayFluxesOnConsole>
<displayFluxesOnConsole>
fals
e
</displayFluxesOnConsole>
</species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<species.MigrateToSea>
<seaMigrationSeason>
SUMMER
</seaMigrationSeason>
<synchronisationMode>
ASYNCHRONOUS
</synchronisationMode>
<displayFluxesOnConsole>
tru
e
</displayFluxesOnConsole>
<displayFluxesOnConsole>
fals
e
</displayFluxesOnConsole>
</species.MigrateToSea>
<environment.updateTemperatureInRealBasin>
...
...
src/main/java/species/DiadromousFishGroup.java
View file @
a0e7d9cc
...
...
@@ -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
)
{
...
...
src/main/java/species/PopulateBasinNetworkSeveralTimes.java
0 → 100644
View file @
a0e7d9cc
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
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment