谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);/ f+ E6 i: u. p& A3 X/ K
begin model initialization function9 [& [1 X) M! Y
create 1 load of load type L_null to P_Creation21 j- ~0 _3 _6 H* ?$ P5 X5 S
create 1 load of load type L_null to P_Creation3
: B- B- @4 l; H" E/ ` create 1 load of load type L_null to P_Creation4
& H9 ^: [9 R; K/ p& w' d# Y return true 8 f9 c! x4 l! C' R
end0 c( C3 Z- V3 D) t/ I7 g! Y
2 D: K/ }+ I# A, H* s) | v5 s, gbegin P_Creation2 arriving procedure. J* }$ T* G, t1 ?2 o& s/ D( S, @
while 1=1 do7 ^, Y) ?) s) e
begin
$ O2 ` q8 J8 y b/ X wait for 1 sec C A# J0 }/ W: m! V! o9 [6 z
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)8 U7 L0 e8 l( V U v
end: W5 _1 T$ t* L$ f
end& C2 H* z+ I5 a
9 y- o1 k7 K0 C& L8 {: M1 C1 f
begin P_Creation3 arriving procedure
! v. h: E9 f" g2 E! q4 g# y; cwhile 1=1 do
! w( | a' G$ C" n6 [; d begin d. t, z2 `, {! F0 c! R4 k- S
wait for 1 sec) F S9 w1 Q. f
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)( e$ v" ?1 q" x/ z
end: H1 ?2 P: }0 f& C1 Z
end
) b% A0 F' |2 y, k" r6 N8 Z5 t4 ^7 j% k9 B3 g o
begin P_Creation4 arriving procedure
. d* A" \* W+ L9 _ owhile 1=1 do2 s2 S1 U6 c4 K: S h% v
begin' ~! V2 A/ u8 u; m3 i
wait for 1 sec. s9 v' |* _, V X/ M
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 x! j+ `: T$ P% k end& D, z5 n3 {6 J8 z; Q' ]+ |6 |
end
2 i* p( q* P- t* C0 t9 ?; {2 x9 o; P/ V! ]7 }# ~8 Z8 {
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |