谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
" Q0 R! E% q3 {" Z1 ]# bbegin model initialization function5 Y4 [( N- R- t& Z8 h! i
create 1 load of load type L_null to P_Creation2
) p; i ^4 S; M% j create 1 load of load type L_null to P_Creation37 L) L3 A" v% [7 F( O" H
create 1 load of load type L_null to P_Creation4
- G2 r6 I) M; W return true ' Z/ [0 X0 z0 v$ e& v2 k0 [
end
, v u1 C/ f$ @7 Q* \. u, e: m) |7 K' ~+ E, N6 \
begin P_Creation2 arriving procedure n3 o3 A3 g! J2 W/ F& c0 ]7 B5 ]
while 1=1 do: r* o+ X* Q& m& a
begin9 c( \: f1 j7 b2 _
wait for 1 sec
0 q8 P6 S8 L$ h+ [' d) `+ h V/ ^& d create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)( Y: b- v. G1 _" A
end
- `% \/ G0 T! _& v- ?, L7 c1 v# ~end: p8 ]7 L5 g' E% e+ ~' w, Q9 \) t B. N' S
- E7 p$ Z9 T. l; @( E- ]begin P_Creation3 arriving procedure! E) a! x; s2 k/ p' ]- ]- u
while 1=1 do
' t( S7 E% W2 @0 P% T1 k( D begin8 `4 D. @) ~0 M; F/ r7 C1 ^1 b
wait for 1 sec
2 ~6 x' m* R: m create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)) ^* @1 n4 Z6 r# L8 _
end
& q. W& n |1 R6 J5 Wend - t% M- l7 k. z+ w# W% W8 a
' @9 ~. s- b( O" ]
begin P_Creation4 arriving procedure9 @/ U8 r. j, V1 v5 t
while 1=1 do( _+ ~7 H: S/ ?$ u L( [# C! S
begin6 M8 R+ b+ C( \0 b/ ~, B- c
wait for 1 sec/ a, L7 `: y$ W6 l; h; U8 O1 ^3 B+ b
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
4 {! T- e8 \1 t: t# B' _ end
' O( x$ O$ B" {' M. c" D# x3 x& Y$ Rend; k1 O g( p4 ?- C# N$ L
, X! a" v$ x% C6 J/ c但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |