r355 - in trunk: . rules scripts sensitivityexports simulators
Author: echatellier Date: 2015-04-21 13:09:33 +0000 (Tue, 21 Apr 2015) New Revision: 355 Url: http://forge.codelutin.com/projects/isis-fish-data/repository/revisions/355 Log: Remove tab char Modified: trunk/pom.xml trunk/rules/GraviteVPUE1.java trunk/scripts/ObjectiveFunctionBaranov.java trunk/scripts/ResultName.java trunk/scripts/RuleUtil.java trunk/scripts/SiMatrix.java trunk/sensitivityexports/SensitivityLbarJanvierY1.java trunk/simulators/DefaultSimulator.java Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/pom.xml 2015-04-21 13:09:33 UTC (rev 355) @@ -32,7 +32,7 @@ </organization> <build> - <sourceDirectory>${basedir}</sourceDirectory> + <sourceDirectory>${project.basedir}</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> Modified: trunk/rules/GraviteVPUE1.java =================================================================== --- trunk/rules/GraviteVPUE1.java 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/rules/GraviteVPUE1.java 2015-04-21 13:09:33 UTC (rev 355) @@ -287,7 +287,7 @@ // rien n'a faire car au debut de chaque pas de temps, PropStr // est par défaut initialisé à la valeur de la base de données (val initiales) - }//fin de boucle sur strategy + }//fin de boucle sur strategy first = false; Modified: trunk/scripts/ObjectiveFunctionBaranov.java =================================================================== --- trunk/scripts/ObjectiveFunctionBaranov.java 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/scripts/ObjectiveFunctionBaranov.java 2015-04-21 13:09:33 UTC (rev 355) @@ -38,16 +38,16 @@ @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; - } + 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; - } + 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: trunk/scripts/ResultName.java =================================================================== --- trunk/scripts/ResultName.java 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/scripts/ResultName.java 2015-04-21 13:09:33 UTC (rev 355) @@ -165,21 +165,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 + * 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 + * 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 @@ -188,16 +188,16 @@ */ @Doc(value = "do the doc of Result matrixAbundance") static final public String MATRIX_ABUNDANCE = n("matrixAbundance"); - - /** + + /** * Matrix with two dimensions * Dimension 1 : TimeStep * Dimension 2 : Zone (semantics : Dimension 1) */ @Doc(value = "do the doc of Result matrixLbar") static final public String MATRIX_LBAR = n("matrixLbar"); - - /** + + /** * Matrix with one dimension * Dimension 1 : TimeStep */ Modified: trunk/scripts/RuleUtil.java =================================================================== --- trunk/scripts/RuleUtil.java 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/scripts/RuleUtil.java 2015-04-21 13:09:33 UTC (rev 355) @@ -77,8 +77,8 @@ } return result; } - - public static double getTotalCatchTonsPop(SimulationContext context, Population pop, TimeStep step) { + + public static double getTotalCatchTonsPop(SimulationContext context, Population pop, TimeStep step) { double result = 0; MatrixND mat = context.getPopulationMonitor().getHoldCatch(pop); if (mat != null) { Modified: trunk/scripts/SiMatrix.java =================================================================== --- trunk/scripts/SiMatrix.java 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/scripts/SiMatrix.java 2015-04-21 13:09:33 UTC (rev 355) @@ -1285,8 +1285,8 @@ return result; } - - /** + + /** * Permet de calculer la longueur moyenne (Lbar) d'une population. * * @param step @@ -1300,47 +1300,47 @@ //log.info("Lbar_1 = " + LbarMatrix); List<PopulationGroup> groups = pop.getPopulationGroup(); - List<Zone> zones = pop.getPopulationZone(); - - // On multiplie l'abondance de chaque groupe par la taille de ce groupe - - // On somme sur les groupes - - // On utilise divise la valeur obtenue par l'abondance totale + List<Zone> zones = pop.getPopulationZone(); + + // On multiplie l'abondance de chaque groupe par la taille de ce groupe + + // On somme sur les groupes + + // On utilise divise la valeur obtenue par l'abondance totale for (PopulationGroup group : groups) { - for (Zone zn : zones) { - LbarMatrix.setValue(group, zn, LbarMatrix.getValue(group, zn) * group.getLength()); - } + for (Zone zn : zones) { + LbarMatrix.setValue(group, zn, LbarMatrix.getValue(group, zn) * group.getLength()); + } } - - LbarMatrix = LbarMatrix.sumOverDim(0); // Somme sur les groupes - LbarMatrix = LbarMatrix.reduce(); - //log.info("LbarMatrix_2 = " + LbarMatrix); - - MatrixND matAB = N.copy(); - matAB = matAB.sumOverDim(0); - matAB = matAB.reduce(); - //log.info("matAB = " + matAB); - - for (Zone zn : zones) { - LbarMatrix.setValue(zn, LbarMatrix.getValue(zn) / matAB.getValue(zn)); - } + + LbarMatrix = LbarMatrix.sumOverDim(0); // Somme sur les groupes + LbarMatrix = LbarMatrix.reduce(); + //log.info("LbarMatrix_2 = " + LbarMatrix); + + MatrixND matAB = N.copy(); + matAB = matAB.sumOverDim(0); + matAB = matAB.reduce(); + //log.info("matAB = " + matAB); + + for (Zone zn : zones) { + LbarMatrix.setValue(zn, LbarMatrix.getValue(zn) / matAB.getValue(zn)); + } - //log.info("LbarMatrix_3 = " + LbarMatrix); + //log.info("LbarMatrix_3 = " + LbarMatrix); return LbarMatrix; } - - /** + + /** * Permet de sortir le recrutement par pas de temps. * @param step * @param pop * @return */ public MatrixND Recruitment(TimeStep step, Population pop) throws TopiaException { - - List<Population> populations = Collections.singletonList(pop); + + List<Population> populations = Collections.singletonList(pop); MatrixND RecruitmentMatrix = MatrixFactory.getInstance().create( ResultName.MATRIX_RECRUITMENT, @@ -1348,11 +1348,11 @@ new String[]{n("Population")}); //log.info("Recruitment_1 = " + RecruitmentMatrix); - - // Pour chaque pas de temps on recupere le recrutement - RecruitmentMatrix.setValue(pop, context.getPopulationMonitor().getRecruitment(step, pop).sumAll()); + + // Pour chaque pas de temps on recupere le recrutement + RecruitmentMatrix.setValue(pop, context.getPopulationMonitor().getRecruitment(step, pop).sumAll()); - //log.info("RecruitmentMatrix_2 = " + RecruitmentMatrix); + //log.info("RecruitmentMatrix_2 = " + RecruitmentMatrix); return RecruitmentMatrix; } Modified: trunk/sensitivityexports/SensitivityLbarJanvierY1.java =================================================================== --- trunk/sensitivityexports/SensitivityLbarJanvierY1.java 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/sensitivityexports/SensitivityLbarJanvierY1.java 2015-04-21 13:09:33 UTC (rev 355) @@ -50,7 +50,7 @@ throws Exception { ResultStorage resultStorage = simulation.getResultStorage(); TimeStep lastStep = resultStorage.getLastStep(); - TimeStep janvierLastYear = new TimeStep(12 * lastStep.getYear()); + TimeStep janvierLastYear = new TimeStep(12 * lastStep.getYear()); double lbar = 0.0; for (Population pop : simulation.getParameter().getPopulations()) { if (pop.getName().equals(param_pop.getName())) { @@ -59,7 +59,7 @@ MatrixND matlastJan = resultStorage.getMatrix(janvierLastYear, pop, ResultName.MATRIX_LBAR); MatrixND meanLastJan = matlastJan.meanOverDim(0); // moyenne sur les zones - lbar = meanLastJan.sumAll(); // On somme tout mais en fait il n'y a plus qu'une valeur dans la matrice; permet d'avoir un double + lbar = meanLastJan.sumAll(); // On somme tout mais en fait il n'y a plus qu'une valeur dans la matrice; permet d'avoir un double } } out.write(Double.toString(lbar)); Modified: trunk/simulators/DefaultSimulator.java =================================================================== --- trunk/simulators/DefaultSimulator.java 2015-04-21 12:44:34 UTC (rev 354) +++ trunk/simulators/DefaultSimulator.java 2015-04-21 13:09:33 UTC (rev 355) @@ -456,12 +456,12 @@ resManager.addResult(step, pop, biomassBM); } - if (resManager.isEnabled(ResultName.MATRIX_LBAR)) { + if (resManager.isEnabled(ResultName.MATRIX_LBAR)) { MatrixND Lbar = siMatrix.Lbar(step, pop, N); resManager.addResult(step, pop, Lbar); } - - if (resManager.isEnabled(ResultName.MATRIX_RECRUITMENT)) { + + if (resManager.isEnabled(ResultName.MATRIX_RECRUITMENT)) { MatrixND Recruitment = siMatrix.Recruitment(step, pop); resManager.addResult(step, pop, Recruitment); }
participants (1)
-
echatellier@users.forge.codelutin.com