Commit f44d81b0 authored by Lambert Patrick's avatar Lambert Patrick
Browse files

bug fixed but need to be upgraded

parent efd22abe
......@@ -7,6 +7,7 @@ import java.util.Map;
import environment.Basin;
import environment.BasinNetwork;
import environment.RiverBasin;
import environment.Time;
import environment.Time.Season;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
......@@ -30,7 +31,7 @@ public class DisperseAndMigrateToRiver extends DisperseAndMigrateToRiverBasic {
System.out.println((new XStream(new DomDriver()))
.toXML(new DisperseAndMigrateToRiver()));
//TODO need to be corrected to remove fish remove
public void doProcess(DiadromousFishGroup group) {
......@@ -40,7 +41,7 @@ public class DisperseAndMigrateToRiver extends DisperseAndMigrateToRiverBasic {
long amountWithHoming, strayedAmount;
Map<Basin,Double> distBasOfFish;
Map<RiverBasin,Double> distBasOfFish;
List<DiadromousFish> deadFish = new ArrayList<DiadromousFish>();
List<DiadromousFish> newFish = new ArrayList<DiadromousFish>();
......@@ -56,11 +57,11 @@ public class DisperseAndMigrateToRiver extends DisperseAndMigrateToRiverBasic {
if (strayedAmount != 0) {
// On r�cup�re les info du poids des bassin par rapport � la position du poisson
Map<Basin,Double> accBasOfFish= new TreeMap<Basin, Double>(accessibleBasinsPerBasin.get(fish.getPosition()));
Map<Basin,Double> accBasOfFish= new TreeMap<Basin, Double>(basinWeightsPerBasin.get(fish.getPosition()));
//accBasOfFish = accessibleBasinsPerBasin.get(fish.getPosition());
// On retire certains bassins si on consid�re une distance max de dispersion
distBasOfFish = distanceBasinsPerBasin.get(fish.getPosition());
distBasOfFish = basinDistancesPerBasin.get(fish.getPosition());
if (group.getdMaxDisp() != 0){
// TODO pourquoi distbasoffish peut �tre nul ?
if (distBasOfFish != null){
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment