【发布时间】:2014-04-25 13:36:48
【问题描述】:
我在 netlogo 中有以下内容
ask m-depts [ ; this check the values of turtles against some set numbers
ifelse
(m- k >= 5) and (m-t >= 3) and (m-c >= 3 ) and (m-s >= 4) and (m-b >= 3) and (m-d >= 0) [
move-to one-of patches with [pcolor = yellow]
] [
ifelse
(m-k >= 5) and (m-t >= 5) and (m-c >= 5 ) and (m-s >= 5) and (m-b >= 3) and (m-d >= 1) [
move-to one-of patches with [pcolor = green]
] [
action-m-depts
] ]]]
]
第一个我想添加一些条件(设置………)如果海龟会变成黄色,还有一些其他条件如果它会变成绿色,例如
If pcolor = yellow [
set m-k m-k + 0.5
set m-t m-t + 1
] ;
If pcolor = green [
set m-k m-k + 0.8
set m-t m-t + 2
] ; etc otherwise do action-m-depts (defined elsewhere)
第二步对于下一步(滴答声)我想修复乌龟等待补丁例如(对于黄色补丁,等待 5 年(5 个滴答声),对于绿色补丁等待 2 年(2 个滴答声)。如何我应该将这两个问题合并到这个模型中吗?
【问题讨论】: