在netlogo模型库中有一个virus on a network,里面有一个代码to spread-virus* h/ k5 {) B+ [) M& \; @/ \# D: K
ask turtles with [infected?]
9 I' v1 b) b' K9 |) g [ ask link-neighbors with [not resistant?]4 I! C, j* [: ^6 a7 T3 d
[ if random-float 100 < virus-spread-chance+ H* Q+ [4 B9 t" ~# d2 H( E
[ become-infected ] ] ]& L/ U) [ e( c4 [
end9 F7 \" E, W" s' ]! T# r5 N0 C
这里为什么virus-spread-chance大于random-float 100,就可以判断出become-infected呢?0 ^9 Z0 J+ a( \5 ^. V2 [
to do-virus-checks
5 z. e; s4 k$ s: V& _! |( F ask turtles with [infected? and virus-check-timer = 0]' p! a( K2 U# {/ u7 R
[' L! c& W0 }4 I( w6 w+ n+ T
if random 100 < recovery-chance9 C9 b, Q6 u$ O9 `. x3 l- g
[+ d3 |9 G9 ?( I; V2 p
ifelse random 100 < gain-resistance-chance" P2 b. H3 f2 ?
[ become-resistant ]$ ^ j. f. o' y5 s
[ become-susceptible ]' t1 q/ y$ ]# m5 E
]
5 n( {7 A; b# ], d$ T ]
: ]! ]" Z) g$ ]8 G" ^9 ^" x$ send: M) i7 {4 U8 d
下面同样这个问题不明白
5 m" a7 i1 P& H$ }8 |& c8 S& I小妹求大神帮忙!! & W% S. X0 ?: T. g5 [% Y
|