Hi,
All keyword in the subject ! I would like to find the "best" cell at the max distance of myself in a perception area.
reflex perception {
/* Define the perception */
perceived_area <- (cone((180+heading)-3#km,(180+heading)+3#km) intersection world.shape) intersection circle(perception_distance);
if (perceived_area != nil) {
myVisibility <- dem_cell overlapping perceived_area where(each.elevation < 179);
}
}
reflex mvt {
speed <- rnd(100.0)#km;
if(myVisibility != nil){
food_target <- point(one_of(myVisibility where(each.NDVI97 < 0.3 and each.NDVI97 > 0.2) at_distance perception_distance of myself));
}
if(self.location != target_travel.location){
do goto target: food_target;
}
}
But it doesn't work ...
E.
--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platform+unsubscribe@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platform+unsubscribe@googlegroups.com.
Cool, and distance_to also work ? I imagine...
Why should you specified location ?
E.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platform+unsubscribe@googlegroups.com.