From b01fefbf453c77d9ed628d74f41d7763db22e877 Mon Sep 17 00:00:00 2001 From: Lambert Patrick <patrick.lambert@irstea.fr> Date: Tue, 27 Aug 2019 18:06:13 +0200 Subject: [PATCH] buf fixed --- src/main/java/species/NutrientRoutine.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/species/NutrientRoutine.java b/src/main/java/species/NutrientRoutine.java index 964b504..598a6d6 100644 --- a/src/main/java/species/NutrientRoutine.java +++ b/src/main/java/species/NutrientRoutine.java @@ -114,9 +114,9 @@ public class NutrientRoutine { public NutrientRoutine() { - + } - + /** * Constructor based on the 5 Map of fish composition * @param fishFeaturesPreSpawning @@ -287,7 +287,7 @@ public class NutrientRoutine { public double getWeight (DiadromousFish fish, SpawningPosition spawningPosition) { double weight = 0.; - if (fish.getStage()==Stage.IMMATURE) + if (fish.getStage()==Stage.IMMATURE) weight = juvenileFeatures.get("aLW") * Math.pow(fish.getLength(),juvenileFeatures.get("bLW")); else //Stage.MATURE if (spawningPosition == SpawningPosition.PRE) @@ -312,14 +312,14 @@ public class NutrientRoutine { public double getGonadWeight (DiadromousFish fish, SpawningPosition spawningPosition) { double gonadWeight = 0.; - if (fish.getStage()==Stage.MATURE); - if (spawningPosition == SpawningPosition.PRE) - gonadWeight = Math.exp(fishFeaturesPreSpawning.get(fish.getGender()).get("aLW_Gonad") - + fishFeaturesPreSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength())); - else - gonadWeight = Math.exp(fishFeaturesPostSpawning.get(fish.getGender()).get("aLW_Gonad") - + fishFeaturesPostSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength())); - + if (fish.getStage()==Stage.MATURE) { + if (spawningPosition == SpawningPosition.PRE) + gonadWeight = Math.exp(fishFeaturesPreSpawning.get(fish.getGender()).get("aLW_Gonad") + + fishFeaturesPreSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength())); + else + gonadWeight = Math.exp(fishFeaturesPostSpawning.get(fish.getGender()).get("aLW_Gonad") + + fishFeaturesPostSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength())); + } return gonadWeight; } -- GitLab