MaDKit forum

Welcome All !
Please, use explicit topic names when creating new threads. Thanks.

You are not logged in.

#1 2011-10-04 15:00:04

lois.vanhee
Member
Registered: 2011-10-03
Posts: 12

Go-like cycle

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

#2 2011-10-10 11:06:24

lois.vanhee
Member
Registered: 2011-10-03
Posts: 12

Re: Go-like cycle

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

#3 2011-10-21 16:32:22

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 172
Website

Re: Go-like cycle

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

Board footer