list3 = list1 - list2(netlogo)

时间:2017-10-06 08:28:37

标签: list netlogo

我是NetLogo的新手,对于患者 - 外科医生模型,我需要创建一个list1 - list2 list1list2SET list1 lput WHO list-n包含从其他列表中提取的患者的人数(例如,?)。 我使用下面的代码来减去列表但我无法这样做,因为模型无法识别?1set list1 [] set list2 [] ;; emptying the list to add the who number of patients ;; then setting the list as per the who number of agent ;; setup patients SET list1 lput WHO list-n SET list2 lput WHO list-k 。请帮我如何为n个值减去两个列表。

list3 = list1 - list2

我想要的是什么:to test-lists let list3 [] foreach list2 [ if (item (position ? list2) list1 = 1)[ set list3 lput ? list3 ] ] end

使用的查询:

nothing named ? is defined

但我收到错误:

def write_extension(self):

    extension = []
    dtd = ""
    if extension == []:
            extension = extension.extend(self.edids[]  (Thanks to Howardyan for making it clearer for me)

    print(extension)

根据手册,"?总是相当于?1"并且无需定义。请建议如何减去列表。

0 个答案:

没有答案
相关问题