Package fr.ifremer.isisfish.simulator
Class PopulationMonitor
java.lang.Object
fr.ifremer.isisfish.simulator.PopulationMonitor
Classe permettant le suivi des populations de la simulation.
Cette classe est normalement multi-thread safe
FIXME: certain calcul sont les memes que ceux implanter dans les scripts a cause du groupe des juveniles qui n'est pas un vrai groupe de population. Il serait bon que ce groupe deviennent un vrai groupe et que ce code specifique puisse etre supprimer.
- Version:
- $Revision$ Last update: $Date$ by : $Author$
- Author:
- poussin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<Population,org.nuiton.math.matrix.MatrixND> catch per population, only last catch is remainingprotected Map<Population,Map.Entry<TimeStep, org.nuiton.math.matrix.MatrixND>> discard key: <date, pop> value:<MatrixND>protected Map<Population,org.nuiton.math.matrix.MatrixND> catch per population, only last catch is remainingprotected Map<Population,org.nuiton.math.matrix.MatrixND> current number of fish by Popprotected List<Population>La liste des pops monitorer par cette instanceprotected Map<Population,Map<TimeStep, ReproductionData>> reproduction key: <date, pop> value:<MatrixND>protected double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDiscard(TimeStep step, Population pop, org.nuiton.math.matrix.MatrixND discard) Only work for current step simulationvoidApplique de la mortalite naturelle aux poissons qui sont pas encore dans les classes de populations.voidvoidRAZ capture cumulée de toutes les pops.doublegetBiomass(Population pop) Return current biomass for population.doublegetBiomass(Species species) Return current biomass for species.org.nuiton.math.matrix.MatrixNDgetCatch(Population pop) Get population catch.org.nuiton.math.matrix.MatrixNDgetDiscard(TimeStep step, Population pop) Get discard.org.nuiton.math.matrix.MatrixNDgetHoldCatch(Population pop) Get population hold catch.org.nuiton.math.matrix.MatrixNDgetN(Population pop) Return current numbers for population.Return all population actualy in PopulationMonitororg.nuiton.math.matrix.MatrixNDgetRecruitment(TimeStep step, Population pop) TODO les reproductions qui sont trop veille pour encore servir doivent être supprimées.org.nuiton.math.matrix.MatrixNDgetReproduction(TimeStep step, Population pop) Return reproduction.getReproductionData(TimeStep step, Population pop) Return reproduction data.doublePopulation total hold catch.voidholdCatch(Population pop, org.nuiton.math.matrix.MatrixND catchPerStrategyMet) voidinit(List<Population> pops) Initialise le monitor pour l'ensemble de pop passe en parametre.voidsetDiscard(TimeStep step, Population pop, org.nuiton.math.matrix.MatrixND discard) Set discard.voidsetN(Population pop, org.nuiton.math.matrix.MatrixND mat) voidsetReproduction(TimeStep step, Population pop, org.nuiton.math.matrix.MatrixND aN, org.nuiton.math.matrix.MatrixND aBiomass, org.nuiton.math.matrix.MatrixND repro) Set new reproduction.
-
Field Details
-
pops
La liste des pops monitorer par cette instance -
Ns
current number of fish by Pop -
reproductions
reproduction key: <date, pop> value:<MatrixND> -
discards
discard key: <date, pop> value:<MatrixND> -
catchs
catch per population, only last catch is remaining -
holdCatchs
catch per population, only last catch is remaining -
totalHoldCatch
protected double totalHoldCatch
-
-
Constructor Details
-
PopulationMonitor
public PopulationMonitor()
-
-
Method Details
-
init
Initialise le monitor pour l'ensemble de pop passe en parametre. Normalement cet init est fait dans le thread principale de la simulation et il n'y a pas de besoin de le synchroniser. Cet init permet d'avoir ensuite le maxime de variable en lecture, et donc de permettre le multithreading de facon legere (pas de synchronise) et sur (pas de concurent modification exception)- Parameters:
pops-
-
getPopulations
Return all population actualy in PopulationMonitor- Returns:
- new list of Population
-
getBiomass
Return current biomass for species.- Parameters:
species- species- Returns:
- species biomass
-
getBiomass
Return current biomass for population.- Parameters:
pop- population- Returns:
- population biomass
-
getN
Return current numbers for population.- Parameters:
pop- population- Returns:
- population numbers
-
setN
-
getReproduction
Return reproduction.- Parameters:
step- steppop- population- Returns:
- the reproduction
-
getReproductionData
Return reproduction data.- Parameters:
step- steppop- population- Returns:
- the reproductionData
-
setReproduction
public void setReproduction(TimeStep step, Population pop, org.nuiton.math.matrix.MatrixND aN, org.nuiton.math.matrix.MatrixND aBiomass, org.nuiton.math.matrix.MatrixND repro) Set new reproduction.- Parameters:
step- steppop- populationaN- aboundanceaBiomass- biomassrepro- reproduction to set
-
applyReproductionMortality
Applique de la mortalite naturelle aux poissons qui sont pas encore dans les classes de populations. (Reproduction)- Parameters:
pop-
-
getRecruitment
TODO les reproductions qui sont trop veille pour encore servir doivent être supprimées. c-a-d date < currentDate - etalement - gap between repro recru Une autre facon de faire est de supprimer les repro == 0 car normalement toute la repro doit etre utilisé au bout d'un certain temps- Parameters:
step- steppop- population- Returns:
- population recruitment
-
holdCatch
- Parameters:
pop- populationcatchPerStrategyMet-
-
getCatch
Get population catch.- Parameters:
pop- population- Returns:
- population catch
-
getHoldCatch
Get population hold catch.- Parameters:
pop- population- Returns:
- population hold catch
-
getTotalHoldCatch
Population total hold catch.- Parameters:
pop- population- Returns:
- population total hold catch
-
clearCatch
public void clearCatch()RAZ capture cumulée de toutes les pops. -
getDiscard
Get discard.- Parameters:
step- step to get discardpop- population to get discard- Returns:
- le discard
-
setDiscard
Set discard. Only work for current step simulation Force discard at date for population.- Parameters:
step- step to set discardpop- population to set discarddiscard- le discard
-
addDiscard
Only work for current step simulation- Parameters:
step-pop-discard-
-
checkStep
-