谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);5 t8 a$ z0 {/ W4 X, W1 e( x3 b% f
begin model initialization function
. ] ~5 w; J+ U2 G2 q create 1 load of load type L_null to P_Creation2/ i6 E: e( ^' O o, S& e
create 1 load of load type L_null to P_Creation3
( w3 W/ F2 E7 i4 W8 k7 P& k9 _% w2 w$ V create 1 load of load type L_null to P_Creation4
" Z6 I. r1 \* R. u return true 5 C6 G2 O* j! q) V9 p3 o
end* Y& }0 X# e* h6 f: U+ f. a
6 n! y* l" U2 h: S, `! v
begin P_Creation2 arriving procedure$ Z: i) p( ^5 q" V% ]/ k, j N
while 1=1 do
6 ~: G, M& _: o, Y2 t begin
1 T$ J; @2 d' D. N% e wait for 1 sec# Z& P' U5 G/ Y/ w, i
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)8 I# M+ l8 B" }" x/ B
end
. s) u8 Z( C0 S! n( j, Pend
% B0 N7 {4 I' r4 a5 k E9 Z+ H" e- I0 u3 c4 I
begin P_Creation3 arriving procedure3 C1 l: q- S u* R$ ^' e! w' U
while 1=1 do0 k$ t, I: M* x2 A$ _5 D# |' p
begin" d" V- b& v' \: c }7 j
wait for 1 sec$ |* s7 j9 q7 Q, i( E
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
8 s+ [2 s5 k# m0 ?% T end1 a0 }- u: p$ Z/ e# @
end
/ i2 {& s9 X- N
j- n' R& z2 ?" jbegin P_Creation4 arriving procedure
/ H. Q/ O* E+ X. z0 Y8 ^* d d' cwhile 1=1 do u. `3 W/ v, X8 V/ V
begin* V4 L- E! a( j2 f7 @) ^5 j
wait for 1 sec
: X" P0 A H" `: |( M create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)2 `6 U* J: z0 Y% M( M) I; P" W
end
2 o. \: a8 X6 p/ Q9 `end [! ?% }3 b& z% a! ^6 |$ |7 u
8 Y; c& u7 b9 Y但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |