Commit 9b412f40 authored by patrick.lambert's avatar patrick.lambert
Browse files

with right name of obersable in the xml

parent d059bf76
......@@ -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>getNbColonizedBasins</variableName>
<variableName>getNbPopulatedBasins</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>getRangeSpawnerDistributionWithLat</variableName>
</observer.TemporalRangeSerieChart>
</observers>
......
......@@ -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 colonized basins")
@Observable(description = "Number of populated basins")
public double getNbPopulatedBasins() {
int nb = 0;
......
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