r304 - in branches/4.1: . exports rules scripts sensitivityanalysis sensitivityexports simulationplans simulators
Author: echatellier Date: 2012-10-30 16:11:41 +0100 (Tue, 30 Oct 2012) New Revision: 304 Url: http://forge.codelutin.com/repositories/revision/isis-fish-data/304 Log: Merge trunk into current branch Added: branches/4.1/scripts/MinimisationUtil.java branches/4.1/scripts/ObjectiveFunction.java branches/4.1/scripts/ObjectiveFunctionBaranov.java Modified: branches/4.1/ branches/4.1/exports/Abundances.java branches/4.1/exports/Biomasses.java branches/4.1/exports/CapturesNombre.java branches/4.1/exports/CapturesNombreStrategies.java branches/4.1/exports/CapturesPoids.java branches/4.1/exports/CapturesPoidsStrategies.java branches/4.1/exports/CellsDefinition.java branches/4.1/exports/EffortsMetier.java branches/4.1/exports/MetierZone.java branches/4.1/exports/NonActivite.java branches/4.1/exports/OwnerMargin.java branches/4.1/exports/RegionDefinition.java branches/4.1/exports/RejetsNombre.java branches/4.1/exports/RejetsPoids.java branches/4.1/exports/VesselMargin.java branches/4.1/exports/ZonesDefinition.java branches/4.1/pom.xml branches/4.1/rules/Cantonnement.java branches/4.1/rules/CantonnementPreSimu.java branches/4.1/rules/ChangementParamControlablePresimu.java branches/4.1/rules/EffortReduction.java branches/4.1/rules/GraviteVPUE1.java branches/4.1/rules/InterdictionEngin.java branches/4.1/rules/InterdictionEnginPreSimu.java branches/4.1/rules/TACpoids.java branches/4.1/rules/TailleMin.java branches/4.1/rules/TotalClosure.java branches/4.1/scripts/GravityModel.java branches/4.1/scripts/ResultName.java branches/4.1/scripts/RuleUtil.java branches/4.1/scripts/SiMatrix.java branches/4.1/sensitivityanalysis/SensitivityCalculatorJavaExpandGrid.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRDOptimal.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRExpandGrid.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRFast.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRFrF2.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRMorris.java branches/4.1/sensitivityanalysis/SensitivityCalculatorROptimumLHS.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRRandomLHS.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRSobol.java branches/4.1/sensitivityanalysis/SensitivityCalculatorRegularFractions.java branches/4.1/sensitivityexports/SensitivityBiomassReferenceY9.java branches/4.1/sensitivityexports/SensitivityBiomassRelativeReferenceY12.java branches/4.1/sensitivityexports/SensitivityBiomassRelativeY6.java branches/4.1/sensitivityexports/SensitivityBiomassY3.java branches/4.1/sensitivityexports/SensitivityCatchWeightReferenceY7.java branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeReferenceY10.java branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeY4.java branches/4.1/sensitivityexports/SensitivityCatchWeightY1.java branches/4.1/sensitivityexports/SensitivitySpawningBiomassReferenceY8.java branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeReferenceY11.java branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeY5.java branches/4.1/sensitivityexports/SensitivitySpawningBiomassY2.java branches/4.1/simulationplans/CalibrationSimplexePasVariable2Capturabilite.java branches/4.1/simulationplans/SimulationNumberRestriction.java branches/4.1/simulators/DefaultSimulator.java branches/4.1/simulators/SimulatorEffortByCell.java Property changes on: branches/4.1 ___________________________________________________________________ Modified: svn:mergeinfo - /trunk:272-287 + /trunk:272-303 Modified: branches/4.1/exports/Abundances.java =================================================================== --- branches/4.1/exports/Abundances.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/Abundances.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/Biomasses.java =================================================================== --- branches/4.1/exports/Biomasses.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/Biomasses.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/CapturesNombre.java =================================================================== --- branches/4.1/exports/CapturesNombre.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/CapturesNombre.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/CapturesNombreStrategies.java =================================================================== --- branches/4.1/exports/CapturesNombreStrategies.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/CapturesNombreStrategies.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; @@ -53,7 +53,7 @@ public class CapturesNombreStrategies implements Export { /** to use log facility, just put in your code: log.info("..."); */ - static private Log log = LogFactory.getLog(CapturesNombre.class); + static private Log log = LogFactory.getLog(CapturesNombreStrategies.class); protected String[] necessaryResult = { ResultName.MATRIX_CATCH_PER_STRATEGY_MET_PER_ZONE_POP }; Modified: branches/4.1/exports/CapturesPoids.java =================================================================== --- branches/4.1/exports/CapturesPoids.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/CapturesPoids.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/CapturesPoidsStrategies.java =================================================================== --- branches/4.1/exports/CapturesPoidsStrategies.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/CapturesPoidsStrategies.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; @@ -53,7 +53,7 @@ public class CapturesPoidsStrategies implements Export { /** to use log facility, just put in your code: log.info("..."); */ - static private Log log = LogFactory.getLog(CapturesPoids.class); + static private Log log = LogFactory.getLog(CapturesPoidsStrategies.class); protected String[] necessaryResult = { ResultName.MATRIX_CATCH_WEIGHT_PER_STRATEGY_MET_PER_ZONE_POP }; Modified: branches/4.1/exports/CellsDefinition.java =================================================================== --- branches/4.1/exports/CellsDefinition.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/CellsDefinition.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/EffortsMetier.java =================================================================== --- branches/4.1/exports/EffortsMetier.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/EffortsMetier.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/MetierZone.java =================================================================== --- branches/4.1/exports/MetierZone.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/MetierZone.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/NonActivite.java =================================================================== --- branches/4.1/exports/NonActivite.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/NonActivite.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/OwnerMargin.java =================================================================== --- branches/4.1/exports/OwnerMargin.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/OwnerMargin.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/RegionDefinition.java =================================================================== --- branches/4.1/exports/RegionDefinition.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/RegionDefinition.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/RejetsNombre.java =================================================================== --- branches/4.1/exports/RejetsNombre.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/RejetsNombre.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/RejetsPoids.java =================================================================== --- branches/4.1/exports/RejetsPoids.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/RejetsPoids.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/VesselMargin.java =================================================================== --- branches/4.1/exports/VesselMargin.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/VesselMargin.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/exports/ZonesDefinition.java =================================================================== --- branches/4.1/exports/ZonesDefinition.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/exports/ZonesDefinition.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package exports; Modified: branches/4.1/pom.xml =================================================================== --- branches/4.1/pom.xml 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/pom.xml 2012-10-30 15:11:41 UTC (rev 304) @@ -36,7 +36,7 @@ <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> - <version>2.5</version> + <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> Modified: branches/4.1/rules/Cantonnement.java =================================================================== --- branches/4.1/rules/Cantonnement.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/Cantonnement.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/CantonnementPreSimu.java =================================================================== --- branches/4.1/rules/CantonnementPreSimu.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/CantonnementPreSimu.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/ChangementParamControlablePresimu.java =================================================================== --- branches/4.1/rules/ChangementParamControlablePresimu.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/ChangementParamControlablePresimu.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/EffortReduction.java =================================================================== --- branches/4.1/rules/EffortReduction.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/EffortReduction.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/GraviteVPUE1.java =================================================================== --- branches/4.1/rules/GraviteVPUE1.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/GraviteVPUE1.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/InterdictionEngin.java =================================================================== --- branches/4.1/rules/InterdictionEngin.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/InterdictionEngin.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/InterdictionEnginPreSimu.java =================================================================== --- branches/4.1/rules/InterdictionEnginPreSimu.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/InterdictionEnginPreSimu.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/TACpoids.java =================================================================== --- branches/4.1/rules/TACpoids.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/TACpoids.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/rules/TailleMin.java =================================================================== --- branches/4.1/rules/TailleMin.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/TailleMin.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin, Stéphanie Mahevas, 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 2 of the + * 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, @@ -16,22 +16,19 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; import static org.nuiton.i18n.I18n._; -import java.util.List; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.math.matrix.MatrixIterator; import org.nuiton.math.matrix.MatrixND; import scripts.ResultName; -import scripts.SiMatrix; import fr.ifremer.isisfish.entities.Metier; import fr.ifremer.isisfish.entities.MetierSeasonInfo; import fr.ifremer.isisfish.entities.Population; @@ -45,15 +42,20 @@ import fr.ifremer.isisfish.util.Doc; /** - * Cette methode remplace aussi TailleMinSurvieRejet si propSurvie est > 0 + * Cette regles tient compte de la taille minimum des poissons capturable. * + * Les captures ne sont pas impactées, mais des rejets sont générés si la + * taille des poissons est inférieures à TailleMin. + * + * En cas de propSurvie positif, la matrice d'effectif est modifié + * pour tenir compte de la partie de poisson rejeté qui survi. + * * Created: 30 novembre 2006 - * - * @author anonymous <anonymous@labs.libre-entreprise.org> + * + * @author smahevas * @version $Revision: 1.1 $ - * - * Last update: $Date: 2007-01-24 18:25:34 $ - * by : $Author: bpoussin $ + * + * Last update: $Date: 2007-01-24 18:25:34 $ by : $Author: bpoussin $ */ public class TailleMin extends AbstractRule { @@ -74,12 +76,14 @@ @Doc(value = "Proportion de survie") public double param_propSurvie = 0; - + + protected boolean affectation = true; + public String[] necessaryResult = { - // put here all necessary result for this rule - // example: - // ResultName.MATRIX_BIOMASS, - // ResultName.MATRIX_NET_VALUE_OF_LANDINGS_PER_STRATEGY_MET, + // put here all necessary result for this rule + // example: + // ResultName.MATRIX_BIOMASS, + // ResultName.MATRIX_NET_VALUE_OF_LANDINGS_PER_STRATEGY_MET, }; @Override @@ -94,19 +98,20 @@ */ @Override public String getDescription() throws Exception { - return _("Tous les poissons dont la taille est inférieure à TailleMin" + - " ne seront pas capturés. Ils sont placés en rejets et rejetés" + - " suivant la proportion de survie."); + return _("Tous les poissons dont la taille est inférieure à TailleMin" + + " ne seront pas capturés. Ils sont placés en rejets et rejetés" + + " suivant la proportion de survie."); } /** - * Appelé au démarrage de la simulation, cette méthode permet d'initialiser - * des valeurs + * Appele au demarrage de la simulation, cette methode permet + * d'initialiser des valeurs de la règle. * - * @param context La simulation pour lequel on utilise cette regle + * @param context La simulation pour laquelle on utilise cette regle */ @Override public void init(SimulationContext context) throws Exception { + } /** @@ -135,12 +140,12 @@ * * @param context la simulation pour lequel on utilise cette regle * @param step le pas de temps courant - * @param metier le metier concerné + * @param metier le metier concerne * @return vrai si on souhaite que les actions soit faites */ @Override - public boolean condition(SimulationContext context, TimeStep step, Metier metier) - throws Exception { + public boolean condition(SimulationContext context, TimeStep step, + Metier metier) throws Exception { log.info("Recherche si la taille Minimale s'applique"); boolean result = true; if (step.before(param_beginStep)) { @@ -156,79 +161,74 @@ } /** - * Si la condition est vrai alors cette action est executee avant le pas - * de temps de la simulation. + * Si la condition est vrai alors cette action est executee avant le pas de + * temps de la simulation. * * @param context la simulation pour lequel on utilise cette regle * @param step le pas de temps courant - * @param metier le metier concerné + * @param metier le metier concerne */ @Override - public void preAction(SimulationContext context, TimeStep step, Metier metier) - throws Exception { - // nothing + public void preAction(SimulationContext context, TimeStep step, + Metier metier) throws Exception { + + affectation = true; // pour que affectation soit vraie au debut de + // chaque pas de temps pour rentrer au moins une + // fois dans postaction } /** - * Si la condition est vrai alors cette action est executée apres le pas + * Si la condition est vrai alors cette action est executee apres le pas * de temps de la simulation. * * @param context La simulation pour lequel on utilise cette regle * @param step le pas de temps courant - * @param metier le metier concerné + * @param metier le metier concerne */ @Override - public void postAction(SimulationContext context, TimeStep step, Metier metier) - throws Exception { - log.info("*$*$*$* TailleMin.actionApres:" + step + " metapop:" + - param_species + " metier:" + metier); + public void postAction(SimulationContext context, TimeStep step, + Metier metier) throws Exception { + //log.info("*$*$*$* TailleMin.actionApres:" + step + " metapop:" + // + param_species + " metier:" + metier); - if (isCaptureDate(step, param_species, metier)) { - log.info( - "*$*$*$* ok affecte capture infÃ?rieure Ã? TailleMin au rejet"); - // ATTENTION - // les captures pour cette metapop ne sont plus du qu'au metier pour qui - // l'espece est secondaire: elles sont affectees aux rejets + if (affectation) { + log.info("*$*$*$* ok affecte capture inferieure a TailleMin au rejet"); + // ATTENTION + // les captures pour cette metapop ne sont plus du qu'au metier pour + // qui l'espece est secondaire: elles sont affectees aux rejets - //pb : ne se fait pas par metier - //il faut une matrice pour chaques pas de temps qui stocke les rejets - //par metier, par metapop et par classes d'age (comme pour les captures) - ////// - log.info("deb de affecterCaptureREJETTailleMin"); + // pb : ne se fait pas par metier + // il faut une matrice pour chaques pas de temps qui stocke les + // rejets par metier, par metapop et par classes d'age (comme pour + // les captures) + //log.info("deb de affecterCaptureREJETTailleMin"); PopulationMonitor popMon = context.getPopulationMonitor(); - SiMatrix siMatrix = SiMatrix.getSiMatrix(context); - List<Population> pops = siMatrix.getPopulations(step); - for (Population pop : pops) { - if (pop.getSpecies().equals(param_species)) { - if (popMon.getDiscard(step, pop) == null) { - MatrixND discard = popMon.getCatch(pop).copy(); - MatrixND eff = popMon.getN(pop); + for (Population pop : param_species.getPopulation()) { + MatrixND discard = popMon.getCatch(pop).copy(); + MatrixND eff = popMon.getN(pop); - for (MatrixIterator i = discard.iterator(); i.next();) { - Object[] coordonnees = i.getSemanticsCoordinates(); - PopulationGroup group = - (PopulationGroup) coordonnees[2]; - if (group.getLength() >= param_TailleMin) { - i.setValue(0); - } else if (param_propSurvie > 0) { - eff.setValue(coordonnees[2], coordonnees[3], - eff.getValue(coordonnees[2], - coordonnees[3]) + i.getValue() * - param_propSurvie); - } - } - discard.setName( - ResultName.MATRIX_DISCARDS_PER_STR_MET_PER_ZONE_POP); - popMon.addDiscard(step, pop, discard); + for (MatrixIterator i = discard.iterator(); i.next();) { + Object[] coordonnees = i.getSemanticsCoordinates(); + PopulationGroup group = (PopulationGroup) coordonnees[2]; + if (group.getLength() >= param_TailleMin) { + i.setValue(0); + } else if (param_propSurvie > 0) { + eff.setValue(coordonnees[2], coordonnees[3], + eff.getValue(coordonnees[2], coordonnees[3]) + + i.getValue() * param_propSurvie); } } + discard.setName(ResultName.MATRIX_DISCARDS_PER_STR_MET_PER_ZONE_POP); + popMon.addDiscard(step, pop, discard); } - log.info("fin de affecterCaptureRejetTailleMin"); + //log.info("fin de affecterCaptureRejetTailleMin"); - //on a affecte une fois cette meta pop au rejet il ne faut pas le refaire + // on a affecte une fois cette meta pop au rejet il ne faut pas le + // refaire pour ce pas de temps + affectation = false; } } } Modified: branches/4.1/rules/TotalClosure.java =================================================================== --- branches/4.1/rules/TotalClosure.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/rules/TotalClosure.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package rules; Modified: branches/4.1/scripts/GravityModel.java =================================================================== --- branches/4.1/scripts/GravityModel.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/scripts/GravityModel.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Copied: branches/4.1/scripts/MinimisationUtil.java (from rev 303, trunk/scripts/MinimisationUtil.java) =================================================================== --- branches/4.1/scripts/MinimisationUtil.java (rev 0) +++ branches/4.1/scripts/MinimisationUtil.java 2012-10-30 15:11:41 UTC (rev 304) @@ -0,0 +1,176 @@ +/* + * #%L + * IsisFish data + * %% + * Copyright (C) 2012 Ifremer, CodeLutin, 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 scripts; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import fr.ifremer.isisfish.util.Nocache; + +public class MinimisationUtil { + + /** to use log facility, just put in your code: log.info("..."); */ + static private Log log = LogFactory.getLog(MinimisationUtil.class); + + /** + * Algo de minimisation de fmin(step, x,C,M,N) sur x. + * + * en prenant une valeur initiale de x dans [a,b] et une tolerance = tol + * Reference de l'algo : http://www1.fpl.fs.fed.us/optimization.html + * Algorithme de Brent qui approxime la fonction a minimiser par une + * parabole si possible et fait du "golden step" sinon + * + * @param a + * @param b + * @param tol tolérance + * @param f fonction d'objectif + * @return + */ + @Nocache + public static double fmin(double a, double b, double tol, ObjectiveFunction f) { + + double c, d, e, eps, xm, p, q, r, tol1, t2, u, v, w, fu, fv, fw, fx, x, tol3; + + c = .5 * (3.0 - Math.sqrt(5.0)); + d = 0.0; + eps = 1.2e-16; // 1.1102e-16 is machine precision + tol1 = eps + 1.0; + eps = Math.sqrt(eps); + v = a + c * (b - a); + // log.info("Finit=" + v); + w = v; + x = v; + e = 0.0; + fx = 0.0; + fu = 0.0; + + fx = f.compute(x); + // log.info("fx= " + fx); + + fv = fx; + fw = fx; + tol3 = tol / 3.0; + xm = .5 * (a + b); + tol1 = eps * Math.abs(x) + tol3; + t2 = 2.0 * tol1; + + while (Math.abs(x - xm) > (t2 - .5 * (b - a))) { // main loop; + // ///// De là... + p = q = r = 0.0; + if (Math.abs(e) > tol1) { // fit the parabola; + r = (x - w) * (fx - fv); + q = (x - v) * (fx - fw); + p = (x - v) * q - (x - w) * r; + q = 2.0 * (q - r); + if (q > 0.0) { + p = -p; + } else { + q = -q; + } + r = e; + e = d; + } + if ((Math.abs(p) < Math.abs(.5 * q * r)) && (p > q * (a - x)) + && (p < q * (b - x))) { // parabolic interpolation step; + d = p / q; + u = x + d; + if (((u - a) < t2) || ((b - u) < t2)) { // f must not be + // evaluated too close + // to a or b; + d = tol1; + if (x >= xm) + d = -d; + } + } else { // a golden-section step; + if (x < xm) { + e = b - x; + } else { + e = a - x; + } + d = c * e; + } + if (Math.abs(d) >= tol1) { // f must not be evaluated too close to x; + u = x + d; + } else { + if (d > 0.0) { + u = x + tol1; + } else { + u = x - tol1; + } + } + // ... à ici : ne sert qu'à calculer un u (selon 2 manières + // différentes) afin de comparer fx a fu + // --> On peut très bien prendre u à partir d'une autre simu a + // la place (?) + + fu = f.compute(u); + //log.info("fu= " + fu); + + // Update a, b, v, w, and x + if (fx <= fu) { + if (u < x) { + a = u; + } else { + b = u; + } + } + if (fu <= fx) { + if (u < x) { + b = x; + } else { + a = x; + } + v = w; + fv = fw; + w = x; + fw = fx; + x = u; + fx = fu; + xm = .5 * (a + b); + tol1 = eps * Math.abs(x) + tol3; + t2 = 2.0 * tol1; + } else { + if ((fu <= fw) || (w == x)) { + v = w; + fv = fw; + w = u; + fw = fu; + xm = .5 * (a + b); + tol1 = eps * Math.abs(x) + tol3; + t2 = 2.0 * tol1; + } else if ((fu > fv) && (v != x) && (v != w)) { + xm = .5 * (a + b); + tol1 = eps * Math.abs(x) + tol3; + t2 = 2.0 * tol1; + } else { + v = u; + fv = fu; + xm = .5 * (a + b); + tol1 = eps * Math.abs(x) + tol3; + t2 = 2.0 * tol1; + } + } + } + return x; + } +} Copied: branches/4.1/scripts/ObjectiveFunction.java (from rev 303, trunk/scripts/ObjectiveFunction.java) =================================================================== --- branches/4.1/scripts/ObjectiveFunction.java (rev 0) +++ branches/4.1/scripts/ObjectiveFunction.java 2012-10-30 15:11:41 UTC (rev 304) @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2012 lgasche + * + * 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>. + */ + +package scripts; + +/** + * ObjectiveFunction.java + * + * Created: 10 aout 2012 + * + * @author lgasche + * @version $Revision$ + * + * Last update: $Date$ + * by : $Author$ + */ +public abstract class ObjectiveFunction { + + /** + * Compute value depending on objective function implementation + * @param x + * @return + */ + public abstract double compute(double x); +} \ No newline at end of file Copied: branches/4.1/scripts/ObjectiveFunctionBaranov.java (from rev 303, trunk/scripts/ObjectiveFunctionBaranov.java) =================================================================== --- branches/4.1/scripts/ObjectiveFunctionBaranov.java (rev 0) +++ branches/4.1/scripts/ObjectiveFunctionBaranov.java 2012-10-30 15:11:41 UTC (rev 304) @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2012 lgasche + * + * 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>. + */ + +package scripts; + +import fr.ifremer.isisfish.util.Nocache; + +/** + * FonctionObjectif_Baranov.java + * + * Created: 10 aout 2012 + * + * @author lgasche <user.name@vcs.hostName> + * @version $Revision$ + * + * Last update: $Date$ + * by : $Author$ + */ +@Nocache +public class ObjectiveFunctionBaranov extends ObjectiveFunction { + + protected double C, M, N; + + public ObjectiveFunctionBaranov(double C, double M, double N) { // step ?? + this.C = C; + this.M = M; + this.N = N; + } + + public double compute(double xx) { + double ff = Math.pow((C - (xx/(xx+M))*(1-Math.exp(-(xx+M)))*N),2); + return ff; + } +} \ No newline at end of file Modified: branches/4.1/scripts/ResultName.java =================================================================== --- branches/4.1/scripts/ResultName.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/scripts/ResultName.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin + * Copyright (C) 2006 - 2012 Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ @@ -159,6 +159,21 @@ @Doc(value = "Disponible uniquement avec les simulations par Zone. do the doc of Result matrixFishingMortality") static final public String MATRIX_FISHING_MORTALITY = n_("matrixFishingMortality"); + /** + * Matrix with 1 dimension + * Dimension 1 : TimeStep + */ + @Doc(value = "do the doc of Result matrixTotalFishingMortality") + static final public String MATRIX_TOTAL_FISHING_MORTALITY = n_("matrixTotalFishingMortality"); + + /** + * Matrix with 2 dimensions + * Dimension 1 : TimeStep + * Dimension 2 : Group + */ + @Doc(value = "do the doc of Result matrixFishingMortalityPerGroup") + static final public String MATRIX_FISHING_MORTALITY_PER_GROUP = n_("matrixFishingMortalityPerGroup"); + /** * Matrix with three dimensions * Dimension 1 : TimeStep Modified: branches/4.1/scripts/RuleUtil.java =================================================================== --- branches/4.1/scripts/RuleUtil.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/scripts/RuleUtil.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, CodeLutin + * Copyright (C) 2006 - 2012 Ifremer, CodeLutin, 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package scripts; @@ -25,9 +25,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.nuiton.math.matrix.MatrixND; -import org.nuiton.math.matrix.*; - import fr.ifremer.isisfish.entities.Population; import fr.ifremer.isisfish.entities.PopulationGroup; import fr.ifremer.isisfish.entities.Species; @@ -78,4 +77,24 @@ } return result; } + + public static double getTotalCatchTonsPop(SimulationContext context, Population pop, TimeStep step) { + double result = 0; + MatrixND mat = context.getPopulationMonitor().getHoldCatch(pop); + if (mat != null) { + mat = mat.copy(); + mat = mat.sumOverDim(0); // sum over Strategies + mat = mat.sumOverDim(1); // sum over metiers + mat = mat.sumOverDim(3); // sum over zones + + List<PopulationGroup> groups = pop.getPopulationGroup(); + + for (int c = 0; c < groups.size(); c++) { + PopulationGroup group = groups.get(c); + double weight = group.getMeanWeight(); + result += mat.getValue(0, 0, c, 0) * weight / 1000.0; + } + } + return result; + } } Modified: branches/4.1/scripts/SiMatrix.java =================================================================== --- branches/4.1/scripts/SiMatrix.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/scripts/SiMatrix.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2012 Ifremer, Code Lutin, Benjamin Poussin, Chatellier Eric + * Copyright (C) 2006 - 2011 Ifremer, Code Lutin, Benjamin Poussin * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -57,12 +58,18 @@ import fr.ifremer.isisfish.simulator.SimulationContext; import fr.ifremer.isisfish.types.TimeStep; import fr.ifremer.isisfish.types.Month; +import fr.ifremer.isisfish.datastore.ResultStorage; /** - * SiMatrix calcul simplement des résultats ne dependant que des parametres - * de simulation et des données du modèle. + * SiMatrix.java * + * Created: 21 aout 2006 15:53:01 + * * @author poussin + * @version $Revision: 1.18 $ + * + * Last update: $Date: 2007-11-02 17:53:20 $ + * by : $Author: bpoussin $ */ public class SiMatrix { @@ -1381,8 +1388,8 @@ Zone zone, MatrixND matrixFishingMortality) throws TopiaException, IsisFishException { double F = totalFishingMortality(step, matrixFishingMortality) - .getValue(group, zone); //totalFishingMortality(step, group, zone); // rem perf: totalFishingMortality a deja ete calcul� - double M = group.getNaturalDeathRate(zone) + .getValue(group, zone); //totalFishingMortality(step, group, zone); // rem perf: totalFishingMortality a deja ete calcule + double M = group.getNaturalDeathRate(zone) / (double) Month.NUMBER_OF_MONTH; double result = Math.exp(-(F + M)); @@ -1402,9 +1409,9 @@ throws TopiaException, IsisFishException { double F = totalFishingMortalityPerCell(step, - matrixFishingMortalityPerCell).getValue(group, zone, cell); //totalFishingMortality(step, group, zone); // rem perf: totalFishingMortality a deja ete calcul� + matrixFishingMortalityPerCell).getValue(group, zone, cell); //totalFishingMortality(step, group, zone); // rem perf: totalFishingMortality a deja ete calcule double M = group.getNaturalDeathRate(zone) - / (double) Month.NUMBER_OF_MONTH; + / (double) Month.NUMBER_OF_MONTH; double result = (double) Math.exp(-(F + M)); return result; @@ -1554,9 +1561,9 @@ // // /////////////////////////////////////////////////////////////////////////// - public MatrixND matrixEffortNominalPerStrategyMet(TimeStep step) throws TopiaException { + public MatrixND matrixEffortNominalPerStrategyMet(TimeStep step) throws TopiaException { - List<Strategy> strategies = getStrategies(step); + List<Strategy> strategies = getStrategies(step); List<Metier> metiers = getMetiers(step); MatrixND result = MatrixFactory.getInstance().create( @@ -1576,4 +1583,122 @@ return result; } + + /** + * Ce morceau de script sert a calculer la mortalite par peche par espece et + * par groupe d'age sur l'ensemble de la zone d'etude, + * en minimisant la difference entre les captures d'ISIS et celles calculees + * a partir de l'equation de Baranov. + * + * @param step pas de temps + * @param pop population + * @return Fishing mortality per group per year (computed in December) + */ + public MatrixND fishingMortalityPerGroup(TimeStep step, Population pop, ResultStorage resManager) throws TopiaException { + double Fgroup = 0; + double Cgroup = 0; + double Mgroup = 0; + double NgroupJan = 0; + + List<Population> populations = Collections.singletonList(pop); + List<PopulationGroup> groups = pop.getPopulationGroup(); + + MatrixND tfgMatrix = MatrixFactory.getInstance().create( + ResultName.MATRIX_FISHING_MORTALITY_PER_GROUP, + new List[]{populations, groups}, // On travaille sur les pops ET les groupes + new String[]{n_("Population"), n_("Group")}); + + for (PopulationGroup group : groups) { + + if (step.getMonth() == Month.DECEMBER) { + + MatrixND catchPerStrategy = null; + + for (TimeStep loopstep = new TimeStep(step.getYear() * 12); loopstep.beforeOrEquals(step); loopstep=loopstep.next()){ + // On fait cette boucle pour contourner les aspects de cache qui font que les resultats ne sont pas recuperes + //s'ils ont deja ete calcules une fois (meme s'ils ont change depuis) + // beforeOrEquals sert a bien prendre Decembre aussi + + MatrixND catchPerStrategyTemp = resManager.getMatrix(loopstep, pop, ResultName.MATRIX_CATCH_PER_STRATEGY_MET_PER_ZONE_POP); + if (catchPerStrategy == null) { + catchPerStrategy = catchPerStrategyTemp.clone(); + // 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 + } + } + + //log.info("catchPerStrategy = " + catchPerStrategy); + catchPerStrategy = catchPerStrategy.sumOverDim(0); // Strategy + catchPerStrategy = catchPerStrategy.sumOverDim(1); // Metier + catchPerStrategy = catchPerStrategy.sumOverDim(3); // Zone : une pop peut avoir plusieurs zonespop dans ISIS + List semgroup = catchPerStrategy.getSemantic(2); + catchPerStrategy = catchPerStrategy.reduce(); // Enleve les dimensions de taille 1 + catchPerStrategy.setSemantic(0, semgroup); // Ne plait pas a Eric + Cgroup = catchPerStrategy.getValue(group); + //log.info("Cgroup = " + Cgroup + "Year=" + step.getYear()); + //log.info("catchPerStrategy = " + catchPerStrategy + "Year=" + step.getYear()); + + MatrixND naturalDeathRatePop = pop.getNaturalDeathRateMatrix(); + naturalDeathRatePop = naturalDeathRatePop.meanOverDim(1); // moyenne sur Zone + naturalDeathRatePop = naturalDeathRatePop.reduce(); // Enleve les dimensions de taille 1 + Mgroup = naturalDeathRatePop.getValue(group); + //log.info("Mgroup= " + Mgroup + "Year=" + step.getYear()); + + MatrixND abundancePopJan = resManager.getMatrix(new TimeStep(12*step.getYear()), pop, ResultName.MATRIX_ABUNDANCE); // Le timestep 0 correspond a janvier de la premiere annee et les annees sont numerotees a partir de zero + abundancePopJan = abundancePopJan.sumOverDim(1); // somme sur Zone + abundancePopJan = abundancePopJan.reduce(); + NgroupJan = abundancePopJan.getValue(group); + //log.info("NgroupJan = " + NgroupJan + "Year=" + step.getYear()); + + ObjectiveFunction f = new ObjectiveFunctionBaranov(Cgroup, Mgroup, NgroupJan); + Fgroup = MinimisationUtil.fmin(0.0,2.0,1.0e-10, f); // step ?? + + //log.info("Fgroup = " + Fgroup); + + tfgMatrix.setValue(pop, group, Fgroup); // Bien faire attention a l'endroit ou on met cette etape (quelle boucle) ? + + } else { + //Fgroup = 0; // Ce n'est plus une valeur unique mais une matrice, est-ce que cette notation peut fonctionner ? + tfgMatrix.setValue(pop, group, 0); // Bien faire attention a l'endroit ou on met cette etape (quelle boucle) ? + } + } + + //log.info("tfgMatrix = " + tfgMatrix); + //log.info("tfg.DimensionNames = " + Arrays.toString(tfgMatrix.getDimensionNames())); + //log.info("tfg.Semantics = " + Arrays.toString(tfgMatrix.getSemantics())); + + return tfgMatrix; + } + + /** + * Ce morceau de script sert a calculer la mortalite par peche par espece et + * par groupe representatif a partir de la mortalite par peche par groupe + * calculee precedemment. + */ + public MatrixND totalFishingMortality(TimeStep step, Population pop, MatrixND fishingMortalityPerGroup) throws TopiaException { + MatrixND tfmMatrix = fishingMortalityPerGroup.copy(); + tfmMatrix.setName(ResultName.MATRIX_TOTAL_FISHING_MORTALITY); + //log.info("tfmMatrix = " + tfmMatrix); + + List<PopulationGroup> groups = pop.getPopulationGroup(); + + int groupMin = pop.getGroupMin(); + int groupMax = pop.getGroupMax(); + int Nbre = (int)groupMax - (int)groupMin + 1; + //log.info("Nbre = " + Nbre); + + for (PopulationGroup group : groups) { + if (group.getId() == groupMin) { + // MatrixND getSubMatrix(int dim, Object, int nb) + tfmMatrix = tfmMatrix.getSubMatrix(1, group, Nbre); + tfmMatrix = tfmMatrix.meanOverDim(1); + tfmMatrix = tfmMatrix.reduce(); + //log.info("tfm.DimensionNames = " + Arrays.toString(tfmMatrix.getDimensionNames())); + //log.info("tfm.Semantics = " + Arrays.toString(tfmMatrix.getSemantics())); + } + } + + return tfmMatrix; + } } Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorJavaExpandGrid.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorJavaExpandGrid.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorJavaExpandGrid.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRDOptimal.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRDOptimal.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRDOptimal.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRExpandGrid.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRExpandGrid.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRExpandGrid.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRFast.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRFast.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRFast.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRFrF2.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRFrF2.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRFrF2.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRMorris.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRMorris.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRMorris.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,21 +2,21 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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 + * + * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorROptimumLHS.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorROptimumLHS.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorROptimumLHS.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRRandomLHS.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRRandomLHS.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRRandomLHS.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRSobol.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRSobol.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRSobol.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityanalysis/SensitivityCalculatorRegularFractions.java =================================================================== --- branches/4.1/sensitivityanalysis/SensitivityCalculatorRegularFractions.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityanalysis/SensitivityCalculatorRegularFractions.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.1/sensitivityexports/SensitivityBiomassReferenceY9.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityBiomassReferenceY9.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityBiomassReferenceY9.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Modified: branches/4.1/sensitivityexports/SensitivityBiomassRelativeReferenceY12.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityBiomassRelativeReferenceY12.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityBiomassRelativeReferenceY12.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Modified: branches/4.1/sensitivityexports/SensitivityBiomassRelativeY6.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityBiomassRelativeY6.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityBiomassRelativeY6.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Modified: branches/4.1/sensitivityexports/SensitivityBiomassY3.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityBiomassY3.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityBiomassY3.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Property changes on: branches/4.1/sensitivityexports/SensitivityBiomassY3.java ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/4.1/sensitivityexports/SensitivityCatchWeightReferenceY7.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityCatchWeightReferenceY7.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityCatchWeightReferenceY7.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Property changes on: branches/4.1/sensitivityexports/SensitivityCatchWeightReferenceY7.java ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeReferenceY10.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeReferenceY10.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeReferenceY10.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Property changes on: branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeReferenceY10.java ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeY4.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeY4.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeY4.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Property changes on: branches/4.1/sensitivityexports/SensitivityCatchWeightRelativeY4.java ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/4.1/sensitivityexports/SensitivityCatchWeightY1.java =================================================================== --- branches/4.1/sensitivityexports/SensitivityCatchWeightY1.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivityCatchWeightY1.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2009 - 2011 Ifremer, Code Lutin, Jean Couteau + * Copyright (C) 2009 - 2012 Ifremer, Code Lutin, Jean Couteau * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Property changes on: branches/4.1/sensitivityexports/SensitivityCatchWeightY1.java ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: branches/4.1/sensitivityexports/SensitivitySpawningBiomassReferenceY8.java =================================================================== --- branches/4.1/sensitivityexports/SensitivitySpawningBiomassReferenceY8.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivitySpawningBiomassReferenceY8.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Modified: branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeReferenceY11.java =================================================================== --- branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeReferenceY11.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeReferenceY11.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Modified: branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeY5.java =================================================================== --- branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeY5.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivitySpawningBiomassRelativeY5.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Modified: branches/4.1/sensitivityexports/SensitivitySpawningBiomassY2.java =================================================================== --- branches/4.1/sensitivityexports/SensitivitySpawningBiomassY2.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/sensitivityexports/SensitivitySpawningBiomassY2.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package sensitivityexports; Modified: branches/4.1/simulationplans/CalibrationSimplexePasVariable2Capturabilite.java =================================================================== --- branches/4.1/simulationplans/CalibrationSimplexePasVariable2Capturabilite.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/simulationplans/CalibrationSimplexePasVariable2Capturabilite.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package simulationplans; Modified: branches/4.1/simulationplans/SimulationNumberRestriction.java =================================================================== --- branches/4.1/simulationplans/SimulationNumberRestriction.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/simulationplans/SimulationNumberRestriction.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ package simulationplans; Modified: branches/4.1/simulators/DefaultSimulator.java =================================================================== --- branches/4.1/simulators/DefaultSimulator.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/simulators/DefaultSimulator.java 2012-10-30 15:11:41 UTC (rev 304) @@ -2,11 +2,11 @@ * #%L * IsisFish data * %% - * Copyright (C) 2006 - 2011 Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin + * Copyright (C) 2006 - 2012 Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin, 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 2 of the + * 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, @@ -16,10 +16,9 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ - package simulators; import fr.ifremer.isisfish.IsisFishException; @@ -57,7 +56,7 @@ /** * DefaultSimulator.java * - * Created: 21 août 2006 10:57:46 + * Created: 21 aout 2006 10:57:46 * * @author poussin * @version $Revision: 1.19 $ @@ -217,11 +216,12 @@ for (Population pop : siMatrix.getPopulations(step)) { computeMonth(context, siMatrix, step, pop); } - + // // Add some result not population dependante // + // only if there are one or more strategy if (siMatrix.getStrategies(step).size() > 0) { @@ -481,7 +481,7 @@ .matrixCatchWeightPerStrategyMetPerZonePop(step, pop, catchPerStrategyMetPerZonePop); resManager.addResult(step, pop, catchWeightPerStrategyMet); - } + } if (isEffortByCell(context)) { MatrixND catchPerStrategyMetPerZoneMet = siMatrix @@ -497,6 +497,21 @@ } } + if (resManager.isEnabled(ResultName.MATRIX_FISHING_MORTALITY_PER_GROUP) || + resManager.isEnabled(ResultName.MATRIX_TOTAL_FISHING_MORTALITY)) { + MatrixND fishingMortalityPerGroup = siMatrix.fishingMortalityPerGroup(step, + pop, context.getSimulationStorage().getResultStorage()); + + if (resManager.isEnabled(ResultName.MATRIX_FISHING_MORTALITY_PER_GROUP)) { + resManager.addResult(step, pop, fishingMortalityPerGroup); + } + + if (resManager.isEnabled(ResultName.MATRIX_TOTAL_FISHING_MORTALITY)) { + MatrixND totalFishingMortality = siMatrix.totalFishingMortality(step, pop, fishingMortalityPerGroup); + resManager.addResult(step, pop, totalFishingMortality); + } + } + } else { // no strategies // compute only if fishing mortality =0 to apply Natural Mortality abundance = siMatrix.matrixAbundanceSsF(N, pop, step); @@ -555,10 +570,6 @@ .matrixSharedNotFixedCostsPerVessel(step); resManager.addResult(step, mat); } - // if (resManager.isEnabled(ResultName.MATRIX_SHARED_FIXED_COSTS_PER_VESSEL_PER_MET)) { - // MatrixND mat = gravityModel.matrixSharedFixedCostsPerVesselPerMet(date); - // resManager.addResult(date, mat); - // } if (resManager .isEnabled(ResultName.MATRIX_GROSS_VALUE_OF_LANDINGS_PER_SPECIES_PER_STRATEGY_MET)) { MatrixND mat = gravityModel Modified: branches/4.1/simulators/SimulatorEffortByCell.java =================================================================== --- branches/4.1/simulators/SimulatorEffortByCell.java 2012-10-30 15:00:29 UTC (rev 303) +++ branches/4.1/simulators/SimulatorEffortByCell.java 2012-10-30 15:11:41 UTC (rev 304) @@ -6,7 +6,7 @@ * %% * 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 2 of the + * 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, @@ -16,7 +16,7 @@ * * 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-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */
participants (1)
-
echatellier@users.forge.codelutin.com