Commit 15e7bbe6 authored by ThibautDemare's avatar ThibautDemare

Debug buildNeighborsList when there is no neighbor in the range

parent eec5c65a
......@@ -327,9 +327,13 @@ species FinalConsignee { // Used to be called FinalDestinationManager with assoc
}
action buildNeighborsList {
neighbors <- at_distance(FinalConsignee, neighborsDistance);
if(length(neighbors) = 0){
write "Error : not enough neighbor";
int i <- 1;
loop while: length(neighbors) = 0 {
neighbors <- at_distance(FinalConsignee, neighborsDistance * i);
i <- i + 1;
}
if(i > 2 ){
write "Error: not enough neighbors. i = "+i;
}
}
}
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