要求代理人在特定时间段内以时间延长进行行为

Asking agents to behave during a certain time period with the time extension

我正在使用 NetLogo 中的时间扩展来加载一些每日温度数据。我模型中的海龟有一些与此温度数据相关的程序。我可以按如下方式设置时间方面:

  set time-series time:ts-load "environmentTimeseries.txt"
  set start-time time:create "2018/01/01"
  set current-time time:anchor-to-ticks start-time 1.0 "day"
  time:anchor-schedule start-time 1.0 "day"

海龟可以与此温度数据交互:

set current-temp time:ts-get time-series current-time "temp"
  ask turtles [
set my-temp random-normal current-temp 1 ; my-temp is a turtles-own variable
]

我现在想做的是让海龟只在一年中的某些月份执行此程序。类似于 if month > 5 & < 7 [do procedure]。不幸的是,时间延长中的调度程序不断使我的模型崩溃,所以我不确定这是一个选项。

希望你能帮上忙

我在 time documentation 中找到了我想要的东西。我可以创建一个名为 my-monthturtles-own 变量,然后应用以下代码行,使代理能够密切关注当前月份:

set my-month  time:get "month" current-time