谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. J, D# W( T# b0 |begin model initialization function
9 [# v) A- t, }! Q. W8 @, L. Z+ Q create 1 load of load type L_null to P_Creation2
4 C$ J4 Z1 i! x! B! c0 U' t |) a create 1 load of load type L_null to P_Creation3( C# N, Z6 x' \: {' H
create 1 load of load type L_null to P_Creation4( A" `, O4 o k$ r* F
return true , X/ b U k$ C* h3 m! Q" V% g
end
2 r2 `# y' Z/ `, ^
( u8 f% b0 \0 c M* C8 vbegin P_Creation2 arriving procedure6 ?" n( _* d2 H- U9 i* U+ Z
while 1=1 do8 R% ^4 T. D2 p' k# N Q+ C m4 d
begin
3 `) D+ K6 f" B. I h ` ^( q/ j wait for 1 sec; u, @% Q: M& A0 g: {2 a
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
+ T" o; t1 H# X! b+ T4 X! \! W end B7 D4 b, p8 r
end* x" e1 A7 {2 ?* Q# g+ N( ]
1 c1 Z8 o# y# H2 I
begin P_Creation3 arriving procedure
p- r5 y# `) _0 P, t# bwhile 1=1 do- G( A0 M& M) c+ Y E5 z u
begin2 M! N/ F6 I, C( n7 H! G/ ]; a! s6 s
wait for 1 sec" Y" o' X$ u+ y/ R
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)' G- c! K) K1 |7 z6 D$ \
end
# V: E' Z" B2 k, P/ k& ?. O" uend + e5 b) E( f- E: @1 K
9 U" K& z$ V/ U ?2 J1 Fbegin P_Creation4 arriving procedure
- ]4 h6 b7 n* ~; s3 nwhile 1=1 do! u1 d* U5 y, o& ]( ^: F& |
begin2 O2 t1 j" y9 A9 T# A0 n. b4 E
wait for 1 sec0 P- I0 ^" x: j
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)7 T5 P& t7 n8 Z3 }9 d, P* ^
end; b- S5 Y+ [$ X+ X
end
) y7 d1 V8 Y: ^. P* f. q; J5 ~& a
t4 Q5 Q/ n1 }" |/ Y& v& z* g. T但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |