You are not logged in.
Pages: 1
Dear all,
In NetLogo, every time the "go" button is processed, patches and turtles can be updated. I would like to be able to do the same in TK. How can I access this "go" loop in TK ?
Thank you for your help
Offline
Thanks to Fabien, I found the go-loop in the TurtleScheduler. Unfortunately, TurtleScheduler cannot be selected as a parameter of the application.
For now, I bypassed this issue in modifying the TK code (my personnal class, which extends TurtleScheduler is initialized instead of TurtleScheduler), but now my version differs from the official TK one. Is there a line I can change in the XML file in order to select my scheduler instead of the TK one ?
Offline
Hi,
In fact there is a way to define how the scheduling will be done during the simulation. Here is a sample of src/demo/solstice/Demo_Solstice4.xml :
<scheduling>
<methodActivator role="viewer" method="display"/>
<methodActivator role="observer" method="watch"/>
<turtleActivator/>
<methodActivator role="world" method="diffusion"/>
<methodActivator role="world" method="evaporation"/>
<methodActivator role="world" method="updateFood"/>
</scheduling>
Does this solution answer all your needs ?
Offline
Pages: 1