Author: echatellier Date: 2015-06-23 15:22:43 +0000 (Tue, 23 Jun 2015) New Revision: 369 Url: http://forge.codelutin.com/projects/isis-fish-data/repository/revisions/369 Log: closes #7222: Ajouter le calcul de landing weight Added: branches/4.4.0-resultnames/resultinfos/MatrixLandingWeight.java Modified: branches/4.4.0-resultnames/simulators/DefaultSimulator.java Added: branches/4.4.0-resultnames/resultinfos/MatrixLandingWeight.java =================================================================== --- branches/4.4.0-resultnames/resultinfos/MatrixLandingWeight.java (rev 0) +++ branches/4.4.0-resultnames/resultinfos/MatrixLandingWeight.java 2015-06-23 15:22:43 UTC (rev 369) @@ -0,0 +1,42 @@ +/* + * #%L + * IsisFish data + * %% + * Copyright (C) 2015 Ifremer, Code Lutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +package resultinfos; + +import fr.ifremer.isisfish.result.AbstractResultInfo; + +/** + * Matrix with five dimensions + * Dimension 1 : TimeStep + * Dimension 2 : Strategy + * Dimension 3 : Metier + * Dimension 4 : Group + * Dimension 5 : Zone + */ +public class MatrixLandingWeight extends AbstractResultInfo { + + public static final String NAME = MatrixLandingWeight.class.getSimpleName(); + + @Override + public String getDescription() { + return "do the doc of Result MatrixLandingWeight"; + } +} Property changes on: branches/4.4.0-resultnames/resultinfos/MatrixLandingWeight.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/4.4.0-resultnames/simulators/DefaultSimulator.java =================================================================== --- branches/4.4.0-resultnames/simulators/DefaultSimulator.java 2015-06-23 13:07:28 UTC (rev 368) +++ branches/4.4.0-resultnames/simulators/DefaultSimulator.java 2015-06-23 15:22:43 UTC (rev 369) @@ -320,6 +320,17 @@ resManager.addResult(step, pop, landing); } + if (resManager.isEnabled(MatrixLandingWeight.NAME)) { + MatrixND landing = populationMonitor.getCatch(pop).copy(); + if (discard != null) { + landing = landing.minus(discard); + } + MatrixND landingweight = siMatrix.matrixToWeightMatrix(step, 2, + MatrixLandingWeight.NAME, landing); + + resManager.addResult(step, pop, landingweight); + } + // F and Fbar if (resManager.isEnabled(MatrixFishingMortalityPerGroup.NAME)) { MatrixND fishingMortalityPerGroup = siMatrix.fishingMortalityPerGroup(step, pop, context.getResultManager());