谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
* b" b) q7 R% nbegin model initialization function! @/ [! j; l/ q6 \% r5 D
create 1 load of load type L_null to P_Creation2
1 S2 c: M/ V3 Q+ Q, r create 1 load of load type L_null to P_Creation3. S7 z* a, |* \6 t) q
create 1 load of load type L_null to P_Creation4
1 C, `. D! B! x7 i- m return true ! _ Z# \. q' H2 ]- S! R
end
5 t$ d+ [! N4 n' m. V! j. R L! E8 V
begin P_Creation2 arriving procedure% a9 Z1 k- x+ {: r0 v/ s
while 1=1 do
- q: a# m+ o3 z* S y5 J begin( b, X' s+ _- }
wait for 1 sec
/ j. X% j& c, n0 k, e create 1 load of load type L_C2 to oneof(0.2_In2,0.8:die)$ |# W9 K6 x1 {
end
) j- n0 e% E1 e& x, W- H s6 Eend
% i" U) Q" K: T/ a. F9 i& P* t: f, }. ^- B" ^* D% ~* z! |! G( c7 x0 O) h5 {: N
begin P_Creation3 arriving procedure: n6 A3 Z H6 Y/ Q+ w
while 1=1 do" a* s$ V/ [! M0 R
begin
: U' j/ O+ z8 {2 E wait for 1 sec2 C( {7 S" i# D) c
create 1 load of load type L_C3 to oneof(0.2_In3,0.8:die)
. ]$ N% a1 B- m/ u end
7 |5 ]- S6 ]& j5 F- m/ W# cend
) N( j3 i5 J6 [
~' R% D* W W0 d; d6 mbegin P_Creation4 arriving procedure$ b' u, S ]0 y4 s
while 1=1 do
, z5 R2 l: J$ P begin
0 B( k' O7 p& ?1 `( H wait for 1 sec
0 v2 K# r' J3 H d create 1 load of load type L_C4 to oneof(0.2_In4,0.8:die)
. N6 q, e g& x5 I5 | end
2 v7 K |" o! }8 e' A3 Y. B- Q% rend
' O' K$ A% G& R5 M% }9 m; F+ H
9 u3 |9 \( L. l" q0 p* X2 s但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |