You probably want to have the bizs own some variable like "visited", which you can initialize to zero . ( or trust the system to do that but I prefer to be sure it gets done. ).
Then instead of visiting a "biz" you want to only visit "bizs with [visited = 0]"
By the way, your code" [move-to one-of [neighbors] of one-of
bizs]" moves prts to "neighbors" which the dictionary says are patches, so you are asking your prt to move to a patch which is adjacent to the patch that some biz is on, not to a biz.
One solution might be to make your biz's patches, since they don't ever move, and recode your logic.
If you use patches, you don't need to invent a new variable, you could use pcolor to flag whether a patch has been visited or not,
which handles both the logical tracking and makes a visual display that is more informative.
I have two groups of turtles, prts (n=2) and bizs (n=10). The mobile prts visit the immobile bizs. My command to do this is:
ask one-of prts [move-to one-of [neighbors] of one-of
bizs]
My question is how do I get the prts to only visit unvisited
bizs? More specifically, if prt1 visits
bz1, I want neither prt1 nor prt2 to visit biz1 again.
Thanks, RB
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/a6ac18fa-019a-462a-a645-b6eb7d451825n%40googlegroups.com.