谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);& N+ D- g+ `( z4 O1 g( L
begin model initialization function
" _1 @" L5 ~; I6 F+ ^( @( k create 1 load of load type L_null to P_Creation2
4 P% m7 M. C+ h3 Z1 _! \( D create 1 load of load type L_null to P_Creation3
5 W, v' n" c" b# }( i create 1 load of load type L_null to P_Creation43 W- \' B% y9 V0 R1 P. h# B
return true $ B/ u: y& F* B: w# r6 `0 _( z ]% n
end3 b* b1 b4 ^4 U( b
$ D& l4 `; ?6 P2 Z" p7 d
begin P_Creation2 arriving procedure7 G2 V! I9 q: n% {) a' D
while 1=1 do
. ~; x1 U u) e* p. t begin8 o- i, {0 u3 E+ Z: }! }
wait for 1 sec( ], D- [$ s, B' ~6 d9 F! ~
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)9 z1 {$ d4 C( y6 v$ m2 E
end
% T2 p @+ L9 y B, `* pend
" K& l& A% e% N0 L9 W/ g/ s5 C: o+ J% H9 v7 B9 M& I& J
begin P_Creation3 arriving procedure
! g; `9 n' G% Nwhile 1=1 do
+ C2 p$ x0 P! e0 d begin8 C$ e) H; J( i! K% N1 j
wait for 1 sec0 x3 _. T3 h$ _5 s' S) a
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
; O$ T; {. h0 B end
, N/ Z0 e# R+ [# P/ B2 s9 S: T, ^end
# ]+ f7 ~+ P% L( Z9 ?' e+ I
' f8 z2 t3 `0 C ^$ f; p* [! f5 sbegin P_Creation4 arriving procedure
; S# I* N8 F, p1 I- q! P( Bwhile 1=1 do
1 A5 E4 H( z N/ c( F2 S h begin
' P$ k" _5 r) q1 A wait for 1 sec
9 G0 x9 J" y X) x# k% S create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( K3 w3 d- s3 r l( r' I0 D1 j* r end
% m5 I9 N5 ]: [$ d, uend! {# w8 f* ~# U( Q$ Z
. P' i9 L, I% p% v
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |