Skip to content
Snippets Groups Projects
Commit 15e7bbe6 authored by ThibautDemare's avatar ThibautDemare
Browse files

Debug buildNeighborsList when there is no neighbor in the range

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