В моем исследовании я пытаюсь создать симуляцию, представляющую реальную настройку работы, с целью создания знаний о том, как заставить людей чувствовать себя лучше на работе. В частности, я моделирую сценарий, в котором люди работают более чем в одной команде (вы работаете только по одному проекту за один раз? Многие не ...). Для этого я работаю с NetLogo.ASK ожидаемый вход, чтобы быть агентом или агентом, но получил NOBODY вместо
У меня возникла проблема с ASK для конкретного агента настраиваемого набора черепах. Дело в том, что иногда он сообщает об ошибке, заявляя, что «ASK ожидается, что вход будет агентом или агентом, но вместо этого получил NOBODY», но он не должен доходить до этой «ASK» без наличия агента! Что я делаю не так?
Функция заключается в следующем:
to TeamRecruiting
;; I ask non-complete teams to...
ask teams with [ teamsize != (count membership-neighbors) ]
[
;; ... count how many individuals they have...
let actualteammembers count membership-neighbors
;; ... to save locally how many individuals they can share...
let teamoverlap overlap
;; ... their target size...
let neededsize teamsize
;; ... and their identity.
let teamwho who
;; then I ask those individuals that have not yet more things than they can handle...
ask individuals with [ indMTM != (count membership-neighbors) ]
[
;; ... to save locally who they are...
let indwho who
let createdalink 0
;; ... then if some conditions have been met ...
if(some conditions)
[
;; I create a link (of my specific type) with the team...
create-membership-with team teamwho
;; I do the following because more than one individual could join the team teamwho in the same run of the function
ask team teamwho [ set actualteammembers (actualteammembers + 1) ]
set createdalink 1
]
;; if the association occurred, ...
if(createdalink = 1)
[
;; we ask all other teams to evaluate if the new connection violates their maximum overlap constraint between the team I am considering from the beginning of the function, and all other teams, in other words...
ask teams with [ who != teamwho ]
[
let numpaths 0
let team2who who
;; I count how many individuals say that they are shared by the two teams
ask individuals
[
if((membership-neighbor? team teamwho) and (membership-neighbor? team team2who)) [ set numpaths (numpaths + 1) ]
]
;; ... and if the number of paths is more than the maximum allowed overlap...
if(numpaths > teamoverlap)
[
;; I take the connection away...
ask membership teamwho indwho [ die ]
;; and I reduce the actual number of team members
set actualteammembers (actualteammembers - 1)
]
]
]
]
]
end
Благодарим Вас за драгоценной помощь!
примечание: проблема бывает: спросите членскую командуwho indwho [die] – ValerioI