0

我正在 Netlogo 中建立一个模型,我正在模拟病毒的传播。我查看了其他病毒模型,但到目前为止还没有找到解决我的问题的方法。

我希望每个代理交互具有特定的传播概率,基于易感代理的易感性(代理属性)、受感染代理(可以是多个)传播病毒的概率(代理属性)以及时间在附近度过。基本上 P(被感染)= 传染性 * 接近时间 * 易感性。因此,对于易感乌龟与受感染乌龟接近的每一个蜱虫,被感染的可能性应该会增加。到目前为止,我只在使用易受攻击的代理作为调用者创建过程时才设法使用易感性。

到目前为止,这是我的此过程的代码:

to transmit; procedure for transmitting the disease to nearby people, inspired by epiDEM
  let caller self ; adress the susceptible turtle by the name caller
  if susceptible? = TRUE
  [
  let nearby-infected turtles in-radius 2 with [infected? = TRUE]
  if nearby-infected != nobody
    [      
      let transmission-risk age-susceptibility ;here I want to include protective-measures (attribute of the possibly several infected turtles) and time-exposed
    if random-float 1 < transmission-risk[
      set infected? TRUE set susceptible? FALSE]
    ]
  ]
end

我真的很难解决这个问题,我不知道如何解决半径内海龟的属性以及如何测量曝光时间。我正在考虑创建具有暴露时间作为属性的链接,当感染者不再在半径范围内时,该属性将消失。但是我不知道当海龟之间的距离超过 2 个补丁半径时,如何让链接死掉。另外我宁愿不使用链接来保持模型运行得更快,所以如果有其他解决方案我会很高兴听到它:)

对于带有链接的选项,我想尝试这样的事情:

to transmit; procedure for transmitting the disease to nearby people
ifelse link-neighbors (in-radius 2 = FALSE)
[ask link [die]]
[set link-age link-age + 1]
  
  let caller self ; adress the susceptible turtle by the name caller
  if susceptible? = TRUE
  [
  let nearby-infected turtles in-radius 2 with [infected? = TRUE]
  if nearby-infected != nobody
    [create-links-with nearby-infected
      let transmission-risk age-susceptibility ;include protective-measures and time-exposed using links to address the turtles
      if random-float 1 < transmission-risk[
      set infected? TRUE set susceptible? FALSE]
    ] 
  ]

但是,对于初学者来说,我只是不明白如何解决更远的海龟的链接以要求它们死亡,我在收到错误消息后更改了它,但似乎无法让它工作。

甚至可以在 Netlogo 中做我想做的事吗?

非常感谢任何提示!

4

0 回答 0