Author: echatellier Date: 2015-10-27 17:36:34 +0100 (Tue, 27 Oct 2015) New Revision: 378 Url: http://forge.codelutin.com/projects/isis-fish-data/repository/revisions/378 Log: refs #7666: Ajouter l'?\195?\169quation de mortalit?\195?\169 par p?\195?\170che Other Modified: trunk/scripts/SiMatrix.java Modified: trunk/scripts/SiMatrix.java =================================================================== --- trunk/scripts/SiMatrix.java 2015-10-22 11:45:06 UTC (rev 377) +++ trunk/scripts/SiMatrix.java 2015-10-27 16:36:34 UTC (rev 378) @@ -1184,10 +1184,10 @@ catchPerStrategyTemp = resManager.getMatrix(loopstep, pop, MatrixCatchPerStrategyMetPerZonePop.NAME); } if (catchPerStrategy == null) { - catchPerStrategy = catchPerStrategyTemp.copy(); - // On clone la matrice car si on fait les operations sur celle contenue dans le cache on la modifie et donc on recupere des resultats faux. + catchPerStrategy = catchPerStrategyTemp.copy(); + // On clone la matrice car si on fait les operations sur celle contenue dans le cache on la modifie et donc on recupere des resultats faux. } else { - catchPerStrategy = catchPerStrategy.add(catchPerStrategyTemp); // Pour avoir la somme des captures sur les 12 mois + catchPerStrategy = catchPerStrategy.add(catchPerStrategyTemp); // Pour avoir la somme des captures sur les 12 mois } } @@ -1202,10 +1202,14 @@ //log.info("Cgroup = " + Cgroup + "Year=" + step.getYear()); //log.info("catchPerStrategy = " + catchPerStrategy + "Year=" + step.getYear()); + // compute total mortality by suming naturalDeathRate and fishingMortalityOtherFleetsMatrix MatrixND naturalDeathRatePop = pop.getNaturalDeathRateMatrix(); naturalDeathRatePop = naturalDeathRatePop.meanOverDim(1); // moyenne sur Zone naturalDeathRatePop = naturalDeathRatePop.reduce(); // Enleve les dimensions de taille 1 - Mgroup = naturalDeathRatePop.getValue(group); + MatrixND fishingMortalityOther = pop.getFishingMortalityOtherFleetsMatrix(); + fishingMortalityOther = fishingMortalityOther.meanOverDim(1); // moyenne sur Zone + fishingMortalityOther = fishingMortalityOther.reduce(); // Enleve les dimensions de taille 1 + Mgroup = naturalDeathRatePop.getValue(group) + fishingMortalityOther.getValue(group); //log.info("Mgroup= " + Mgroup + "Year=" + step.getYear()); Month abundanceReferenceMonth = pop.getAbundanceReferenceMonth();