谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
0 f# R' O! F) x# t) G* Ibegin model initialization function
4 S. P% c, H, Z) u$ q: k create 1 load of load type L_null to P_Creation2- u* J! `, W+ ]1 ]9 ^
create 1 load of load type L_null to P_Creation3
1 P& a8 m/ s6 I$ j create 1 load of load type L_null to P_Creation4/ P# i _& E. P2 w j9 X8 r6 O
return true
- e! i2 \1 w( I. I0 @+ ^) N& ^end. r6 R0 c( {) w
9 s4 @* |; j9 u7 i5 T! U
begin P_Creation2 arriving procedure
+ }* T5 a# W2 `* v# r# [while 1=1 do
- Z- I+ M* t6 A j; [7 p* P. ?3 \ begin+ _7 w5 w F- m. ~6 T- Z" P3 G
wait for 1 sec
! K5 l- ?4 I$ i+ e6 V create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
3 T; v9 \& J- K% I4 g end
4 D; `/ y( Y1 S/ Xend
7 `: I: l8 h8 d3 I) c$ F& b) ]+ v, Z8 g7 o" r
begin P_Creation3 arriving procedure
) t9 X& a& {% I0 j% Y9 s6 e' f$ o& P6 Bwhile 1=1 do
; i/ j1 B y) k- r' l7 e+ b( I begin1 }0 [% ~$ C& K; r* Y5 c
wait for 1 sec
0 ^* }9 @, c7 Q. B create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)$ C' h& ^' A1 y* a# J( H8 G
end2 h5 {% s/ t% h& o" i3 O
end / l! W& N. a; [
! s, r! u" Y; t# L& kbegin P_Creation4 arriving procedure
3 s0 G( q& w% V9 ^+ }& Cwhile 1=1 do6 V' W, Q0 \+ r& g2 y( Y
begin
/ |+ S! s8 ^4 u. s wait for 1 sec; Z7 G% E3 t. l1 P
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)- ~6 W. K1 `3 _
end I; V6 n0 m3 p2 u6 \9 A
end' o9 X( m p `8 w. {
) V9 Z" I4 B9 _+ |: |4 [: i6 j0 v2 `但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |