谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' T8 y* L9 U7 A( X
begin model initialization function/ b4 G, O9 V# P( d% R$ K; z
create 1 load of load type L_null to P_Creation20 x5 ^- b3 j" E/ y/ P$ |0 F
create 1 load of load type L_null to P_Creation3% M# S# F, n5 ]0 ^# M+ Y
create 1 load of load type L_null to P_Creation4
3 d2 ~& d- B) `$ s return true % K1 P! e; S; R5 a" C. \8 s, x
end
1 T& b0 p. n8 U6 _7 K& \6 ]* E3 J* z; t# v y' E
begin P_Creation2 arriving procedure+ ^ w' f1 {& Q. Y" c, u
while 1=1 do) U0 ?. _' Z/ b* c( F6 y( L
begin9 V6 F$ ? V L
wait for 1 sec9 G; i, Q) ?& y, c, W/ z
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 i3 C, f0 V" E3 V end& ?$ X% N) ]1 C. ^( [
end
: s# K* h- G5 ^$ F5 V) Z
. J) t, A- _, Y( _, P# jbegin P_Creation3 arriving procedure
( {% V" z( b4 m p" ~. c1 Vwhile 1=1 do
1 \$ ?5 c* F; q6 s begin: J& ]+ v# P6 Z. j
wait for 1 sec
+ z! y0 z, L; J6 m create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)) F3 n% I% k' T. b# L1 f
end B7 N( T7 A* p! U3 ]3 S. K& q! t
end 0 M# r5 |$ b/ P; q% a
$ _+ u; c9 \( l- {begin P_Creation4 arriving procedure
2 M$ N+ W9 E, a) c2 ]- O' I. d% ^while 1=1 do7 t( R3 V2 i0 P+ v! ]* `$ K
begin
0 w; B) C/ a- x% ~- ] wait for 1 sec
2 p1 r, B+ U$ }" l$ s! K- n create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)7 ~9 O" w: `+ t4 J9 z
end1 F1 W" @# e' x) {) D" v
end
' B0 d5 _# X7 {2 `' j M$ N, x8 q& n$ O+ I/ F
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |