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
9b412f40
Commit
9b412f40
authored
Apr 20, 2021
by
patrick.lambert
Browse files
with right name of obersable in the xml
parent
d059bf76
Changes
2
Hide whitespace changes
Inline
Side-by-side
data/input/northeastamerica/RIO_obs_NEA.xml
View file @
9b412f40
...
...
@@ -19,51 +19,6 @@
</observers>
</fr.cemagref.observation.kernel.ObservablesHandler>
</entry>
<entry>
<java-class>
species.DiadromousFishGroup
</java-class>
<fr.cemagref.observation.kernel.ObservablesHandler>
<observers>
<fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<graphType>
LINE
</graphType>
<title>
Number of populated basins
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
Number of basins
</yAxisLabel>
<variableName>
getNbPopulatedBasins
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<graphType>
LINE
</graphType>
<title>
Abundance of spawners
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
Number of fish
</yAxisLabel>
<variableName>
getSpawnerEffective
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<graphType>
LINE
</graphType>
<title>
Abundance of male spawners
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
number of fishes
</yAxisLabel>
<variableName>
getMaleSpawnerEffective
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<graphType>
LINE
</graphType>
<title>
Abundance of female spawners
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
number of fishes
</yAxisLabel>
<variableName>
getFemaleSpawnerEffective
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<observer.TemporalRangeSerieChart>
<title>
Range distribution
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
latitude
</yAxisLabel>
<variableName>
getRangeSpawnerDistributionWithLat
</variableName>
</observer.TemporalRangeSerieChart>
</observers>
</fr.cemagref.observation.kernel.ObservablesHandler>
</entry>
<entry>
<java-class>
analysis.AnalyseFishDistribution
</java-class>
...
...
@@ -74,7 +29,7 @@
<title>
Number of colonized basins
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
Number of basins
</yAxisLabel>
<variableName>
getNb
Coloniz
edBasins
</variableName>
<variableName>
getNb
Populat
edBasins
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
...
...
@@ -105,7 +60,7 @@
<title>
Range distribution
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
latitude
</yAxisLabel>
<variableName>
getRangeDistributionWithLat
</variableName>
<variableName>
getRange
Spawner
DistributionWithLat
</variableName>
</observer.TemporalRangeSerieChart>
</observers>
...
...
src/main/java/analysis/AnalyseFishDistribution.java
View file @
9b412f40
...
...
@@ -79,16 +79,25 @@ public class AnalyseFishDistribution extends AquaNismsGroupProcess<DiadromousFis
}
// add this class to observable list
cobservable
=
pilot
.
addObservable
(
this
.
getClass
());
if
(
cobservable
==
null
)
{
cobservable
=
pilot
.
addObservable
(
this
.
getClass
());
}
}
@Override
public
void
doProcess
(
DiadromousFishGroup
group
)
{
// update observer once a year in automn
if
(
group
.
getEnvironment
().
getTime
().
getSeason
(
group
.
getPilot
())
==
Season
.
AUTOMN
)
// when initTransientParameters is not run at model loading
if
(
cobservable
==
null
)
initTransientParameters
(
group
.
getPilot
());
// --------------------------------------------------------------------------------------------------
// update the observers once in autumn
// ------------------------------------------------------------------------------------------------------
if
(
group
.
getEnvironment
().
getTime
().
getSeason
(
group
.
getPilot
())
==
Season
.
AUTOMN
)
{
cobservable
.
fireChanges
(
this
,
group
.
getPilot
().
getCurrentTime
());
}
}
...
...
@@ -137,7 +146,7 @@ public class AnalyseFishDistribution extends AquaNismsGroupProcess<DiadromousFis
// ========================================================
// observer to explore fish distribution
// ========================================================
@Observable
(
description
=
"Number of
coloniz
ed basins"
)
@Observable
(
description
=
"Number of
populat
ed basins"
)
public
double
getNbPopulatedBasins
()
{
int
nb
=
0
;
...
...
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