谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);3 D6 d( o# o$ T
begin model initialization function. b* a- q. O$ u3 P# y" H( J
create 1 load of load type L_null to P_Creation2
+ X' \9 y: r- L$ W) k: k create 1 load of load type L_null to P_Creation3. |& g6 o2 D* q9 y
create 1 load of load type L_null to P_Creation4
& z3 v' ?) Y) o t- \2 D R return true
( @" E* a1 N5 c6 z" p) qend
: H) }( [4 p3 L2 |7 g# n. ^/ M, o2 x& c. |( C: x7 R
begin P_Creation2 arriving procedure
3 d6 o" v/ z8 Dwhile 1=1 do& ?4 A3 g* p( t3 y
begin
" u$ D: H" c" b wait for 1 sec
$ r4 T! v2 d, ?+ x6 v create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
" G5 R, j; t. ?! c end) l' O: m; F3 n F
end9 D* p, T) O" }$ [1 f9 M
1 u6 m7 R' u# B4 M% K. I
begin P_Creation3 arriving procedure6 z# o9 W1 _& [9 X2 r$ M( q) j0 r
while 1=1 do. h% N% |7 o" I. ]" M2 H
begin
' B1 i* W0 K/ W0 @3 p) f$ l4 z. b wait for 1 sec9 m, p5 d8 x* ]. ]8 n
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
; l& J2 y3 @9 q! E' W' Z! `. ] end* n- X: p: S2 @2 l1 P/ O
end ; J( w. t2 O3 S7 V- O3 G# Y+ T; L$ _( @. @8 S
) \7 |9 g, t/ P) nbegin P_Creation4 arriving procedure
6 f0 i* W1 O/ m% Rwhile 1=1 do
1 s, o' o$ H4 X: e3 j begin
7 U* N" s2 i; n; d wait for 1 sec
* y& r3 R& L" I" J+ ^7 {/ b! p create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)$ y( X+ z" j2 J- f. @1 }
end
+ s" I; }3 z/ zend7 [* z0 @, e* V
( o- V4 E0 y9 ]' V2 @
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |