I am trying to program the simulation with 3 sets of agents - A,B,C. The point is that the agents from the set A can choose to DO the action or NOT. If they decide to NOT do the action, the simulation stops. When they decide to DO the action, simulation continues to the next step, where the agents from the set B can also decide to DO the action or not. The same is here. And the agents from the set C, can also decide to DO the action or NOT, but here, the simulation in both cases stops. Here is my code:
ask turttles [
if breed = set A [ ifeslse do?= false [ set lazy]
stop]
[ if breed = set B [ ifelse do1?= false [ set lazy]
stop]
[ask other turtles [ if breed = set C [ ifelse do 2? = false [ set lazy
stop] ]
[set done
stop] ]
]
]
]
The code does not work very good,I need somehing to link these three step, because when I export-world, I got data only from the first step
If you do
stop
inside of anask
, it won't cause the whole simulation to stop. It will only stop the current turtle from executing the rest of theask
.I think you want something more like:
But I'm guessing somewhat, since it's difficult to tell from your description what your actual intentions are. (Especially since you haven't included your real code — the coede in your question wouldn't get past the compiler.)