我正在使用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]
之类的东西。不幸的是,时间扩展中的调度程序不断使我的模型崩溃,因此我不确定这是一个选择。
希望可以为您提供帮助
答案 0 :(得分:0)
我在time documentation中找到了自己想要的东西。我可以创建一个名为turtles-own
的{{1}}变量,然后应用以下代码行,以使代理可以在当月保留制表符:
my-month