|
我想把在每一个patch上的turtles经过一定标准选择选出一个,然后把这一个turtle的一个属性变量传递给patch,写了下面的代码。/ L4 H4 A) o, l) m1 r; g8 l
2 G" S3 N4 w, k: [; \; p$ u主要有两个疑问:
5 E! S/ |, m w0 T: F! {1 M: X3 B0 a2 m
第一,我是用of引用turtle的属性的,可是通不过编译。应该用什么办法?
* y2 [8 {4 R7 f! [9 ]- H第二,set expectation那一句里的para-a和para-b也应该是被选出来的turtle包含的参数,可是目前这个写法似乎不能体现出来这个意思。- L4 [6 g# G! }; e2 Z
0 }8 I1 w( ?+ J9 @* a8 x! A% w7 Z
) w- w, f! i# D% @
各位高手能不能帮忙看看啊?提前谢过!' `' }) _ C' A- J. f. o
, R% N- v# g& u# c, [! F0 yto form-expectation
G1 V e& k; G) S# c6 @ ask patches [
6 ]# s7 H- c- V: h4 Y let active-strategy min-one-of ( turtles-here with [ length ( remove true (map [?1 = ?2] predictor descriptor) ) = length ( remove "#" predictor )]) [ strategy-error ]
4 D: y6 {. B& W" a" E5 M set expectation para-a * ( pre-price + pre-dividend ) + para-b& K! L F# u; {. T& T
set trader-error strategy-error of active-strategy" e6 P& }4 U6 D" y
set trader-type strategy-type of active-strategy ]
. Q4 r O- a2 n9 I$ z9 p& B `$ n6 g2 send |
|