谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
$ W1 C8 b) I' z/ [: O! hbegin model initialization function9 I' Y$ e# {# k; L% p4 d
create 1 load of load type L_null to P_Creation2
* _: C i/ T. j* ]6 z0 }0 A+ N k1 h0 o create 1 load of load type L_null to P_Creation3% l: }$ S! b* \4 M# K) a/ @( R
create 1 load of load type L_null to P_Creation4( C0 F; z/ }& y$ F! _# T9 Q% {5 ]
return true . a- u; O7 ~! ~5 i8 [; ~
end
, e. ]- N0 e' h/ P5 p* ]" W+ J! o0 k5 T5 }
begin P_Creation2 arriving procedure4 d/ h n: I( b6 z
while 1=1 do. R6 M. j7 w0 X M$ C% t9 l; q; L
begin, t' u, I8 W9 W: z6 e' j% h7 E
wait for 1 sec
* m: A4 `( }1 U, G- v create 1 load of load type L_C2 to oneof(0.2_In2,0.8:die)
4 R3 ~* F8 m; _# r# O" k6 i3 w4 D/ ~ end
" v. C+ W# M3 ~* \. @end
: o7 D7 R' [$ w0 S, i* t8 k' A9 s
begin P_Creation3 arriving procedure
" _, P; l: Q0 f- G }& H! D. l5 ~ y# zwhile 1=1 do" E$ O; z' G. Q2 @
begin$ [" y/ d1 x' p; t7 k& w
wait for 1 sec
0 L* \: w. @: w- r create 1 load of load type L_C3 to oneof(0.2_In3,0.8:die)
2 }& D. [' _% ^, o end% L3 j& O1 L! I, C. [& M# Z
end ) ?/ r+ C! C. S
8 H- ?1 N, z; g! nbegin P_Creation4 arriving procedure6 O2 W/ b$ {; W+ Z W# b. ^
while 1=1 do
( A) w% b( R. b' U begin+ h' ~! @" t" f+ ^3 t
wait for 1 sec5 Q" d' y$ ^4 q, ^
create 1 load of load type L_C4 to oneof(0.2_In4,0.8:die)
6 o; o, O6 {7 ?& g end& g5 K2 E' [, I* q' m* V$ K; U: ?
end
& y/ A. [) j2 m+ H+ p- h* H, S/ }/ s& u+ r e* x/ U; d! ]
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |