randals
randals

Reputation: 70

How to get NetLogo to run a function every 30 minutes

I'm trying to get NetLogo to run a function every 30 minutes. Can anyone suggest how to do this? Thanks.

The structure of go looks like this:

to go
get-data (run every 30 mins)
execute-and-return-decision-based-on-the-data-just-retrieved
end

Upvotes: 1

Views: 76

Answers (1)

Bryan Head
Bryan Head

Reputation: 12580

Check out every. It makes sure the given command block runs at most once per time period. Anyway, if your go is being run by a forever button, then this should work:

to go
  every 30 * 60 [
    get-data
    execute-and-return-decision-based-on-the-data-just-retrieved
  ]
end

Upvotes: 1

Related Questions