谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
/ j8 H# I( r7 n2 D x# jbegin model initialization function% c% `8 Q0 j/ M" R* g
create 1 load of load type L_null to P_Creation2
9 J- O I$ ^$ u create 1 load of load type L_null to P_Creation3
) {; x( N2 e, K# R create 1 load of load type L_null to P_Creation4
+ L, K$ G' ^ x; T return true
6 P4 m: d) V* |end7 }1 u$ ^( h+ [4 h
7 Q( Q+ [( C+ o8 \0 a
begin P_Creation2 arriving procedure
9 \3 j+ v$ D% \) J( I+ B( vwhile 1=1 do
# d, N8 e& m! x/ p: Y' m begin
+ |5 }! Y( W; N3 E x% Y wait for 1 sec
, @/ Q( }- j" Y4 Z5 `, E create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)( G+ I* }" ]$ |% T% X$ f4 f
end
0 I1 l7 G8 x/ \0 Z8 b' U* nend
/ ?, Y' P" X9 j, Q5 _" ~# _0 {
" D3 _# z7 W: O% @1 s) a. X" @begin P_Creation3 arriving procedure8 W. h& g4 K+ [& C/ e5 D2 E0 u
while 1=1 do& L$ t: N( Z$ g4 I
begin
, m3 f# z2 @; r, S# p wait for 1 sec" T, w7 ] J' w6 Z. \0 x) s
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)2 [: ~6 T% l+ _! X2 l6 e2 c3 b
end: O/ q4 a2 i% ~) A, o* g$ D: i
end
1 [( ~ O/ |, C# M9 b
( f3 x; k8 s) J' E# T+ b/ ^begin P_Creation4 arriving procedure
; y+ w/ E% F" n( t/ I' o6 j( B; ^' owhile 1=1 do
4 x7 i2 c2 Y, p7 r begin
2 S( z9 Q) k- @0 v- X wait for 1 sec
9 u1 k# }. x' L0 w0 ]3 i create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)/ @* ]5 \; Z/ O9 o
end6 g. s' d$ b7 @/ Z1 {3 Q( K
end8 T! C5 ~1 v1 |, z$ \* S6 w5 D8 H% e
* @1 U6 ~3 l( _; O$ P但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |